Your IP : 216.73.216.240


Current Path : /home/juvelize/www/modules/mod_thick_rss/includes/
Upload File :
Current File : /home/juvelize/www/modules/mod_thick_rss/includes/easybox.min.js

/*
        Easybox v1.4 - Lightweight easy to use lightbox clone for jQuery
        Based on Slimbox2 by Christophe Beyls <http://www.digitalia.be>
*/
(function(b){function z(a){if(r||0>a||a>=d.length)return!1;A();e=a;j=(e||(c.loop?d.length:0))-1;f=(e+1)%d.length||(c.loop?0:-1);c.preloadNext&&(0<=j&&B(d[j]),0<=f&&B(d[f]));d[e].loaded||b(v).show();B(d[e]);return!1}function V(){var a=d[e];b(v).hide();a.error?b(g).addClass("error").width(c.errorSize[0]).height(c.errorSize[1]):(!c.hideCaption&&a.caption.length&&b(m).html(a.caption).css({display:""}),b(g).width(a.width).height(a.height));!c.hideCaption&&1<d.length&&c.counterText.length&&b(n).html(c.counterText.replace(/{x}/,
e+1).replace(/{y}/,d.length)).css({display:""});r=!0;b(g).css({visibility:"hidden",display:""});O([g.offsetWidth,g.offsetHeight],-1,c.resizeDuration);b(h).queue(function(l){b(g).css({visibility:"",display:"none"});a.error||(b(a.obj).appendTo(g),a.handler.show(a),C=!0);P();b(g).fadeIn(c.fadeDuration,W);r=!1;l()})}function O(a,l,X){i=a.slice();var d={};if(h.offsetHeight!=a[1]||h.offsetWidth!=a[0])d={height:a[1],marginTop:-a[1]/2,width:a[0],marginLeft:-a[0]/2};if(-1<l)d.opacity=l;b(h).animate(d,X,c.resizeEasing)}
function W(){if(!c.hideBottom){if((0<=j||0<=f)&&!c.noNavigation&&!c.hideButtons)b(D).css({display:""}),b([m,n]).addClass("nav"),0>j&&b(E).addClass("disabled"),0>f&&b(F).addClass("disabled");b(w).fadeIn(c.captionFadeDuration);b(h).animate({height:i[1]+w.offsetHeight},c.captionFadeDuration,c.resizeEasing)}}function A(){null!=k&&(clearTimeout(k),k=null);null!=s&&(clearTimeout(s),s=null);if(0<=e){var a=d[e];!a.error&&C&&a.handler.hide(a)}b([g,m,n]).html("");b(v).hide();b([w,g]).stop(!0,!0).hide();b(h).stop(!0).css({width:i[0],
height:i[1],marginLeft:-i[0]/2,marginTop:-i[1]/2,opacity:""});b([D,m,n]).hide();b([g,m,n,E,F]).removeClass();C=r=!1}function G(){if(!o)return!1;A();e=j=f=-1;H();Q(0);for(var a=0;a<d.length;++a){var l=d[a];!l.loaded&&l.loading&&l.handler.abort(l)}b(I).stop().fadeOut(c.fadeDuration);O([i[0]/2,i[1]/2],0,c.fadeDuration);b(h).queue(function(a){b(h).css({left:"",top:""}).hide();o=!1;a()});return!1}function t(){p=!0;return z(j)}function u(){p=!1;return z(f)}function J(){return r||c.noClose?!1:G()}function Y(){q=
!q;p=!1;b(K).toggleClass("disabled",q);q?null!=k&&(clearTimeout(k),k=null):P();return!1}function P(){if(c.slideshow&&!q&&null==k){if(p&&0<=j)return k=setTimeout(t,c.slideshow),!1;if(!p&&0<=f)return k=setTimeout(u,c.slideshow),!1}c.autoClose&&null==s&&(s=setTimeout(G,c.autoClose));return!1}function B(a){a.loaded&&L(a);if(!a.loading){a.loading=!0;for(var b=x.length-1;0<=b;--b)if(x[b].identify(a)){a.handler=x[b];a.handler.preLoad(a,function(){L(a)});return}a.error=!0;L(a)}}function L(a){if(!a.loaded&&
(a.loaded=!0,!a.error)){if(!a.width||!a.height)a.width=c.defaultContentSize[0],a.height=c.defaultContentSize[1];if(a.height>c.maximumContentSize[1])a.width=Math.round(c.maximumContentSize[1]*a.width/a.height),a.height=c.maximumContentSize[1];if(a.width>c.maximumContentSize[0])a.height=Math.round(c.maximumContentSize[0]/a.width*a.height),a.width=c.maximumContentSize[0];a.handler.postLoad(a)}d[e]==a&&V()}function Q(a){a?b("object:visible").add("embed").each(function(a,b){M[a]=[b,b.style.visibility];
b.style.visibility="hidden"}):(b.each(M,function(a,b){b[0].style.visibility=b[1]}),M=[]);a=a?"bind":"unbind";b(document)[a]("keydown",Z);if(b.fn.mousewheel)b(window)[a]("mousewheel",$);b(h)[a]("mousedown",aa)[a]("mousemove",R)[a]("mouseup",H);b(window)[a]("mousemove",R)[a]("mouseup",H)}function Z(a){var a=a.keyCode,d=b.inArray;return 0<=d(a,c.closeKeys)?J():0<=d(a,c.nextKeys)&&!c.noNavigation?u():0<=d(a,c.previousKeys)&&!c.noNavigation?t():!c.preventOtherKeys}function $(a,b){return 0<b&&!c.noNavigation?
t():0>b&&!c.noNavigation?u():!1}function aa(a){return c.dragDrop?(y=!0,b(h).css({cursor:"pointer"}),S=a.pageX-b(this).position().left,T=a.pageY-b(this).position().top,!1):!0}function R(a){if(c.dragDrop&&y){var d=a.pageX-b(window).scrollLeft()-S,a=a.pageY-b(window).scrollTop()-T;b(h).css({left:d+"px",top:a+"px"});return!1}return!0}function H(){y&&(y=!1,b(h).css({cursor:""}));return!0}var N={loop:!1,preloadNext:!0,dragDrop:!0,hideBottom:!1,hideCaption:!1,hideButtons:!1,noNavigation:!1,noClose:!1,overlayOpacity:0.8,
resizeDuration:400,resizeEasing:"easybox",fadeDuration:400,initCenterSize:[250,250],errorSize:[320,180],defaultContentSize:[960,720],maximumContentSize:[1280,720],captionFadeDuration:200,slideshow:0,autoClose:0,counterText:"{x} of {y}",closeKeys:[27],previousKeys:[37],nextKeys:[39],preventOtherKeys:!0},x=[],c,d,e=-1,j,f,i,M=[],p,q,y=!1,S=0,T=0,o=!1,r,C,k=null,s=null,I,h,g,D,E,F,K,U,w,m,n,v;b(function(){b("body").append(b([I=b('<div id="easyOverlay" />').click(J)[0],h=b('<div id="easyCenter" />').append([g=
b('<div id="easyContainer" />')[0],v=b('<div id="easyLoadingIndicator" />')[0],w=b('<div id="easyBottom" />').append([D=b('<div id="easyNavigation" />').append([E=b('<a id="easyPrevLink" href="#" />').click(t)[0],F=b('<a id="easyNextLink" href="#" />').click(u)[0]])[0],U=b('<a id="easyCloseLink" href="#" />').click(J)[0],K=b('<a id="easySlideLink" href="#" />').click(Y)[0],m=b('<div id="easyCaption" />')[0],n=b('<div id="easyNumber" />')[0]])[0]])[0]]).css("display","none"))});b.fn.easybox=function(a,
c,d,h){var c=c||function(a){var b={url:a.href,caption:a.title};if(a.hasAttribute("data-width"))b.width=a.getAttribute("data-width");if(a.hasAttribute("data-height"))b.height=a.getAttribute("data-height");return b},d=d||function(a){return this==a},h=h||function(){return{}},g=this;return g.unbind("click").click(function(){var e=this,j=0,f,i=0,k;f=b.grep(g,function(a,b){return d.call(e,a,b)});for(k=f.length;i<k;++i)f[i]==e&&(j=i),f[i]=c(f[i],i);return b.easybox(f,j,b.extend({},a,h(e)))})};b.easybox=
function(a,f,e){if(o)return!1;c=b.extend({},N,e);var e=0,g;d=[];for(g=a.length;e<g;++e)d.push(b.extend({caption:"",width:0,height:0},a[e],{handler:null,loaded:!1,loading:!1,error:!1,obj:null}));if(d.length)return o=!0,c.loop=c.loop&&1<d.length,c.slideshow=c.slideshow&&1<d.length?c.slideshow:0,b(K).removeClass("disabled").css({display:c.slideshow&&1<d.length&&!c.hideButtons?"":"none"}),p=q=!1,b(U).css({display:!c.hideButtons?"":"none"}),i=c.initCenterSize.slice(),A(),Q(1),b(h).show(),b(I).css({opacity:c.overlayOpacity}).fadeIn(c.fadeDuration,
function(){z(Math.min(d.length-1,f||0))}),!1};b.easybox.previous=function(){return 0<=j?!t():!1};b.easybox.next=function(){return 0<=f?!u():!1};b.easybox.close=function(){return o?!G():!1};b.easybox.isOpen=function(){return o};b.easybox.defaults=function(a){N=b.extend(N,a)};b.easybox.resourceHandler=function(a){x.push(b.extend({identify:function(){return!1},preLoad:function(a,b){b()},postLoad:function(){},abort:function(){},show:function(){},hide:function(){}},a))};b.easing.easybox=function(a){return 0.7>
a?1.2*Math.pow(a/0.7,2):1.2-0.2*Math.sqrt((a-0.7)/(1-0.7))}})(jQuery);