Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minified supersized.3.1.3.js

  • Loading branch information...
commit 2796e7a9b4a1f76f9a8e118e08addf361ceb1e34 1 parent 842230d
@swinton authored
Showing with 29 additions and 1 deletion.
  1. +29 −1 slideshow/js/supersized.3.1.3.min.js
View
30 slideshow/js/supersized.3.1.3.min.js
@@ -7,4 +7,32 @@
Released under MIT License / GPL License
*/
-(function(a){a(document).ready(function(){a("body").prepend('<div id="supersized-loader"></div>').prepend('<div id="supersized"></div>')});a.supersized=function(t){var c={slideshow:1,autoplay:1,start_slide:1,random:0,slide_interval:5000,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,image_path:"img/",min_width:0,min_height:0,vertical_center:1,horizontal_center:1,fit_portrait:0,fit_landscape:0,navigation:1,thumbnail_navigation:0,slide_counter:1,slide_captions:1};var k=a("#supersized");var d="#pauseplay";if(t){var t=a.extend(c,t)}else{var t=a.extend(c)}var b=false;var n=false;var m=t.image_path;if(t.start_slide){var l=t.start_slide-1}else{var l=Math.floor(Math.random()*t.slides.length)}var s=t.new_window?' target="_blank"':"";if(t.performance==3){k.addClass("speed")}else{if((t.performance==1)||(t.performance==2)){k.addClass("quality")}}if(t.random){arr=t.slides;for(var f,q,h=arr.length;h;f=parseInt(Math.random()*h),q=arr[--h],arr[h]=arr[f],arr[f]=q){}t.slides=arr}if(t.slides.length>1){l-1<0?loadPrev=t.slides.length-1:loadPrev=l-1;var e=(t.slides[loadPrev].url)?"href='"+t.slides[loadPrev].url+"'":"";a("<img/>").attr("src",t.slides[loadPrev].image).appendTo(k).wrap("<a "+e+s+"></a>")}e=(t.slides[l].url)?"href='"+t.slides[l].url+"'":"";a("<img/>").attr("src",t.slides[l].image).appendTo(k).wrap('<a class="activeslide" '+e+s+"></a>");if(t.slides.length>1){l==t.slides.length-1?loadNext=0:loadNext=l+1;e=(t.slides[loadNext].url)?"href='"+t.slides[loadNext].url+"'":"";a("<img/>").attr("src",t.slides[loadNext].image).appendTo(k).wrap("<a "+e+s+"></a>")}k.hide();a("#controls-wrapper").hide();a(document).ready(function(){r()});a(window).load(function(){a("#supersized-loader").hide();k.fadeIn("fast");a("#controls-wrapper").show();if(t.thumbnail_navigation){l-1<0?prevThumb=t.slides.length-1:prevThumb=l-1;a("#prevthumb").show().html(a("<img/>").attr("src",t.slides[prevThumb].image));l==t.slides.length-1?nextThumb=0:nextThumb=l+1;a("#nextthumb").show().html(a("<img/>").attr("src",t.slides[nextThumb].image))}r();if(t.slide_captions){a("#slidecaption").html(t.slides[l].title)}if(!(t.navigation)){a("#navigation").hide()}if(t.slideshow&&t.slides.length>1){if(t.slide_counter){a("#slidecounter .slidenumber").html(l+1);a("#slidecounter .totalslides").html(t.slides.length)}slideshow_interval=setInterval(o,t.slide_interval);if(!(t.autoplay)){clearInterval(slideshow_interval);n=true;if(a(d).attr("src")){a(d).attr("src",m+"play_dull.png")}}if(t.thumbnail_navigation){a("#nextthumb").click(function(){if(b){return false}clearInterval(slideshow_interval);o(k,t);if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false});a("#prevthumb").click(function(){if(b){return false}clearInterval(slideshow_interval);g(k,t);if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false})}if(t.navigation){a("#navigation a").click(function(){a(this).blur();return false});a("#nextslide").click(function(){if(b){return false}clearInterval(slideshow_interval);o();if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false});if(a("#nextslide").attr("src")){a("#nextslide").mousedown(function(){a(this).attr("src",m+"forward.png")});a("#nextslide").mouseup(function(){a(this).attr("src",m+"forward_dull.png")});a("#nextslide").mouseout(function(){a(this).attr("src",m+"forward_dull.png")})}a("#prevslide").click(function(){if(b){return false}clearInterval(slideshow_interval);g();if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false});if(a("#prevslide").attr("src")){a("#prevslide").mousedown(function(){a(this).attr("src",m+"back.png")});a("#prevslide").mouseup(function(){a(this).attr("src",m+"back_dull.png")});a("#prevslide").mouseout(function(){a(this).attr("src",m+"back_dull.png")})}a(d).click(function(){if(b){return false}if(n){if(a(d).attr("src")){a(d).attr("src",m+"pause_dull.png")}n=false;slideshow_interval=setInterval(o,t.slide_interval)}else{if(a(d).attr("src")){a(d).attr("src",m+"play_dull.png")}clearInterval(slideshow_interval);n=true}return false})}}});if(t.keyboard_nav){a(document.documentElement).keydown(function(i){if((i.keyCode==37)||(i.keyCode==40)){if(a("#prevslide").attr("src")){a("#prevslide").attr("src",m+"back.png")}}else{if((i.keyCode==39)||(i.keyCode==38)){if(a("#nextslide").attr("src")){a("#nextslide").attr("src",m+"forward.png")}}}});a(document.documentElement).keyup(function(i){clearInterval(slideshow_interval);if((i.keyCode==37)||(i.keyCode==40)){if(a("#prevslide").attr("src")){a("#prevslide").attr("src",m+"back_dull.png")}if(b){return false}clearInterval(slideshow_interval);g();if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false}else{if((i.keyCode==39)||(i.keyCode==38)){if(a("#nextslide").attr("src")){a("#nextslide").attr("src",m+"forward_dull.png")}if(b){return false}clearInterval(slideshow_interval);o();if(!(n)){slideshow_interval=setInterval(o,t.slide_interval)}return false}else{if(i.keyCode==32){if(b){return false}if(n){if(a(d).attr("src")){a(d).attr("src",m+"pause_dull.png")}n=false;slideshow_interval=setInterval(o,t.slide_interval)}else{if(a(d).attr("src")){a(d).attr("src",m+"play_dull.png")}n=true}return false}}}})}if(t.slideshow&&t.pause_hover){a(k).hover(function(){if(b){return false}if(!(n)&&t.navigation){if(a(d).attr("src")){a(d).attr("src",m+"pause.png")}clearInterval(slideshow_interval)}},function(){if(!(n)&&t.navigation){if(a(d).attr("src")){a(d).attr("src",m+"pause_dull.png")}slideshow_interval=setInterval(o,t.slide_interval)}})}a(window).resize(function(){r()});function r(){return k.each(function(){var i=a("img",k);a(i).each(function(){var u=(a(this).height()/a(this).width()).toFixed(2);thisSlide=a(this);var j=a(window).width();var w=a(window).height();var x;if((w<=t.min_height)&&(j<=t.min_width)){if((w/j)>u){t.fit_landscape&&u<=1?v(true):y(true)}else{t.fit_portrait&&u>1?y(true):v(true)}}else{if(j<=t.min_width){if((w/j)>u){t.fit_landscape&&u<=1?v(true):y()}else{t.fit_portrait&&u>1?y():v(true)}}else{if(w<=t.min_height){if((w/j)>u){t.fit_landscape&&u<=1?v():y(true)}else{t.fit_portrait&&u>1?y(true):v()}}else{if((w/j)>u){t.fit_landscape&&u<=1?v():y()}else{t.fit_portrait&&u>1?y():v()}}}}function v(z){if(z){if(thisSlide.width()<j||thisSlide.width()<t.min_width){if(thisSlide.width()*u>=t.min_height){thisSlide.width(t.min_width);thisSlide.height(thisSlide.width()*u)}else{y()}}}else{if(t.min_height>=w&&!t.fit_landscape){if(j*u>=t.min_height||(j*u>=t.min_height&&u<=1)){thisSlide.width(j);thisSlide.height(j*u)}else{if(u>1){thisSlide.height(t.min_height);thisSlide.width(thisSlide.height()/u)}else{if(thisSlide.width()<j){thisSlide.width(j);thisSlide.height(thisSlide.width()*u)}}}}else{thisSlide.width(j);thisSlide.height(j*u)}}}function y(z){if(z){if(thisSlide.height()<w){if(thisSlide.height()/u>=t.min_width){thisSlide.height(t.min_height);thisSlide.width(thisSlide.height()/u)}else{v(true)}}}else{if(t.min_width>=j){if(w/u>=t.min_width||u>1){thisSlide.height(w);thisSlide.width(w/u)}else{if(u<=1){thisSlide.width(t.min_width);thisSlide.height(thisSlide.width()*u)}}}else{thisSlide.height(w);thisSlide.width(w/u)}}}if(t.horizontal_center){a(this).css("left",(j-a(this).width())/2)}if(t.vertical_center){a(this).css("top",(w-a(this).height())/2)}});if(t.image_protect){a("img",k).bind("contextmenu",function(){return false});a("img",k).bind("mousedown",function(){return false})}return false})}function o(){if(b){return false}else{b=true}var u=t.slides;var j=k.find(".activeslide");j.removeClass("activeslide");if(j.length==0){j=k.find("a:last")}var i=j.next().length?j.next():k.find("a:first");var v=i.prev().length?i.prev():k.find("a:last");a(".prevslide").removeClass("prevslide");v.addClass("prevslide");l+1==u.length?l=0:l++;if(t.performance==1){k.removeClass("quality").addClass("speed")}loadSlide=false;l==u.length-1?loadSlide=0:loadSlide=l+1;e=(t.slides[loadSlide].url)?"href='"+t.slides[loadSlide].url+"'":"";a("<img/>").attr("src",t.slides[loadSlide].image).appendTo(k).wrap("<a "+e+s+"></a>");if(t.thumbnail_navigation==1){l-1<0?prevThumb=u.length-1:prevThumb=l-1;a("#prevthumb").html(a("<img/>").attr("src",t.slides[prevThumb].image));nextThumb=loadSlide;a("#nextthumb").html(a("<img/>").attr("src",t.slides[nextThumb].image))}j.prev().remove();if(t.slide_counter){a("#slidecounter .slidenumber").html(l+1)}if(t.slide_captions){(t.slides[l].title)?a("#slidecaption").html(t.slides[l].title):a("#slidecaption").html("")}i.hide().addClass("activeslide");switch(t.transition){case 0:i.show();b=false;break;case 1:i.fadeTo(t.transition_speed,1,function(){p()});break;case 2:i.animate({top:-a(window).height()},0).show().animate({top:0},t.transition_speed,function(){p()});break;case 3:i.animate({left:a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});break;case 4:i.animate({top:a(window).height()},0).show().animate({top:0},t.transition_speed,function(){p()});break;case 5:i.animate({left:-a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});break;case 6:i.animate({left:a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});j.animate({left:-a(window).width()},t.transition_speed);break;case 7:i.animate({left:-a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});j.animate({left:a(window).width()},t.transition_speed);break}}function g(){if(b){return false}else{b=true}var u=t.slides;var j=k.find(".activeslide");j.removeClass("activeslide");if(j.length==0){j=a(k).find("a:first")}var i=j.prev().length?j.prev():a(k).find("a:last");var v=i.next().length?i.next():a(k).find("a:first");a(".prevslide").removeClass("prevslide");v.addClass("prevslide");l==0?l=u.length-1:l--;if(t.performance==1){k.removeClass("quality").addClass("speed")}loadSlide=false;l-1<0?loadSlide=u.length-1:loadSlide=l-1;e=(t.slides[loadSlide].url)?"href='"+t.slides[loadSlide].url+"'":"";a("<img/>").attr("src",t.slides[loadSlide].image).prependTo(k).wrap("<a "+e+s+"></a>");if(t.thumbnail_navigation==1){prevThumb=loadSlide;a("#prevthumb").html(a("<img/>").attr("src",t.slides[prevThumb].image));l==u.length-1?nextThumb=0:nextThumb=l+1;a("#nextthumb").html(a("<img/>").attr("src",t.slides[nextThumb].image))}j.next().remove();if(t.slide_counter){a("#slidecounter .slidenumber").html(l+1)}if(t.slide_captions){(t.slides[l].title)?a("#slidecaption").html(t.slides[l].title):a("#slidecaption").html("")}i.hide().addClass("activeslide");switch(t.transition){case 0:i.show();b=false;break;case 1:i.fadeTo(t.transition_speed,1,function(){p()});break;case 2:i.animate({top:a(window).height()},0).show().animate({top:0},t.transition_speed,function(){p()});break;case 3:i.animate({left:-a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});break;case 4:i.animate({top:-a(window).height()},0).show().animate({top:0},t.transition_speed,function(){p()});break;case 5:i.animate({left:a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});break;case 6:i.animate({left:-a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});j.animate({left:a(window).width()},t.transition_speed);break;case 7:i.animate({left:a(window).width()},0).show().animate({left:0},t.transition_speed,function(){p()});j.animate({left:-a(window).width()},t.transition_speed);break}}function p(){b=false;if(t.performance==1){k.removeClass("speed").addClass("quality")}r()}}})(jQuery);
+(function($){$(document).ready(function(){$("body").prepend('<div id="supersized-loader"></div>').prepend('<div id="supersized"></div>')});$.supersized=function(options){var settings={slideshow:1,autoplay:1,start_slide:1,random:0,slide_interval:5E3,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,image_path:"img/",min_width:0,min_height:0,vertical_center:1,horizontal_center:1,fit_portrait:0,fit_landscape:0,navigation:1,thumbnail_navigation:0,
+slide_counter:1,slide_captions:1};var element=$("#supersized");var pauseplay="#pauseplay";if(options)var options=$.extend(settings,options);else var options=$.extend(settings);var inAnimation=false;var isPaused=false;var image_path=options.image_path;if(options.start_slide)var currentSlide=options.start_slide-1;else var currentSlide=Math.floor(Math.random()*options.slides.length);var linkTarget=options.new_window?' target="_blank"':"";if(options.performance==3)element.addClass("speed");else if(options.performance==
+1||options.performance==2)element.addClass("quality");if(options.random){arr=options.slides;for(var j,x,i=arr.length;i;j=parseInt(Math.random()*i),x=arr[--i],arr[i]=arr[j],arr[j]=x);options.slides=arr}if(options.slides.length>1){currentSlide-1<0?loadPrev=options.slides.length-1:loadPrev=currentSlide-1;var imageLink=options.slides[loadPrev].url?"href='"+options.slides[loadPrev].url+"'":"";$("<img/>").attr("src",options.slides[loadPrev].image).appendTo(element).wrap("<a "+imageLink+linkTarget+"></a>")}imageLink=
+options.slides[currentSlide].url?"href='"+options.slides[currentSlide].url+"'":"";$("<img/>").attr("src",options.slides[currentSlide].image).appendTo(element).wrap('<a class="activeslide" '+imageLink+linkTarget+"></a>");if(options.slides.length>1){currentSlide==options.slides.length-1?loadNext=0:loadNext=currentSlide+1;imageLink=options.slides[loadNext].url?"href='"+options.slides[loadNext].url+"'":"";$("<img/>").attr("src",options.slides[loadNext].image).appendTo(element).wrap("<a "+imageLink+linkTarget+
+"></a>")}element.hide();$("#controls-wrapper").hide();$(document).ready(function(){resizenow()});$(window).load(function(){$("#supersized-loader").hide();element.fadeIn("fast");$("#controls-wrapper").show();if(options.thumbnail_navigation){currentSlide-1<0?prevThumb=options.slides.length-1:prevThumb=currentSlide-1;$("#prevthumb").show().html($("<img/>").attr("src",options.slides[prevThumb].image));currentSlide==options.slides.length-1?nextThumb=0:nextThumb=currentSlide+1;$("#nextthumb").show().html($("<img/>").attr("src",
+options.slides[nextThumb].image))}resizenow();if(options.slide_captions)$("#slidecaption").html(options.slides[currentSlide].title);if(!options.navigation)$("#navigation").hide();if(options.slideshow&&options.slides.length>1){if(options.slide_counter){$("#slidecounter .slidenumber").html(currentSlide+1);$("#slidecounter .totalslides").html(options.slides.length)}slideshow_interval=setInterval(nextslide,options.slide_interval);if(!options.autoplay){clearInterval(slideshow_interval);isPaused=true;if($(pauseplay).attr("src"))$(pauseplay).attr("src",
+image_path+"play_dull.png")}if(options.thumbnail_navigation){$("#nextthumb").click(function(){if(inAnimation)return false;clearInterval(slideshow_interval);nextslide(element,options);if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false});$("#prevthumb").click(function(){if(inAnimation)return false;clearInterval(slideshow_interval);prevslide(element,options);if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false})}if(options.navigation){$("#navigation a").click(function(){$(this).blur();
+return false});$("#nextslide").click(function(){if(inAnimation)return false;clearInterval(slideshow_interval);nextslide();if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false});if($("#nextslide").attr("src")){$("#nextslide").mousedown(function(){$(this).attr("src",image_path+"forward.png")});$("#nextslide").mouseup(function(){$(this).attr("src",image_path+"forward_dull.png")});$("#nextslide").mouseout(function(){$(this).attr("src",image_path+"forward_dull.png")})}$("#prevslide").click(function(){if(inAnimation)return false;
+clearInterval(slideshow_interval);prevslide();if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false});if($("#prevslide").attr("src")){$("#prevslide").mousedown(function(){$(this).attr("src",image_path+"back.png")});$("#prevslide").mouseup(function(){$(this).attr("src",image_path+"back_dull.png")});$("#prevslide").mouseout(function(){$(this).attr("src",image_path+"back_dull.png")})}$(pauseplay).click(function(){if(inAnimation)return false;if(isPaused){if($(pauseplay).attr("src"))$(pauseplay).attr("src",
+image_path+"pause_dull.png");isPaused=false;slideshow_interval=setInterval(nextslide,options.slide_interval)}else{if($(pauseplay).attr("src"))$(pauseplay).attr("src",image_path+"play_dull.png");clearInterval(slideshow_interval);isPaused=true}return false})}}});if(options.keyboard_nav){$(document.documentElement).keydown(function(event){if(event.keyCode==37||event.keyCode==40){if($("#prevslide").attr("src"))$("#prevslide").attr("src",image_path+"back.png")}else if(event.keyCode==39||event.keyCode==
+38)if($("#nextslide").attr("src"))$("#nextslide").attr("src",image_path+"forward.png")});$(document.documentElement).keyup(function(event){clearInterval(slideshow_interval);if(event.keyCode==37||event.keyCode==40){if($("#prevslide").attr("src"))$("#prevslide").attr("src",image_path+"back_dull.png");if(inAnimation)return false;clearInterval(slideshow_interval);prevslide();if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false}else if(event.keyCode==39||event.keyCode==
+38){if($("#nextslide").attr("src"))$("#nextslide").attr("src",image_path+"forward_dull.png");if(inAnimation)return false;clearInterval(slideshow_interval);nextslide();if(!isPaused)slideshow_interval=setInterval(nextslide,options.slide_interval);return false}else if(event.keyCode==32){if(inAnimation)return false;if(isPaused){if($(pauseplay).attr("src"))$(pauseplay).attr("src",image_path+"pause_dull.png");isPaused=false;slideshow_interval=setInterval(nextslide,options.slide_interval)}else{if($(pauseplay).attr("src"))$(pauseplay).attr("src",
+image_path+"play_dull.png");isPaused=true}return false}})}if(options.slideshow&&options.pause_hover)$(element).hover(function(){if(inAnimation)return false;if(!isPaused&&options.navigation){if($(pauseplay).attr("src"))$(pauseplay).attr("src",image_path+"pause.png");clearInterval(slideshow_interval)}},function(){if(!isPaused&&options.navigation){if($(pauseplay).attr("src"))$(pauseplay).attr("src",image_path+"pause_dull.png");slideshow_interval=setInterval(nextslide,options.slide_interval)}});$(window).resize(function(){resizenow()});
+function resizenow(){return element.each(function(){var t=$("img",element);$(t).each(function(){var ratio=($(this).height()/$(this).width()).toFixed(2);thisSlide=$(this);var browserwidth=$(window).width();var browserheight=$(window).height();var offset;if(browserheight<=options.min_height&&browserwidth<=options.min_width)if(browserheight/browserwidth>ratio)options.fit_landscape&&ratio<=1?resizeWidth(true):resizeHeight(true);else options.fit_portrait&&ratio>1?resizeHeight(true):resizeWidth(true);else if(browserwidth<=
+options.min_width)if(browserheight/browserwidth>ratio)options.fit_landscape&&ratio<=1?resizeWidth(true):resizeHeight();else options.fit_portrait&&ratio>1?resizeHeight():resizeWidth(true);else if(browserheight<=options.min_height)if(browserheight/browserwidth>ratio)options.fit_landscape&&ratio<=1?resizeWidth():resizeHeight(true);else options.fit_portrait&&ratio>1?resizeHeight(true):resizeWidth();else if(browserheight/browserwidth>ratio)options.fit_landscape&&ratio<=1?resizeWidth():resizeHeight();else options.fit_portrait&&
+ratio>1?resizeHeight():resizeWidth();function resizeWidth(minimum){if(minimum){if(thisSlide.width()<browserwidth||thisSlide.width()<options.min_width)if(thisSlide.width()*ratio>=options.min_height){thisSlide.width(options.min_width);thisSlide.height(thisSlide.width()*ratio)}else resizeHeight()}else if(options.min_height>=browserheight&&!options.fit_landscape)if(browserwidth*ratio>=options.min_height||browserwidth*ratio>=options.min_height&&ratio<=1){thisSlide.width(browserwidth);thisSlide.height(browserwidth*
+ratio)}else if(ratio>1){thisSlide.height(options.min_height);thisSlide.width(thisSlide.height()/ratio)}else{if(thisSlide.width()<browserwidth){thisSlide.width(browserwidth);thisSlide.height(thisSlide.width()*ratio)}}else{thisSlide.width(browserwidth);thisSlide.height(browserwidth*ratio)}}function resizeHeight(minimum){if(minimum){if(thisSlide.height()<browserheight)if(thisSlide.height()/ratio>=options.min_width){thisSlide.height(options.min_height);thisSlide.width(thisSlide.height()/ratio)}else resizeWidth(true)}else if(options.min_width>=
+browserwidth)if(browserheight/ratio>=options.min_width||ratio>1){thisSlide.height(browserheight);thisSlide.width(browserheight/ratio)}else{if(ratio<=1){thisSlide.width(options.min_width);thisSlide.height(thisSlide.width()*ratio)}}else{thisSlide.height(browserheight);thisSlide.width(browserheight/ratio)}}if(options.horizontal_center)$(this).css("left",(browserwidth-$(this).width())/2);if(options.vertical_center)$(this).css("top",(browserheight-$(this).height())/2)});if(options.image_protect){$("img",
+element).bind("contextmenu",function(){return false});$("img",element).bind("mousedown",function(){return false})}return false})}function nextslide(){if(inAnimation)return false;else inAnimation=true;var slides=options.slides;var currentslide=element.find(".activeslide");currentslide.removeClass("activeslide");if(currentslide.length==0)currentslide=element.find("a:last");var nextslide=currentslide.next().length?currentslide.next():element.find("a:first");var prevslide=nextslide.prev().length?nextslide.prev():
+element.find("a:last");$(".prevslide").removeClass("prevslide");prevslide.addClass("prevslide");currentSlide+1==slides.length?currentSlide=0:currentSlide++;if(options.performance==1)element.removeClass("quality").addClass("speed");loadSlide=false;currentSlide==slides.length-1?loadSlide=0:loadSlide=currentSlide+1;imageLink=options.slides[loadSlide].url?"href='"+options.slides[loadSlide].url+"'":"";$("<img/>").attr("src",options.slides[loadSlide].image).appendTo(element).wrap("<a "+imageLink+linkTarget+
+"></a>");if(options.thumbnail_navigation==1){currentSlide-1<0?prevThumb=slides.length-1:prevThumb=currentSlide-1;$("#prevthumb").html($("<img/>").attr("src",options.slides[prevThumb].image));nextThumb=loadSlide;$("#nextthumb").html($("<img/>").attr("src",options.slides[nextThumb].image))}currentslide.prev().remove();if(options.slide_counter)$("#slidecounter .slidenumber").html(currentSlide+1);if(options.slide_captions)options.slides[currentSlide].title?$("#slidecaption").html(options.slides[currentSlide].title):
+$("#slidecaption").html("");nextslide.hide().addClass("activeslide");switch(options.transition){case 0:nextslide.show();inAnimation=false;break;case 1:nextslide.fadeTo(options.transition_speed,1,function(){afterAnimation()});break;case 2:nextslide.animate({top:-$(window).height()},0).show().animate({top:0},options.transition_speed,function(){afterAnimation()});break;case 3:nextslide.animate({left:$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});
+break;case 4:nextslide.animate({top:$(window).height()},0).show().animate({top:0},options.transition_speed,function(){afterAnimation()});break;case 5:nextslide.animate({left:-$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});break;case 6:nextslide.animate({left:$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});currentslide.animate({left:-$(window).width()},options.transition_speed);break;case 7:nextslide.animate({left:-$(window).width()},
+0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});currentslide.animate({left:$(window).width()},options.transition_speed);break}}$.supersized.next=nextslide;function prevslide(){if(inAnimation)return false;else inAnimation=true;var slides=options.slides;var currentslide=element.find(".activeslide");currentslide.removeClass("activeslide");if(currentslide.length==0)currentslide=$(element).find("a:first");var nextslide=currentslide.prev().length?currentslide.prev():$(element).find("a:last");
+var prevslide=nextslide.next().length?nextslide.next():$(element).find("a:first");$(".prevslide").removeClass("prevslide");prevslide.addClass("prevslide");currentSlide==0?currentSlide=slides.length-1:currentSlide--;if(options.performance==1)element.removeClass("quality").addClass("speed");loadSlide=false;currentSlide-1<0?loadSlide=slides.length-1:loadSlide=currentSlide-1;imageLink=options.slides[loadSlide].url?"href='"+options.slides[loadSlide].url+"'":"";$("<img/>").attr("src",options.slides[loadSlide].image).prependTo(element).wrap("<a "+
+imageLink+linkTarget+"></a>");if(options.thumbnail_navigation==1){prevThumb=loadSlide;$("#prevthumb").html($("<img/>").attr("src",options.slides[prevThumb].image));currentSlide==slides.length-1?nextThumb=0:nextThumb=currentSlide+1;$("#nextthumb").html($("<img/>").attr("src",options.slides[nextThumb].image))}currentslide.next().remove();if(options.slide_counter)$("#slidecounter .slidenumber").html(currentSlide+1);if(options.slide_captions)options.slides[currentSlide].title?$("#slidecaption").html(options.slides[currentSlide].title):
+$("#slidecaption").html("");nextslide.hide().addClass("activeslide");switch(options.transition){case 0:nextslide.show();inAnimation=false;break;case 1:nextslide.fadeTo(options.transition_speed,1,function(){afterAnimation()});break;case 2:nextslide.animate({top:$(window).height()},0).show().animate({top:0},options.transition_speed,function(){afterAnimation()});break;case 3:nextslide.animate({left:-$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});
+break;case 4:nextslide.animate({top:-$(window).height()},0).show().animate({top:0},options.transition_speed,function(){afterAnimation()});break;case 5:nextslide.animate({left:$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});break;case 6:nextslide.animate({left:-$(window).width()},0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});currentslide.animate({left:$(window).width()},options.transition_speed);break;case 7:nextslide.animate({left:$(window).width()},
+0).show().animate({left:0},options.transition_speed,function(){afterAnimation()});currentslide.animate({left:-$(window).width()},options.transition_speed);break}}$.supersized.prev=prevslide;function afterAnimation(){inAnimation=false;if(options.performance==1)element.removeClass("speed").addClass("quality");resizenow()}}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.