//	example usage: $('.leftbar, .rightbar').sequentialLoad(effect,timing,afterLast);
//	call the function on the list of items you wish to sequentially load, in the order you want them to load
// 
//	parameters:
//		effect: state the effect you wish to apply to said item, eg: slideDown, slideUp, fadeOut, fadeIn
//			if only one effect is listed, it will be applied to all items, or you can list an array of effects
//			eg: var effects = new Array('slideDown','fadeIn'); but the number of effects in the array must match the number of items you're calling it on
//		delay: how long it takes for the effect to occur, and then call the next effect.
//		callback: pass a function as a string, that you'd like to have called after the last effects occurs
$.fn.sequentialLoad=function(effect,delay,callback){
	var arr = jQuery.makeArray(this);
	
	if (effect instanceof Array)
	{
		var count = arr.length;
		effects = new Array(count);
		for($x=0;$x<count;$x++){
			effects[$x]=effect[$x];
		}
	}
	else{
		var count = arr.length;
		effects = new Array(count);
		for($x=0;$x<count;$x++){
			effects[$x]=effect;
		}
	}

	var addition = '$(arr[0]).'+effects[0]+'('+delay+'';
	var cap = ')';
	var total = arr.length - 1;
	for($i=total;$i>0;$i--)
	{
		addition=addition+',function(){$(arr['+((total+1)-$i)+']).'+effects[((total+1)-$i)]+'('+delay+'';
		cap=cap+'})';
	}
	if(callback)
	{
		callback=',function(){'+callback;
		addition=addition+callback;
		cap='}'+cap;
	}

	addition=addition+cap;
	eval(addition);
	
};
