]> git.ipfire.org Git - ipfire.org.git/blob - www/static/js/jquery-anythingslider-fx.js
Remove obsolete pakfire CGI scripts.
[ipfire.org.git] / www / static / js / jquery-anythingslider-fx.js
1 /*
2 * AnythingSlider Slide FX
3 * By Rob Garrison (aka Mottie & Fudgey)
4 * Dual licensed under the MIT and GPL licenses.
5 */
6 (function(h){h.fn.anythingSliderFx=function(i){var o=h(this).closest(".anythingSlider"),k=o.width(),p=o.height(),q=function(e){return{top:[{inFx:{top:0},outFx:{top:"-"+(e||p)}}],bottom:[{inFx:{bottom:0},outFx:{bottom:e||p}}],left:[{inFx:{left:0},outFx:{left:"-"+(e||k)}}],right:[{inFx:{right:0},outFx:{right:e||k}}],fade:[{inFx:{opacity:1,time:500},outFx:{opacity:0,time:500}}],expand:[{inFx:{width:"100%",top:"0%",left:"0%"},outFx:{width:e||"10%",top:"50%",left:"50%"}}],listLR:[{inFx:{left:0,opacity:1}, outFx:[{left:e||k,opacity:0},{left:"-"+(e||k),opacity:0}],selector:[":odd",":even"]}],listRL:[{inFx:{left:0,opacity:1},outFx:[{left:e||k,opacity:0},{left:"-"+(e||k),opacity:0}],selector:[":even",":odd"]}],"caption-Top":[{inFx:{top:0,opacity:0.8,zIndex:10},outFx:{top:"-"+e||-50,opacity:0,zIndex:0}}],"caption-Right":[{inFx:{right:0,opacity:0.8,zIndex:10},outFx:{right:"-"+e||-150,opacity:0,zIndex:0}}],"caption-Bottom":[{inFx:{bottom:0,opacity:0.8,zIndex:10},outFx:{bottom:"-"+e||-50,opacity:0,zIndex:0}}], "caption-Left":[{inFx:{left:0,opacity:0.8,zIndex:10},outFx:{left:"-"+e||-150,opacity:0,zIndex:0}}]}};return this.each(function(){var e=q(),j={easing:"swing",timeIn:400,timeOut:350},r=function(b){b.each(function(){h(this).closest(".panel").is(".activePage")||h(this).hide()})},n=function(b,c,d){if(!(b.length===0||typeof c=="undefined")){var a=c[0]||c,g=a[1]||"",f=parseInt(g===""?a.time:a[0].time,10);if(d){b.css("position")!=="absolute"&&b.css({position:"relative"});b.stop();if(g!==""){b.filter(c[1][0]).animate(a[0], {queue:false,duration:f,easing:a[0].easing});b.filter(c[1][1]).animate(g,{queue:false,duration:f,easing:a[0].easing,complete:function(){setTimeout(function(){r(b)},j.timeOut)}});return}}d||b.show();b.animate(a,{queue:false,duration:f,easing:a.easing,complete:function(){d&&setTimeout(function(){r(b)},j.timeOut)}})}},t=function(b,c){var d,a,g=c?"outFx":"inFx",f={},m=c?j.timeOut:j.timeIn,l=h.trim(b[0].replace(/\s+/g," ")).split(" ");if(c&&l.length==1&&e.hasOwnProperty(l)&&typeof e[l][0].selector!=="undefined"){a= e[l][0].outFx;a[0].time=b[2]||j.timeOut;a[0].easing=b[3]||j.easing;return[a,e[l][0].selector||[]]}h.each(l,function(u,s){if(e.hasOwnProperty(s)){d=typeof b[1]=="undefined"?e:q(b[1]);h.extend(true,f,d[s][0][g]);f.time=b[2]||f.time||m;f.easing=b[3]||j.easing}});return[f]};h(this).bind("slide_init",function(b,c){var d=c.$currentPage,a=c.$lastPage;if(d.is(".cloned")){var g=c.currentPage==c.pages?c.pages:1;d=d.add(a).add(c.$items.eq(g))}else d=d.add(a);for(var f in i)if(f=="outFx")for(var m in i.outFx)d.find(m)&& n(d.find(m),i.outFx[m],true);else f!=="inFx"&&h.isArray(i[f])&&n(d.find(f),t(i[f],true),true)}).bind("slide_complete",function(b,c){var d=c.$currentPage;if(d.is(".cloned"))d=c.$items.eq(c.currentPage==c.pages?c.pages:1);for(var a in i)if(a=="inFx")for(var g in i.inFx)d.find(g)&&n(d.find(g),i.inFx[g],false);else a!="outFx"&&h.isArray(i[a])&&d.find(a)&&n(d.find(a),t(i[a],false),false)})})}})(jQuery);