var showPreloader = (function() {
	
			var width = 0;
			if(config.maxWidth!=null)
				width = config.maxWidth;
			else
				width = $(window).width();
			
			var height = 0; 
			
			if(config.maxHeight!=null)
				height = config.maxHeight;
			else
				height = $(window).height();
			
			$(document.body).append('<div id="' + transitionControllerSetup.malhaID + '"></div>');
			$("#"+ transitionControllerSetup.malhaID).width(width);
			$("#"+ transitionControllerSetup.malhaID).height(height);
			$("#"+ transitionControllerSetup.malhaID).animate({ opacity: 0 }, 0);
			
			$(document.body).append('<div id="' + transitionControllerSetup.loaderID + '"><img src="'+transitionControllerSetup.loaderURL+'" border="0" /></div>');
			$("#"+ transitionControllerSetup.loaderID+" img").load(function () {  var width = (config.maxWidth!=null) ? config.maxWidth : $(window).width(); var height = (config.maxHeight!=null) ? config.maxHeight : $(window).height(); var posx = parseInt((height/2) - ( $("#"+ transitionControllerSetup.loaderID+" img").height()/2)); var posy = parseInt((width/2) - ( $("#"+ transitionControllerSetup.loaderID+" img").width()/2)); 	$("#"+ transitionControllerSetup.loaderID).css("top",posx + "px"); $("#"+ transitionControllerSetup.loaderID).css("left",posy + "px"); });
			$("#"+ transitionControllerSetup.loaderID).fadeOut(0);
			
			$("#"+ transitionControllerSetup.malhaID).animate({ opacity: 0.65 }, 500);
			$("#"+ transitionControllerSetup.loaderID).fadeIn(500).delay(250);
			//$("#malha").
	
	

});

var removePreloader = (function() {
	$("#"+ transitionControllerSetup.loaderID).fadeOut(500,'linear',function () { $("#"+ transitionControllerSetup.loaderID).remove(); });
	$("#"+ transitionControllerSetup.malhaID).animate({ opacity: 0 }, 500,function () { $("#"+ transitionControllerSetup.malhaID).remove(); }).delay(250);
});

