(function($) {

$.fn.randomize = function(childElem) {
  return this.each(function() {
      var $this = $(this);
      var elems = $this.children(childElem);

      elems.sort(function() { return (Math.round(Math.random())-0.5); });  

      $this.remove(childElem);  

      for(var i=0; i < elems.length; i++)
        $this.append(elems[i]);      

  });    
}
})(jQuery);


jQuery.fn.eachDelay = function(callback, speed){
	return jQuery.eachDelay( this, callback, speed)
}
jQuery.extend({
	eachDelay: function(object,callback, speed){ 
		var name, i = -1, length = object.length, $div = $('<div>'), id;
		if (length === undefined) { //not an array process as object
			var arr = [], x = -1;
			for (name in object) arr[++x] = name; 
			id = window.setInterval(function(){
			 if( ++i === arr.length || callback.call(object[ arr[i] ], arr[i], object[ arr[i] ]) === false) 
			 	 clearInterval(id);
			}, speed);	
		}
		else { //array-compatible element ie. [], jQuery Object
			id = window.setInterval(function(){ 
				if (++i === object.length || callback.call(object[i], i, object[i]) === false) 
					clearInterval(id);
			}, speed);
		}
		return object;
	}
});



$(document).ready(function() {

	$("div#projects-listing").bind("mouseout",function(){
		$('#photobox-projects').html('');
	});
	
	
	<!--

	//Disable right mouse click Script
	//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
	//For full source code, visit http://www.dynamicdrive.com

	var message="Function Disabled!";

	///////////////////////////////////
	function clickIE4(){
	if (event.button==2){
	// alert(message);
	return false;
	}
	}

	function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
	if (e.which==2||e.which==3){
	// alert(message);
	return false;
	}
	}
	}

	if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
	}

	document.oncontextmenu=new Function(";return false")
	// -->
	
	

});


