// JavaScript Document
$(document).ready(function(){
jQuery.fn.theLoader = function(){

						//var gifBottom = $(this).width() - 24;
						var parHeight = $(this).height();
						var parWidth = $(this).width();
						if(parHeight == 0){
							var gifTop = 0;
							} else {
								var gifTop = $(this).height() - 24/2;
							};
						if(parWidth == 0){
							var gifBottom = 0;
							} else {
								var gifBottom = $(this).height() - 24/2;
							};
						//alert('Height:' + parHeight + ', Width:' + parWidth);
						$(this).prepend('<div class="ldr"><div class="ldrBg"></div><div class="ldrImg"></div></div>');
						$(".ldrBg").css({'opacity':'0.8'});
						$(".ldr").css({'height': parHeight,'width': parWidth});
						$(".ldrBg").css({'opacity':'0.4','height': parHeight,'width': parWidth});
						$(".ldrImg").css({'height': parHeight,'width': parWidth});
						//$(".ldrImg").css({'margin-top':gifTop,'margin-bottom':gifBottom});
						//$(".ldrImg").css({'top':gifTop,'z-index':'99999'});
						$(this).css({'z-index': '-1'});
						$(this).ready(function(){
						$(".ldr").fadeOut(400, function(){
						//$(".ldr").remove();
						$(this).parent().fadeIn(600);
						$(this).parent().css({'z-index': '0'});
		});
	});
 };
						   });
