/**
 * Image Preloader - jQuery Plugin
 * Shows loading text while caching images
 *
 * Copyright (c) 2011 Roger 'SparK' Rodrigues da Cruz and Mauricio José Rodrigues
 *
 * Version: 0.9.min (01/07/2011)
 * Requires: jQuery v1.3+
 *
 * Dual licensed under GPL and MIT:
 *   http://www.gnu.org/licenses/gpl.html
 *   http://www.opensource.org/licenses/mit-license.php
 */
$(function(){$.fn.createLoader=function(o){var d={effect:"fadeIn",effectSpeed:"slow",backgroundColor:"#232323",useLoadingImage:true,backgroundImage:"images/loading.gif",backgroundPosition:"center center",backgroundRepeat:"no-repeat",textLoading:"carregando...",textColor:"#FFFFFF"};var o=$.extend(d,o);this.each(pI);function pI(){var t=$(this);var l=new Image();l.onload=lT;var p=t.attr("src");if(p=="")p=t.attr("rel");var w=t.attr("width");var h=t.attr("height");var hr=$('<div>'+o.textLoading+'</div>');hr.css("background-color",o.backgroundColor);hr.css("color",o.textColor);if(o.useLoadingImage){hr.css("background-image","url('"+o.backgroundImage+"')");hr.css("background-position",o.backgroundPosition);hr.css("background-repeat",o.backgroundRepeat);hr.css("color",o.backgroundColor);}hr.css("margin","0");hr.css("padding","0");hr.css("display","inline-block");hr.insertBefore(t);t.prependTo(hr);t.css("display","none");l.src=p;w=w?w:l.w;h=h?h:l.h;hr.css("width",w+"px");hr.css("height",h+"px");t.attr("width",w);t.attr("height",h);function lT(){t.attr("src",p);t[o.effect](o.effectSpeed,function(){t.insertBefore(hr);hr.remove();});}}}});
