// JavaScript Document
/**
 *	developed by me, for my purposes
 *	all others can screw off man, come on!!
 */

(function($){ 
	$.fn.extend({ 
		addShadow: function() { 

			var rightWeight = 5;
			var bottomWeight = 5;
			var offset = 4;
			
			this.each(function(i) {
				var rand_id = parseInt(Math.random()*10000);
				var thisheight = $(this).height();
				var thiswidth = $(this).width();
				
				$(this).wrap(
					'<div class="shadow-container">'+
					'<div id="'+rand_id+'" class="shadow-left" style="float:left; width:'+thiswidth+'px; overflow:hidden; z-index:1;"></div></div>'
				);
		
				var h = $('#'+rand_id).height();
				var w = $('#'+rand_id).width();
				h = parseInt(h) - offset;
				w = parseInt(w) + rightWeight - offset;
		
				$('#'+rand_id).after(
					'<div class="shadow-right ui-corner-tr" style="float:left; width:'+rightWeight+'px; margin:'+offset+'px 0 0 0; height:'+h+'px; "></div>' +
					'<div style="clear:both;"></div>' +
					'<div class="shadow-bottom ui-corner-bottom" style="height:'+bottomWeight+'px; margin:0 0 0 '+offset+'px; width:'+w+'px;"></div>'
				);
			});

			// You must return jQuery object 
			return $(); 
		}
	}); 
})(jQuery);




