!function(e){e.fn.preloader=function(a){function i(i){0==m[i]&&(s++,a.onEachLoad(y[i]),m[i]=!0),0==a.imageDelay&&0==a.delay?e(y[i]).css("visibility","visible").animate({opacity:1},700):0==a.delay?(f(y[i],d),d+=a.imageDelay):0==a.imageDelay?f(y[i],a.delay):(f(y[i],a.delay+d),d+=a.imageDelay)}function n(){for(r=0;r<y.length;r++)1==y[r].complete&&i(r)}function t(){1==y[r].complete&&(i(r),r++)}var o,l={mode:"continues",delay:0,fadeIn:500,imageDelay:500,checkTimer:500,preloadParent:"a",onDone:function(){},onEachLoad:function(){}},a=e.extend(l,a),c=e(this),r=0,d=a.imageDelay,s=0,y=c.find("img").css({opacity:0,visibility:"hidden"}),m=[],f=function(i,n){e(i).css("visibility","visible").delay(n).animate({opacity:1},a.fadeIn,function(){e(this).parent().removeClass("gc-preloader")})};y.each(function(){0==e(this).parent(a.preloadParent).length?e(this).wrap("<a class='gc-preloader' />"):e(this).parent().addClass("gc-preloader"),m[r++]=!1}),y=e.makeArray(y),s=0,r=0,d=a.imageDelay,o=setInterval(function(){return s>=m.length?(clearInterval(o),a.onDone(),void 0):("continues"==a.mode?n():t(),void 0)},a.checkTimer)}}(jQuery);