Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

3.2.1 Update

Fixed issue where Supersized loader wasn't displaying initially. Theme files unaffected.
  • Loading branch information...
commit 06e4f51b1afe44c7232d799fc3dd0eef10289ad1 1 parent 4b8434f
@samdunn samdunn authored
View
5 README.md
@@ -4,6 +4,11 @@ Documentation can be found on the official project page: [http://www.buildintern
*** Changelog ***
+6/27/11 - 3.2.1
+
+ *Fixed Supersized loader not displaying initially (theme files unaffected)
+ *Supersized project page now updated
+
6/20/11 - 3.2.0 Early Release
*Documentation, announcement post, and project page update to follow
View
4 core/core.html
@@ -4,7 +4,7 @@
<!--
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : Core 3.2.0
+ Version : Core 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -20,7 +20,7 @@
<link rel="stylesheet" href="css/supersized.core.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
- <script type="text/javascript" src="js/supersized.core.3.2.0.min.js"></script>
+ <script type="text/javascript" src="js/supersized.core.3.2.1.min.js"></script>
<script type="text/javascript">
View
6 core/css/supersized.core.css
@@ -1,7 +1,7 @@
/*
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : Core 3.2.0
+ Version : Core 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -11,9 +11,11 @@
*/
* { margin:0; padding:0; }
-body { background:#111; }
+body { background:#111; height:100%; }
img{ border:none; }
+ #supersized-loader { position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url(../img/progress.gif) no-repeat center center;}
+
#supersized { position:fixed; left:0; top:0; overflow:hidden; z-index:-999; height:100%; width:100%; }
#supersized img{ width:auto; height:auto; position:relative; outline:none; border:none; }
View
1  core/js/supersized.core.3.2.0.min.js
@@ -1 +0,0 @@
-(function(a){a(document).ready(function(){a("body").append('<div id="supersized"></div>')});a.supersized=function(b){var c="#supersized",d=this;d.$el=a(c);d.el=c;vars=a.supersized.vars;d.$el.data("supersized",d);api=d.$el.data("supersized");d.init=function(){a.supersized.vars.options=a.extend({},a.supersized.defaultOptions,b);d.options=a.supersized.vars.options;d._build()};d._build=function(){d._start()};d._start=function(){if(d.options.start_slide){vars.current_slide=d.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*d.options.slides.length)}var f=d.options.new_window?' target="_blank"':"";imageLink=(api.getField("url"))?"href='"+api.getField("url")+"'":"";var e=a('<img src="'+api.getField("image")+'"/>');e.appendTo(d.el).wrap('<a class="image-loading activeslide" '+imageLink+f+"></a>").css("visibility","hidden");e.load(function(){d._origDim(a(this));d.resizeNow();d.launch()});d.$el.css("visibility","hidden")};d.launch=function(){d.$el.css("visibility","visible");a(window).resize(function(){d.resizeNow()})};d.resizeNow=function(){return d.$el.each(function(){a("img",d.el).each(function(){thisSlide=a(this);var f=(thisSlide.data("origHeight")/thisSlide.data("origWidth")).toFixed(2);var e=d.$el.width(),h=d.$el.height(),i;if(d.options.fit_always){if((h/e)>f){g()}else{j()}}else{if((h<=d.options.min_height)&&(e<=d.options.min_width)){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j(true)}else{d.options.fit_portrait&&f>=1?j(true):g(true)}}else{if(e<=d.options.min_width){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j()}else{d.options.fit_portrait&&f>=1?j():g(true)}}else{if(h<=d.options.min_height){if((h/e)>f){d.options.fit_landscape&&f<1?g():j(true)}else{d.options.fit_portrait&&f>=1?j(true):g()}}else{if((h/e)>f){d.options.fit_landscape&&f<1?g():j()}else{d.options.fit_portrait&&f>=1?j():g()}}}}}function g(k){if(k){if(thisSlide.width()<e||thisSlide.width()<d.options.min_width){if(thisSlide.width()*f>=d.options.min_height){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}else{j()}}}else{if(d.options.min_height>=h&&!d.options.fit_landscape){if(e*f>=d.options.min_height||(e*f>=d.options.min_height&&f<=1)){thisSlide.width(e);thisSlide.height(e*f)}else{if(f>1){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{if(thisSlide.width()<e){thisSlide.width(e);thisSlide.height(thisSlide.width()*f)}}}}else{thisSlide.width(e);thisSlide.height(e*f)}}}function j(k){if(k){if(thisSlide.height()<h){if(thisSlide.height()/f>=d.options.min_width){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{g(true)}}}else{if(d.options.min_width>=e){if(h/f>=d.options.min_width||f>1){thisSlide.height(h);thisSlide.width(h/f)}else{if(f<=1){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}}}else{thisSlide.height(h);thisSlide.width(h/f)}}}if(thisSlide.parent().hasClass("image-loading")){a(".image-loading").removeClass("image-loading")}if(d.options.horizontal_center){a(this).css("left",(e-a(this).width())/2)}if(d.options.vertical_center){a(this).css("top",(h-a(this).height())/2)}});if(d.options.image_protect){a("img",d.el).bind("contextmenu mousedown",function(){return false})}return false})};d._origDim=function(e){e.data("origWidth",e.width()).data("origHeight",e.height()).css("visibility","visible")};d.getField=function(e){return d.options.slides[vars.current_slide][e]};d.init()};a.supersized.vars={current_slide:0,options:{}};a.supersized.defaultOptions={start_slide:1,new_window:1,image_protect:1,min_width:0,min_height:0,vertical_center:1,horizontal_center:1,fit_always:0,fit_portrait:1,fit_landscape:0};a.fn.supersized=function(b){return this.each(function(){(new a.supersized(b))})}})(jQuery);
View
5 core/js/supersized.core.3.2.0.js → core/js/supersized.core.3.2.1.js
@@ -1,7 +1,7 @@
/*
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : Core 3.2.0
+ Version : Core 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -15,7 +15,7 @@
/* Place Supersized Elements
----------------------------*/
$(document).ready(function() {
- $('body').append('<div id="supersized"></div>');
+ $('body').append('<div id="supersized-loader"></div><div id="supersized"></div>');
});
@@ -86,6 +86,7 @@
base.launch = function(){
base.$el.css('visibility','visible');
+ $('#supersized-loader').hide(); //Hide loading animation
// Adjust image when browser is resized
$(window).resize(function(){
View
13 core/js/supersized.core.3.2.1.min.js
@@ -0,0 +1,13 @@
+/*
+
+ Supersized - Fullscreen Slideshow jQuery Plugin
+ Version : Core 3.2.1
+ Site : www.buildinternet.com/project/supersized
+
+ Author : Sam Dunn
+ Company : One Mighty Roar (www.onemightyroar.com)
+ License : MIT License / GPL License
+
+*/
+
+(function(a){a(document).ready(function(){a("body").append('<div id="supersized-loader"></div><div id="supersized"></div>')});a.supersized=function(b){var c="#supersized",d=this;d.$el=a(c);d.el=c;vars=a.supersized.vars;d.$el.data("supersized",d);api=d.$el.data("supersized");d.init=function(){a.supersized.vars.options=a.extend({},a.supersized.defaultOptions,b);d.options=a.supersized.vars.options;d._build()};d._build=function(){d._start()};d._start=function(){if(d.options.start_slide){vars.current_slide=d.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*d.options.slides.length)}var f=d.options.new_window?' target="_blank"':"";imageLink=(api.getField("url"))?"href='"+api.getField("url")+"'":"";var e=a('<img src="'+api.getField("image")+'"/>');e.appendTo(d.el).wrap('<a class="image-loading activeslide" '+imageLink+f+"></a>").css("visibility","hidden");e.load(function(){d._origDim(a(this));d.resizeNow();d.launch()});d.$el.css("visibility","hidden")};d.launch=function(){d.$el.css("visibility","visible");a("#supersized-loader").hide();a(window).resize(function(){d.resizeNow()})};d.resizeNow=function(){return d.$el.each(function(){a("img",d.el).each(function(){thisSlide=a(this);var f=(thisSlide.data("origHeight")/thisSlide.data("origWidth")).toFixed(2);var e=d.$el.width(),h=d.$el.height(),i;if(d.options.fit_always){if((h/e)>f){g()}else{j()}}else{if((h<=d.options.min_height)&&(e<=d.options.min_width)){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j(true)}else{d.options.fit_portrait&&f>=1?j(true):g(true)}}else{if(e<=d.options.min_width){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j()}else{d.options.fit_portrait&&f>=1?j():g(true)}}else{if(h<=d.options.min_height){if((h/e)>f){d.options.fit_landscape&&f<1?g():j(true)}else{d.options.fit_portrait&&f>=1?j(true):g()}}else{if((h/e)>f){d.options.fit_landscape&&f<1?g():j()}else{d.options.fit_portrait&&f>=1?j():g()}}}}}function g(k){if(k){if(thisSlide.width()<e||thisSlide.width()<d.options.min_width){if(thisSlide.width()*f>=d.options.min_height){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}else{j()}}}else{if(d.options.min_height>=h&&!d.options.fit_landscape){if(e*f>=d.options.min_height||(e*f>=d.options.min_height&&f<=1)){thisSlide.width(e);thisSlide.height(e*f)}else{if(f>1){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{if(thisSlide.width()<e){thisSlide.width(e);thisSlide.height(thisSlide.width()*f)}}}}else{thisSlide.width(e);thisSlide.height(e*f)}}}function j(k){if(k){if(thisSlide.height()<h){if(thisSlide.height()/f>=d.options.min_width){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{g(true)}}}else{if(d.options.min_width>=e){if(h/f>=d.options.min_width||f>1){thisSlide.height(h);thisSlide.width(h/f)}else{if(f<=1){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}}}else{thisSlide.height(h);thisSlide.width(h/f)}}}if(thisSlide.parent().hasClass("image-loading")){a(".image-loading").removeClass("image-loading")}if(d.options.horizontal_center){a(this).css("left",(e-a(this).width())/2)}if(d.options.vertical_center){a(this).css("top",(h-a(this).height())/2)}});if(d.options.image_protect){a("img",d.el).bind("contextmenu mousedown",function(){return false})}return false})};d._origDim=function(e){e.data("origWidth",e.width()).data("origHeight",e.height()).css("visibility","visible")};d.getField=function(e){return d.options.slides[vars.current_slide][e]};d.init()};a.supersized.vars={current_slide:0,options:{}};a.supersized.defaultOptions={start_slide:1,new_window:1,image_protect:1,min_width:0,min_height:0,vertical_center:1,horizontal_center:1,fit_always:0,fit_portrait:1,fit_landscape:0};a.fn.supersized=function(b){return this.each(function(){(new a.supersized(b))})}})(jQuery);
View
4 core/random.html
@@ -4,7 +4,7 @@
<!--
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : Core 3.2.0
+ Version : Core 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -20,7 +20,7 @@
<link rel="stylesheet" href="css/supersized.core.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
- <script type="text/javascript" src="js/supersized.core.3.2.0.min.js"></script>
+ <script type="text/javascript" src="js/supersized.core.3.2.1.min.js"></script>
<script type="text/javascript">
View
4 slideshow/css/supersized.css
@@ -2,7 +2,7 @@
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : 3.2.0
+ Version : 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
Company : One Mighty Roar (www.onemightyroar.com)
@@ -14,6 +14,8 @@
body { background:#111; height:100%; }
img{ border:none; }
+ #supersized-loader { position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url(../img/progress.gif) no-repeat center center;}
+
#supersized { position:fixed; left:0; top:0; overflow:hidden; z-index:-999; height:100%; width:100%; }
#supersized img{ width:auto; height:auto; position:relative; display:none; outline:none; border:none; }
#supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/
View
4 slideshow/demo.html
@@ -4,7 +4,7 @@
<!--
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : 3.2.0
+ Version : 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -23,7 +23,7 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
- <script type="text/javascript" src="js/supersized.3.2.0.min.js"></script>
+ <script type="text/javascript" src="js/supersized.3.2.1.min.js"></script>
<script type="text/javascript" src="theme/supersized.shutter.min.js"></script>
<script type="text/javascript">
View
4 slideshow/fade.html
@@ -4,7 +4,7 @@
<!--
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : 3.2.0
+ Version : 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -23,7 +23,7 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
- <script type="text/javascript" src="js/supersized.3.2.0.min.js"></script>
+ <script type="text/javascript" src="js/supersized.3.2.1.min.js"></script>
<script type="text/javascript" src="theme/supersized.shutter.min.js"></script>
<script type="text/javascript">
View
14 slideshow/js/supersized.3.2.0.min.js
@@ -1,14 +0,0 @@
-/*
-
- Supersized - Fullscreen Slideshow jQuery Plugin
- Version : 3.2.0
- Site : www.buildinternet.com/project/supersized
-
- Theme : Shutter
- Author : Sam Dunn
- Company : One Mighty Roar (www.onemightyroar.com)
- License : MIT License / GPL License
-
-*/
-
-(function(a){a(document).ready(function(){a("body").append('<div id="supersized"></div>')});a.supersized=function(b){var c="#supersized",d=this;d.$el=a(c);d.el=c;vars=a.supersized.vars;d.$el.data("supersized",d);api=d.$el.data("supersized");d.init=function(){a.supersized.vars=a.extend(a.supersized.vars,a.supersized.themeVars);a.supersized.vars.options=a.extend({},a.supersized.defaultOptions,a.supersized.themeOptions,b);d.options=a.supersized.vars.options;d._build()};d._build=function(){var f=0,i="",g,e="",h;while(f<=d.options.slides.length-1){switch(d.options.slide_links){case"num":g=f;break;case"name":g=d.options.slides[f].title;break;case"blank":g="";break}if(f==d.options.start_slide-1){if(d.options.slide_links){i=i+'<li class="slide'+f+' current-slide"><a>'+g+"</a></li>"}if(d.options.thumb_links){d.options.slides[f].thumb?h=d.options.slides[f].thumb:h=d.options.slides[f].image;e=e+'<li class="thumb'+f+' current-thumb"><img src="'+h+'"/></li>'}}else{if(d.options.slide_links){i=i+'<li class="slide'+f+'"><a>'+g+"</a></li>"}if(d.options.thumb_links){d.options.slides[f].thumb?h=d.options.slides[f].thumb:h=d.options.slides[f].image;e=e+'<li class="thumb'+f+'"><img src="'+h+'"/></li>'}}f++}if(d.options.slide_links){a(vars.slide_list).html(i)}if(d.options.thumb_links&&vars.thumb_tray.length){a(vars.thumb_tray).append('<ul id="'+vars.thumb_list.replace("#","")+'"></ul>');a(vars.thumb_list).html(e)}if(d.options.thumbnail_navigation){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).show().html(a("<img/>").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).show().html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}d._start()};d._start=function(){if(d.options.start_slide){vars.current_slide=d.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*d.options.slides.length)}var n=d.options.new_window?' target="_blank"':"";if(d.options.performance==3){d.$el.addClass("speed")}else{if((d.options.performance==1)||(d.options.performance==2)){d.$el.addClass("quality")}}if(d.options.random){arr=d.options.slides;for(var g,e,h=arr.length;h;g=parseInt(Math.random()*h),e=arr[--h],arr[h]=arr[g],arr[g]=e){}d.options.slides=arr}if(d.options.slides.length>1){vars.current_slide-1<0?loadPrev=d.options.slides.length-1:loadPrev=vars.current_slide-1;var m=(d.options.slides[loadPrev].url)?"href='"+d.options.slides[loadPrev].url+"'":"";var l=a('<img src="'+d.options.slides[loadPrev].image+'"/>');l.appendTo(d.el).wrap('<a class="image-loading" '+m+n+"></a>");l.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}else{d.options.slideshow=0}m=(api.getField("url"))?"href='"+api.getField("url")+"'":"";var f=a('<img src="'+api.getField("image")+'"/>');f.appendTo(d.el).wrap('<a class="image-loading activeslide" '+m+n+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow();d.launch();if(typeof theme!="undefined"&&typeof theme._init=="function"){theme._init()}});if(d.options.slides.length>1){vars.current_slide==d.options.slides.length-1?loadNext=0:loadNext=vars.current_slide+1;m=(d.options.slides[loadNext].url)?"href='"+d.options.slides[loadNext].url+"'":"";var k=a('<img src="'+d.options.slides[loadNext].image+'"/>');k.appendTo(d.el).wrap('<a class="image-loading" '+m+n+"></a>");k.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}d.$el.css("visibility","hidden");a(".load-item").hide()};d.launch=function(){d.$el.css("visibility","visible");if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}a(".load-item").show();if(d.options.keyboard_nav){a(document.documentElement).keyup(function(e){if(vars.in_animation){return false}if((e.keyCode==37)||(e.keyCode==40)){clearInterval(vars.slideshow_interval);d.prevSlide()}else{if((e.keyCode==39)||(e.keyCode==38)){clearInterval(vars.slideshow_interval);d.nextSlide()}else{if(e.keyCode==32&&!vars.hover_pause){clearInterval(vars.slideshow_interval);d.playToggle()}}}})}if(d.options.slideshow&&d.options.pause_hover){a(d.el).hover(function(){if(vars.in_animation){return false}vars.hover_pause=true;if(!vars.is_paused){vars.hover_pause="resume";d.playToggle()}},function(){if(vars.hover_pause=="resume"){d.playToggle();vars.hover_pause=false}})}if(d.options.slide_links){a("li",vars.slide_list).click(function(){index=a("li",vars.slide_list).index(this);targetSlide=index+1;d.goTo(targetSlide);return false})}if(d.options.thumb_links){a("li",vars.thumb_list).click(function(){index=a("li",vars.thumb_list).index(this);targetSlide=index+1;api.goTo(targetSlide);return false})}if(d.options.slideshow&&d.options.slides.length>1){if(d.options.autoplay&&d.options.slides.length>1){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true}a(".load-item img").bind("contextmenu mousedown",function(){return false})}a(window).resize(function(){d.resizeNow()})};d.resizeNow=function(){return d.$el.each(function(){a("img",d.el).each(function(){thisSlide=a(this);var f=(thisSlide.data("origHeight")/thisSlide.data("origWidth")).toFixed(2);var e=d.$el.width(),h=d.$el.height(),i;if(d.options.fit_always){if((h/e)>f){g()}else{j()}}else{if((h<=d.options.min_height)&&(e<=d.options.min_width)){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j(true)}else{d.options.fit_portrait&&f>=1?j(true):g(true)}}else{if(e<=d.options.min_width){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j()}else{d.options.fit_portrait&&f>=1?j():g(true)}}else{if(h<=d.options.min_height){if((h/e)>f){d.options.fit_landscape&&f<1?g():j(true)}else{d.options.fit_portrait&&f>=1?j(true):g()}}else{if((h/e)>f){d.options.fit_landscape&&f<1?g():j()}else{d.options.fit_portrait&&f>=1?j():g()}}}}}function g(k){if(k){if(thisSlide.width()<e||thisSlide.width()<d.options.min_width){if(thisSlide.width()*f>=d.options.min_height){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}else{j()}}}else{if(d.options.min_height>=h&&!d.options.fit_landscape){if(e*f>=d.options.min_height||(e*f>=d.options.min_height&&f<=1)){thisSlide.width(e);thisSlide.height(e*f)}else{if(f>1){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{if(thisSlide.width()<e){thisSlide.width(e);thisSlide.height(thisSlide.width()*f)}}}}else{thisSlide.width(e);thisSlide.height(e*f)}}}function j(k){if(k){if(thisSlide.height()<h){if(thisSlide.height()/f>=d.options.min_width){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{g(true)}}}else{if(d.options.min_width>=e){if(h/f>=d.options.min_width||f>1){thisSlide.height(h);thisSlide.width(h/f)}else{if(f<=1){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}}}else{thisSlide.height(h);thisSlide.width(h/f)}}}if(thisSlide.parent().hasClass("image-loading")){a(".image-loading").removeClass("image-loading")}if(d.options.horizontal_center){a(this).css("left",(e-a(this).width())/2)}if(d.options.vertical_center){a(this).css("top",(h-a(this).height())/2)}});if(d.options.image_protect){a("img",d.el).bind("contextmenu mousedown",function(){return false})}return false})};d.nextSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");e.removeClass("activeslide");if(e.length==0){e=d.$el.find("a:last")}var g=e.next().length?e.next():d.$el.find("a:first"),i=g.prev().length?g.prev():d.$el.find("a:last");i.addClass("prevslide");vars.current_slide+1==d.options.slides.length?vars.current_slide=0:vars.current_slide++;if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=false;var j=d.options.new_window?' target="_blank"':"";vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.appendTo(d.el).wrap('<a class="image-loading" '+imageLink+j+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()});if(d.options.thumbnail_navigation==1){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).html(a("<img/>").attr("src",d.options.slides[prevThumb].image));nextThumb=loadSlide;a(vars.next_thumb).html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}e.prev().remove();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a("li",vars.slide_list).eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.prevSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");e.removeClass("activeslide");if(e.length==0){e=d.$el.find("a:first")}var g=e.prev().length?e.prev():d.$el.find("a:last"),i=g.next().length?g.next():d.$el.find("a:first");i.addClass("prevslide");vars.current_slide==0?vars.current_slide=d.options.slides.length-1:vars.current_slide--;if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=false;var j=d.options.new_window?' target="_blank"':"";vars.current_slide-1<0?loadSlide=d.options.slides.length-1:loadSlide=vars.current_slide-1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.prependTo(d.el).wrap('<a class="image-loading" '+imageLink+j+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()});if(d.options.thumbnail_navigation==1){prevThumb=loadSlide;a(vars.prev_thumb).html(a("<img/>").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}e.next().remove();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("prev")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a("li",vars.slide_list).eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;d.afterAnimation();break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.playToggle=function(){if(vars.in_animation||!api.options.slideshow){return false}if(vars.is_paused){vars.is_paused=false;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("play")}vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("pause")}clearInterval(vars.slideshow_interval)}return false};d.goTo=function(f){if(vars.in_animation||!api.options.slideshow){return false}var e=d.options.slides.length;vars.update_images=true;if(f<0){f=e}else{if(f>e){f=1}}f=e-f+1;clearInterval(vars.slideshow_interval);if(typeof theme!="undefined"&&typeof theme.goTo=="function"){theme.goTo()}if(vars.current_slide==e-f){if(!(vars.is_paused)){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}return false}if(e-f>vars.current_slide){vars.current_slide=e-f-1;d._placeSlide("next")}else{if(e-f<vars.current_slide){vars.current_slide=e-f+1;d._placeSlide("prev")}}if(d.options.slide_links){a(".current-slide",vars.slide_list).removeClass("current-slide");a("li",vars.slide_list).eq((e-f)).addClass("current-slide")}if(d.options.thumb_links){a(".current-thumb",vars.thumb_list).removeClass("current-thumb");a("li",vars.thumb_list).eq((e-f)).addClass("current-thumb")}};d._placeSlide=function(e){var g=d.options.new_window?' target="_blank"':"";if(e=="next"){a(".activeslide").next().remove();loadSlide=false;vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.appendTo(d.el).wrap('<a class="image-loading" '+imageLink+g+"></a>").css("visibility","hidden");if(vars.update_images){d.nextSlide()}f.load(function(){d._origDim(a(this));d.resizeNow()})}else{if(e=="prev"){a(".activeslide").prev().remove();loadSlide=false;vars.current_slide-1<0?loadSlide=d.options.slides.length-1:loadSlide=vars.current_slide-1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.prependTo(d.el).wrap('<a class="image-loading" '+imageLink+g+"></a>").css("visibility","hidden");if(vars.update_images){d.prevSlide()}f.load(function(){d._origDim(a(this));d.resizeNow()})}}};d._origDim=function(e){e.data("origWidth",e.width()).data("origHeight",e.height()).css("visibility","visible")};d.afterAnimation=function(){if(d.options.performance==1){d.$el.removeClass("speed").addClass("quality")}if(vars.update_images){vars.update_images=false;d._placeSlide("next");d._placeSlide("prev")}vars.in_animation=false;if(!vars.is_paused&&d.options.slideshow){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval);if(d.options.stop_loop&&vars.current_slide==d.options.slides.length-1){d.playToggle()}}if(typeof theme!="undefined"&&typeof theme.afterAnimation=="function"){theme.afterAnimation()}return false};d.getField=function(e){return d.options.slides[vars.current_slide][e]};d.init()};a.supersized.vars={thumb_tray:"#thumb-tray",thumb_list:"#thumb-list",current_slide:0,in_animation:false,is_paused:false,hover_pause:false,slideshow_interval:false,update_images:false,options:{}};a.supersized.defaultOptions={slideshow:1,autoplay:1,start_slide:1,stop_loop:0,random:0,slide_interval:5000,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,fit_always:0,fit_landscape:0,fit_portrait:1,min_width:0,min_height:0,horizontal_center:1,vertical_center:1,slide_links:1,thumb_links:1,thumbnail_navigation:0};a.fn.supersized=function(b){return this.each(function(){(new a.supersized(b))})}})(jQuery);
View
910 slideshow/js/supersized.3.2.1.js
@@ -0,0 +1,910 @@
+/*
+
+ Supersized - Fullscreen Slideshow jQuery Plugin
+ Version : 3.2.1
+ Site : www.buildinternet.com/project/supersized
+
+ Author : Sam Dunn
+ Company : One Mighty Roar (www.onemightyroar.com)
+ License : MIT License / GPL License
+
+*/
+
+(function($){
+
+ /* Place Supersized Elements
+ ----------------------------*/
+ $(document).ready(function() {
+ $('body').append('<div id="supersized-loader"></div><div id="supersized"></div>');
+ });
+
+
+ $.supersized = function(options){
+
+ /* Variables
+ ----------------------------*/
+ var el = '#supersized',
+ base = this;
+ // Access to jQuery and DOM versions of element
+ base.$el = $(el);
+ base.el = el;
+ vars = $.supersized.vars;
+ // Add a reverse reference to the DOM object
+ base.$el.data("supersized", base);
+ api = base.$el.data('supersized');
+
+ base.init = function(){
+ // Combine options and vars
+ $.supersized.vars = $.extend($.supersized.vars, $.supersized.themeVars);
+ $.supersized.vars.options = $.extend({},$.supersized.defaultOptions, $.supersized.themeOptions, options);
+ base.options = $.supersized.vars.options;
+
+ base._build();
+ };
+
+
+ /* Build Elements
+ ----------------------------*/
+ base._build = function(){
+ // Add in slide markers
+ var thisSlide = 0,
+ markers = '',
+ markerContent,
+ thumbMarkers = '',
+ thumbImage;
+
+ while(thisSlide <= base.options.slides.length-1){
+ //Determine slide link content
+ switch(base.options.slide_links){
+ case 'num':
+ markerContent = thisSlide;
+ break;
+ case 'name':
+ markerContent = base.options.slides[thisSlide].title;
+ break;
+ case 'blank':
+ markerContent = '';
+ break;
+ }
+
+ if(thisSlide == base.options.start_slide-1){
+ // Slide links
+ if (base.options.slide_links)markers = markers+'<li class="slide'+thisSlide+' current-slide"><a>'+markerContent+'</a></li>';
+ // Slide Thumbnail Links
+ if (base.options.thumb_links){
+ base.options.slides[thisSlide].thumb ? thumbImage = base.options.slides[thisSlide].thumb : thumbImage = base.options.slides[thisSlide].image;
+ thumbMarkers = thumbMarkers+'<li class="thumb'+thisSlide+' current-thumb"><img src="'+thumbImage+'"/></li>';
+ };
+ }else{
+ // Slide links
+ if (base.options.slide_links) markers = markers+'<li class="slide'+thisSlide+'"><a>'+markerContent+'</a></li>';
+ // Slide Thumbnail Links
+ if (base.options.thumb_links){
+ base.options.slides[thisSlide].thumb ? thumbImage = base.options.slides[thisSlide].thumb : thumbImage = base.options.slides[thisSlide].image;
+ thumbMarkers = thumbMarkers+'<li class="thumb'+thisSlide+'"><img src="'+thumbImage+'"/></li>';
+ };
+ }
+ thisSlide++;
+ }
+ if (base.options.slide_links) $(vars.slide_list).html(markers);
+ if (base.options.thumb_links && vars.thumb_tray.length){
+ $(vars.thumb_tray).append('<ul id="'+vars.thumb_list.replace('#','')+'"></ul>');
+ $(vars.thumb_list).html(thumbMarkers);
+ }
+
+ // Add in thumbnails
+ if (base.options.thumbnail_navigation){
+ // Load previous thumbnail
+ vars.current_slide - 1 < 0 ? prevThumb = base.options.slides.length - 1 : prevThumb = vars.current_slide - 1;
+ $(vars.prev_thumb).show().html($("<img/>").attr("src", base.options.slides[prevThumb].image));
+
+ // Load next thumbnail
+ vars.current_slide == base.options.slides.length - 1 ? nextThumb = 0 : nextThumb = vars.current_slide + 1;
+ $(vars.next_thumb).show().html($("<img/>").attr("src", base.options.slides[nextThumb].image));
+ }
+
+ base._start(); // Get things started
+ };
+
+
+ /* Initialize
+ ----------------------------*/
+ base._start = function(){
+
+ // Determine if starting slide random
+ if (base.options.start_slide){
+ vars.current_slide = base.options.start_slide - 1;
+ }else{
+ vars.current_slide = Math.floor(Math.random()*base.options.slides.length); // Generate random slide number
+ }
+
+ // If links should open in new window
+ var linkTarget = base.options.new_window ? ' target="_blank"' : '';
+
+ // Set slideshow quality (Supported only in FF and IE, no Webkit)
+ if (base.options.performance == 3){
+ base.$el.addClass('speed'); // Faster transitions
+ } else if ((base.options.performance == 1) || (base.options.performance == 2)){
+ base.$el.addClass('quality'); // Higher image quality
+ }
+
+ // Shuffle slide order if needed
+ if (base.options.random){
+ arr = base.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); // Fisher-Yates shuffle algorithm (jsfromhell.com/array/shuffle)
+ base.options.slides = arr;
+ }
+
+ /*-----Load initial set of images-----*/
+
+ if (base.options.slides.length > 1){
+ // Set previous image
+ vars.current_slide - 1 < 0 ? loadPrev = base.options.slides.length - 1 : loadPrev = vars.current_slide - 1; // If slide is 1, load last slide as previous
+ var imageLink = (base.options.slides[loadPrev].url) ? "href='" + base.options.slides[loadPrev].url + "'" : "";
+
+ var imgPrev = $('<img src="'+base.options.slides[loadPrev].image+'"/>');
+ imgPrev.appendTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>');
+
+ imgPrev.load(function(){
+ $(this).data('origWidth', $(this).width()).data('origHeight', $(this).height());
+ base.resizeNow(); // Resize background image
+ }); // End Load
+ } else {
+ // Slideshow turned off if there is only one slide
+ base.options.slideshow = 0;
+ }
+
+ // Set current image
+ imageLink = (api.getField('url')) ? "href='" + api.getField('url') + "'" : "";
+ var img = $('<img src="'+api.getField('image')+'"/>');
+ img.appendTo(base.el).wrap('<a class="image-loading activeslide" ' + imageLink + linkTarget + '></a>').css('visibility','hidden');
+
+ img.load(function(){
+ base._origDim($(this));
+ base.resizeNow(); // Resize background image
+ base.launch();
+ if( typeof theme != 'undefined' && typeof theme._init == "function" ) theme._init(); // Load Theme
+ });
+
+ if (base.options.slides.length > 1){
+ // Set next image
+ vars.current_slide == base.options.slides.length - 1 ? loadNext = 0 : loadNext = vars.current_slide + 1; // If slide is last, load first slide as next
+ imageLink = (base.options.slides[loadNext].url) ? "href='" + base.options.slides[loadNext].url + "'" : "";
+
+ var imgNext = $('<img src="'+base.options.slides[loadNext].image+'"/>');
+ imgNext.appendTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>');
+
+ imgNext.load(function(){
+ $(this).data('origWidth', $(this).width()).data('origHeight', $(this).height());
+ base.resizeNow(); // Resize background image
+ }); // End Load
+ }
+ /*-----End load initial images-----*/
+
+ // Hide elements to be faded in
+ base.$el.css('visibility','hidden');
+ $('.load-item').hide();
+
+ };
+
+
+ /* Launch Supersized
+ ----------------------------*/
+ base.launch = function(){
+
+ base.$el.css('visibility','visible');
+ $('#supersized-loader').hide(); //Hide loading animation
+
+ // Call theme function for before slide transition
+ if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('next');
+ $('.load-item').show();
+
+ // Keyboard Navigation
+ if (base.options.keyboard_nav){
+ $(document.documentElement).keyup(function (event) {
+
+ if(vars.in_animation) return false; // Abort if currently animating
+
+ // Left Arrow or Down Arrow
+ if ((event.keyCode == 37) || (event.keyCode == 40)) {
+ clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup
+ base.prevSlide();
+
+ // Right Arrow or Up Arrow
+ } else if ((event.keyCode == 39) || (event.keyCode == 38)) {
+ clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup
+ base.nextSlide();
+
+ // Spacebar
+ } else if (event.keyCode == 32 && !vars.hover_pause) {
+ clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup
+ base.playToggle();
+ }
+
+ });
+ }
+
+ // Pause when hover on image
+ if (base.options.slideshow && base.options.pause_hover){
+ $(base.el).hover(function() {
+ if(vars.in_animation) return false; // Abort if currently animating
+ vars.hover_pause = true; // Mark slideshow paused from hover
+ if(!vars.is_paused){
+ vars.hover_pause = 'resume'; // It needs to resume afterwards
+ base.playToggle();
+ }
+ }, function() {
+ if(vars.hover_pause == 'resume'){
+ base.playToggle();
+ vars.hover_pause = false;
+ }
+ });
+ }
+
+ if (base.options.slide_links){
+ // Slide marker clicked
+ $('li', vars.slide_list).click(function(){
+
+ index = $('li', vars.slide_list).index(this);
+ targetSlide = index + 1;
+
+ base.goTo(targetSlide);
+ return false;
+
+ });
+ }
+
+ // Thumb marker clicked
+ if (base.options.thumb_links){
+ $('li', vars.thumb_list).click(function(){
+
+ index = $('li', vars.thumb_list).index(this);
+ targetSlide = index + 1;
+
+ api.goTo(targetSlide);
+ return false;
+
+ });
+ }
+
+ // Start slideshow if enabled
+ if (base.options.slideshow && base.options.slides.length > 1){
+
+ // Start slideshow if autoplay enabled
+ if (base.options.autoplay && base.options.slides.length > 1){
+ vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval); // Initiate slide interval
+ }else{
+ vars.is_paused = true; // Mark as paused
+ }
+
+ //Prevent navigation items from being dragged
+ $('.load-item img').bind("contextmenu mousedown",function(){
+ return false;
+ });
+
+ }
+
+ // Adjust image when browser is resized
+ $(window).resize(function(){
+ base.resizeNow();
+ });
+
+ };
+
+
+ /* Resize Images
+ ----------------------------*/
+ base.resizeNow = function(){
+
+ return base.$el.each(function() {
+ // Resize each image seperately
+ $('img', base.el).each(function(){
+
+ thisSlide = $(this);
+ var ratio = (thisSlide.data('origHeight')/thisSlide.data('origWidth')).toFixed(2); // Define image ratio
+
+ // Gather browser size
+ var browserwidth = base.$el.width(),
+ browserheight = base.$el.height(),
+ offset;
+
+ /*-----Resize Image-----*/
+ if (base.options.fit_always){ // Fit always is enabled
+ if ((browserheight/browserwidth) > ratio){
+ resizeWidth();
+ } else {
+ resizeHeight();
+ }
+ }else{ // Normal Resize
+ if ((browserheight <= base.options.min_height) && (browserwidth <= base.options.min_width)){ // If window smaller than minimum width and height
+
+ if ((browserheight/browserwidth) > ratio){
+ base.options.fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight(true); // If landscapes are set to fit
+ } else {
+ base.options.fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth(true); // If portraits are set to fit
+ }
+
+ } else if (browserwidth <= base.options.min_width){ // If window only smaller than minimum width
+
+ if ((browserheight/browserwidth) > ratio){
+ base.options.fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight(); // If landscapes are set to fit
+ } else {
+ base.options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(true); // If portraits are set to fit
+ }
+
+ } else if (browserheight <= base.options.min_height){ // If window only smaller than minimum height
+
+ if ((browserheight/browserwidth) > ratio){
+ base.options.fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight(true); // If landscapes are set to fit
+ } else {
+ base.options.fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth(); // If portraits are set to fit
+ }
+
+ } else { // If larger than minimums
+
+ if ((browserheight/browserwidth) > ratio){
+ base.options.fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight(); // If landscapes are set to fit
+ } else {
+ base.options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(); // If portraits are set to fit
+ }
+
+ }
+ }
+ /*-----End Image Resize-----*/
+
+
+ /*-----Resize Functions-----*/
+
+ function resizeWidth(minimum){
+ if (minimum){ // If minimum height needs to be considered
+ if(thisSlide.width() < browserwidth || thisSlide.width() < base.options.min_width ){
+ if (thisSlide.width() * ratio >= base.options.min_height){
+ thisSlide.width(base.options.min_width);
+ thisSlide.height(thisSlide.width() * ratio);
+ }else{
+ resizeHeight();
+ }
+ }
+ }else{
+ if (base.options.min_height >= browserheight && !base.options.fit_landscape){ // If minimum height needs to be considered
+ if (browserwidth * ratio >= base.options.min_height || (browserwidth * ratio >= base.options.min_height && ratio <= 1)){ // If resizing would push below minimum height or image is a landscape
+ thisSlide.width(browserwidth);
+ thisSlide.height(browserwidth * ratio);
+ } else if (ratio > 1){ // Else the image is portrait
+ thisSlide.height(base.options.min_height);
+ thisSlide.width(thisSlide.height() / ratio);
+ } else if (thisSlide.width() < browserwidth) {
+ thisSlide.width(browserwidth);
+ thisSlide.height(thisSlide.width() * ratio);
+ }
+ }else{ // Otherwise, resize as normal
+ thisSlide.width(browserwidth);
+ thisSlide.height(browserwidth * ratio);
+ }
+ }
+ };
+
+ function resizeHeight(minimum){
+ if (minimum){ // If minimum height needs to be considered
+ if(thisSlide.height() < browserheight){
+ if (thisSlide.height() / ratio >= base.options.min_width){
+ thisSlide.height(base.options.min_height);
+ thisSlide.width(thisSlide.height() / ratio);
+ }else{
+ resizeWidth(true);
+ }
+ }
+ }else{ // Otherwise, resized as normal
+ if (base.options.min_width >= browserwidth){ // If minimum width needs to be considered
+ if (browserheight / ratio >= base.options.min_width || ratio > 1){ // If resizing would push below minimum width or image is a portrait
+ thisSlide.height(browserheight);
+ thisSlide.width(browserheight / ratio);
+ } else if (ratio <= 1){ // Else the image is landscape
+ thisSlide.width(base.options.min_width);
+ thisSlide.height(thisSlide.width() * ratio);
+ }
+ }else{ // Otherwise, resize as normal
+ thisSlide.height(browserheight);
+ thisSlide.width(browserheight / ratio);
+ }
+ }
+ };
+
+ /*-----End Resize Functions-----*/
+
+ if (thisSlide.parent().hasClass('image-loading')){
+ $('.image-loading').removeClass('image-loading');
+ }
+
+ // Horizontally Center
+ if (base.options.horizontal_center){
+ $(this).css('left', (browserwidth - $(this).width())/2);
+ }
+
+ // Vertically Center
+ if (base.options.vertical_center){
+ $(this).css('top', (browserheight - $(this).height())/2);
+ }
+
+ });
+
+ // Basic image drag and right click protection
+ if (base.options.image_protect){
+
+ $('img', base.el).bind("contextmenu mousedown",function(){
+ return false;
+ });
+
+ }
+
+ return false;
+
+ });
+
+ };
+
+
+ /* Next Slide
+ ----------------------------*/
+ base.nextSlide = function(){
+
+ if(vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating
+ else vars.in_animation = true; // Otherwise set animation marker
+
+ clearInterval(vars.slideshow_interval); // Stop slideshow
+
+ var slides = base.options.slides, // Pull in slides array
+ liveslide = base.$el.find('.activeslide'); // Find active slide
+ liveslide.removeClass('activeslide'); // Remove active class
+
+ if ( liveslide.length == 0 ) liveslide = base.$el.find('a:last'); // If end of set, note this is last slide
+ var nextslide = liveslide.next().length ? liveslide.next() : base.$el.find('a:first'),
+ prevslide = nextslide.prev().length ? nextslide.prev() : base.$el.find('a:last');
+
+ // Update previous slide
+ prevslide.addClass('prevslide');
+
+ // Get the slide number of new slide
+ vars.current_slide + 1 == base.options.slides.length ? vars.current_slide = 0 : vars.current_slide++;
+
+ // If hybrid mode is on drop quality for transition
+ if (base.options.performance == 1) base.$el.removeClass('quality').addClass('speed');
+
+
+ /*-----Load Image-----*/
+
+ loadSlide = false;
+ // If links should open in new window
+ var linkTarget = base.options.new_window ? ' target="_blank"' : '';
+
+ vars.current_slide == base.options.slides.length - 1 ? loadSlide = 0 : loadSlide = vars.current_slide + 1; // Determine next slide
+ imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it
+
+ var img = $('<img src="'+base.options.slides[loadSlide].image+'"/>');
+ img.appendTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>').css('visibility','hidden');
+
+ img.load(function(){
+ base._origDim($(this));
+ base.resizeNow();
+ }); // End Load
+
+ // Update thumbnails (if enabled)
+ if (base.options.thumbnail_navigation == 1){
+
+ // Load previous thumbnail
+ vars.current_slide - 1 < 0 ? prevThumb = base.options.slides.length - 1 : prevThumb = vars.current_slide - 1;
+ $(vars.prev_thumb).html($("<img/>").attr("src", base.options.slides[prevThumb].image));
+
+ // Load next thumbnail
+ nextThumb = loadSlide;
+ $(vars.next_thumb).html($("<img/>").attr("src", base.options.slides[nextThumb].image));
+
+ }
+
+ liveslide.prev().remove(); // Remove Old Image
+
+ /*-----End Load Image-----*/
+
+
+ // Call theme function for before slide transition
+ if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('next');
+
+ //Update slide markers
+ if (base.options.slide_links){
+ $('.current-slide').removeClass('current-slide');
+ $('li', vars.slide_list).eq(vars.current_slide).addClass('current-slide');
+ }
+
+ nextslide.css('visibility','hidden').addClass('activeslide'); // Update active slide
+
+ switch(base.options.transition){
+ case 0: case 'none': // No transition
+ nextslide.css('visibility','visible');
+ vars.in_animation = false;
+ break;
+ case 1: case 'fade': // Fade
+ nextslide.animate({opacity : 0},0).css('visibility','visible').animate({opacity : 1, avoidTransforms : false}, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 2: case 'slideTop': // Slide Top
+ nextslide.animate({top : -base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 3: case 'slideRight': // Slide Right
+ nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 4: case 'slideBottom': // Slide Bottom
+ nextslide.animate({top : base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 5: case 'slideLeft': // Slide Left
+ nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 6: case 'carouselRight': // Carousel Right
+ nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ liveslide.animate({ left: -base.$el.width(), avoidTransforms : false }, base.options.transition_speed );
+ break;
+ case 7: case 'carouselLeft': // Carousel Left
+ nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ liveslide.animate({ left: base.$el.width(), avoidTransforms : false }, base.options.transition_speed );
+ break;
+ }
+ return false;
+ };
+
+
+ /* Previous Slide
+ ----------------------------*/
+ base.prevSlide = function(){
+
+ if(vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating
+ else vars.in_animation = true; // Otherwise set animation marker
+
+ clearInterval(vars.slideshow_interval); // Stop slideshow
+
+ var slides = base.options.slides, // Pull in slides array
+ liveslide = base.$el.find('.activeslide'); // Find active slide
+ liveslide.removeClass('activeslide'); // Remove active class
+
+ if ( liveslide.length == 0 ) liveslide = base.$el.find('a:first'); // If end of set, note this is first slide
+ var nextslide = liveslide.prev().length ? liveslide.prev() : base.$el.find('a:last'),
+ prevslide = nextslide.next().length ? nextslide.next() : base.$el.find('a:first');
+
+ // Update previous slide
+ prevslide.addClass('prevslide');
+
+ // Get current slide number
+ vars.current_slide == 0 ? vars.current_slide = base.options.slides.length - 1 : vars.current_slide-- ;
+
+ // If hybrid mode is on drop quality for transition
+ if (base.options.performance == 1) base.$el.removeClass('quality').addClass('speed');
+
+
+ /*-----Load Image-----*/
+
+ loadSlide = false;
+ // If links should open in new window
+ var linkTarget = base.options.new_window ? ' target="_blank"' : '';
+
+ vars.current_slide - 1 < 0 ? loadSlide = base.options.slides.length - 1 : loadSlide = vars.current_slide - 1; // Determine next slide
+ imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it
+
+ var img = $('<img src="'+base.options.slides[loadSlide].image+'"/>');
+ img.prependTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>').css('visibility','hidden');
+
+ img.load(function(){
+ base._origDim($(this));
+ base.resizeNow();
+ }); // End Load
+
+ // Update thumbnails (if enabled)
+ if (base.options.thumbnail_navigation == 1){
+
+ // Load previous thumbnail
+ prevThumb = loadSlide;
+ $(vars.prev_thumb).html($("<img/>").attr("src", base.options.slides[prevThumb].image));
+
+ // Load next thumbnail
+ vars.current_slide == base.options.slides.length - 1 ? nextThumb = 0 : nextThumb = vars.current_slide + 1;
+ $(vars.next_thumb).html($("<img/>").attr("src", base.options.slides[nextThumb].image));
+ }
+
+ liveslide.next().remove(); // Remove Old Image
+
+ /*-----End Load Image-----*/
+
+
+ // Call theme function for before slide transition
+ if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('prev');
+
+ //Update slide markers
+ if (base.options.slide_links){
+ $('.current-slide').removeClass('current-slide');
+ $('li', vars.slide_list).eq(vars.current_slide).addClass('current-slide');
+ }
+
+ nextslide.css('visibility','hidden').addClass('activeslide'); // Update active slide
+
+ switch(base.options.transition){
+ case 0: case 'none': // No transition
+ nextslide.css('visibility','visible'); vars.in_animation = false; base.afterAnimation();
+ break;
+ case 1: case 'fade': // Fade
+ nextslide.animate({opacity : 0},0).css('visibility','visible').animate({opacity : 1, avoidTransforms : false}, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 2: case 'slideTop': // Slide Top (reverse)
+ nextslide.animate({top : base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 3: case 'slideRight': // Slide Right (reverse)
+ nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 4: case 'slideBottom': // Slide Bottom (reverse)
+ nextslide.animate({top : -base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 5: case 'slideLeft': // Slide Left (reverse)
+ nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ break;
+ case 6: case 'carouselRight': // Carousel Right (reverse)
+ nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ liveslide.animate({left : 0}, 0 ).animate({ left: base.$el.width(), avoidTransforms : false}, base.options.transition_speed );
+ break;
+ case 7: case 'carouselLeft': // Carousel Left (reverse)
+ nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); });
+ liveslide.animate({left : 0}, 0 ).animate({ left: -base.$el.width(), avoidTransforms : false }, base.options.transition_speed );
+ break;
+ }
+ return false;
+ };
+
+
+ /* Play/Pause Toggle
+ ----------------------------*/
+ base.playToggle = function(){
+
+ if (vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating
+
+ if (vars.is_paused){
+
+ vars.is_paused = false;
+
+ // Call theme function for play
+ if( typeof theme != 'undefined' && typeof theme.playToggle == "function" ) theme.playToggle('play');
+
+ // Resume slideshow
+ vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval);
+
+ }else{
+
+ vars.is_paused = true;
+
+ // Call theme function for pause
+ if( typeof theme != 'undefined' && typeof theme.playToggle == "function" ) theme.playToggle('pause');
+
+ // Stop slideshow
+ clearInterval(vars.slideshow_interval);
+
+ }
+
+ return false;
+
+ };
+
+
+ /* Go to specific slide
+ ----------------------------*/
+ base.goTo = function(targetSlide){
+
+ if (vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating
+
+ var totalSlides = base.options.slides.length;
+ vars.update_images = true;
+
+ // If target outside range
+ if(targetSlide < 0){
+ targetSlide = totalSlides;
+ }else if(targetSlide > totalSlides){
+ targetSlide = 1;
+ }
+ targetSlide = totalSlides - targetSlide + 1;
+
+ clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup
+
+ // Call theme function for goTo trigger
+ if (typeof theme != 'undefined' && typeof theme.goTo == "function" ) theme.goTo();
+
+ if (vars.current_slide == totalSlides - targetSlide){
+ if(!(vars.is_paused)){
+ vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval);
+ }
+ return false;
+ }
+
+ // If ahead of current position
+ if(totalSlides - targetSlide > vars.current_slide ){
+
+ // Adjust for new next slide
+ vars.current_slide = totalSlides-targetSlide-1;
+ base._placeSlide('next');
+
+ //Otherwise it's before current position
+ }else if(totalSlides - targetSlide < vars.current_slide){
+
+ // Adjust for new prev slide
+ vars.current_slide = totalSlides-targetSlide+1;
+ base._placeSlide('prev');
+
+ }
+
+ // set active markers
+ if (base.options.slide_links){
+ $('.current-slide', vars.slide_list).removeClass('current-slide');
+ $('li', vars.slide_list).eq((totalSlides-targetSlide)).addClass('current-slide');
+ }
+
+ if (base.options.thumb_links){
+ $('.current-thumb', vars.thumb_list).removeClass('current-thumb');
+ $('li', vars.thumb_list).eq((totalSlides-targetSlide)).addClass('current-thumb');
+ }
+
+ };
+
+
+ /* Place Slide
+ ----------------------------*/
+ base._placeSlide = function(place){
+
+ // If links should open in new window
+ var linkTarget = base.options.new_window ? ' target="_blank"' : '';
+
+ if (place == 'next'){
+
+ // Remove slide to be replaced
+ $('.activeslide').next().remove();
+
+ loadSlide = false;
+ vars.current_slide == base.options.slides.length - 1 ? loadSlide = 0 : loadSlide = vars.current_slide + 1; // Determine next slide
+ imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it
+
+ var img = $('<img src="'+base.options.slides[loadSlide].image+'"/>');
+ img.appendTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>').css('visibility','hidden');
+
+ if (vars.update_images) base.nextSlide();
+
+ img.load(function(){
+ base._origDim($(this));
+ base.resizeNow();
+ }); // End Load
+
+ }else if (place == 'prev'){
+
+ // Remove slide to be replaced
+ $('.activeslide').prev().remove();
+
+ loadSlide = false;
+
+ vars.current_slide - 1 < 0 ? loadSlide = base.options.slides.length - 1 : loadSlide = vars.current_slide - 1; // Determine next slide
+ imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it
+
+ var img = $('<img src="'+base.options.slides[loadSlide].image+'"/>');
+ img.prependTo(base.el).wrap('<a class="image-loading" ' + imageLink + linkTarget + '></a>').css('visibility','hidden');
+
+
+ if (vars.update_images) base.prevSlide();
+
+ img.load(function(){
+ base._origDim($(this));
+ base.resizeNow();
+ }); // End Load
+ }
+
+ };
+
+
+ /* Get Original Dimensions
+ ----------------------------*/
+ base._origDim = function(targetSlide){
+ targetSlide.data('origWidth', targetSlide.width()).data('origHeight', targetSlide.height()).css('visibility','visible');
+ };
+
+
+ /* After Slide Animation
+ ----------------------------*/
+ base.afterAnimation = function(){
+
+ // If hybrid mode is on swap back to higher image quality
+ if (base.options.performance == 1){
+ base.$el.removeClass('speed').addClass('quality');
+ }
+
+ if (vars.update_images){
+ vars.update_images = false;
+ base._placeSlide('next');
+ base._placeSlide('prev');
+ }
+
+ vars.in_animation = false;
+
+ // Resume slideshow
+ if (!vars.is_paused && base.options.slideshow){
+ vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval);
+ if (base.options.stop_loop && vars.current_slide == base.options.slides.length - 1 ) base.playToggle();
+ }
+
+
+ // Call theme function for after slide transition
+ if (typeof theme != 'undefined' && typeof theme.afterAnimation == "function" ) theme.afterAnimation();
+
+ return false;
+
+ };
+
+ base.getField = function(field){
+ return base.options.slides[vars.current_slide][field];
+ };
+
+ // Make it go!
+ base.init();
+ };
+
+
+ /* Global Variables
+ ----------------------------*/
+ $.supersized.vars = {
+
+ // Elements
+ thumb_tray : '#thumb-tray', //Thumbnail tray
+ thumb_list : '#thumb-list', //Thumbnail list
+
+ // Internal variables
+ current_slide : 0, // Current slide number
+ in_animation : false, // Prevents animations from stacking
+ is_paused : false, // Tracks paused on/off
+ hover_pause : false, // If slideshow is paused from hover
+ slideshow_interval : false, // Stores slideshow timer
+ update_images : false, // Trigger to update images after slide jump
+ options : {} // Stores assembled options list
+
+ };
+
+
+ /* Default Options
+ ----------------------------*/
+ $.supersized.defaultOptions = {
+
+ // Functionality
+ slideshow : 1, // Slideshow on/off
+ autoplay : 1, // Slideshow starts playing automatically
+ start_slide : 1, // Start slide (0 is random)
+ stop_loop : 0, // Stops slideshow on last slide
+ random : 0, // Randomize slide order (Ignores start slide)
+ slide_interval : 5000, // Length between transitions
+ transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
+ transition_speed : 750, // Speed of transition
+ new_window : 1, // Image links open in new window/tab
+ pause_hover : 0, // Pause slideshow on hover
+ keyboard_nav : 1, // Keyboard navigation on/off
+ performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
+ image_protect : 1, // Disables image dragging and right click with Javascript
+
+ // Size & Position
+ fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions)
+ fit_landscape : 0, // Landscape images will not exceed browser width
+ fit_portrait : 1, // Portrait images will not exceed browser height
+ min_width : 0, // Min width allowed (in pixels)
+ min_height : 0, // Min height allowed (in pixels)
+ horizontal_center : 1, // Horizontally center background
+ vertical_center : 1, // Vertically center background
+
+
+ // Components
+ slide_links : 1, // Individual links for each slide
+ thumb_links : 1, // Individual thumb links for each slide
+ thumbnail_navigation : 0 // Thumbnail navigation
+
+ };
+
+ $.fn.supersized = function(options){
+ return this.each(function(){
+ (new $.supersized(options));
+ });
+ };
+
+})(jQuery);
+
View
13 slideshow/js/supersized.3.2.1.min.js
@@ -0,0 +1,13 @@
+/*
+
+ Supersized - Fullscreen Slideshow jQuery Plugin
+ Version : 3.2.1
+ Site : www.buildinternet.com/project/supersized
+
+ Author : Sam Dunn
+ Company : One Mighty Roar (www.onemightyroar.com)
+ License : MIT License / GPL License
+
+*/
+
+(function(a){a(document).ready(function(){a("body").append('<div id="supersized-loader"></div><div id="supersized"></div>')});a.supersized=function(b){var c="#supersized",d=this;d.$el=a(c);d.el=c;vars=a.supersized.vars;d.$el.data("supersized",d);api=d.$el.data("supersized");d.init=function(){a.supersized.vars=a.extend(a.supersized.vars,a.supersized.themeVars);a.supersized.vars.options=a.extend({},a.supersized.defaultOptions,a.supersized.themeOptions,b);d.options=a.supersized.vars.options;d._build()};d._build=function(){var f=0,i="",g,e="",h;while(f<=d.options.slides.length-1){switch(d.options.slide_links){case"num":g=f;break;case"name":g=d.options.slides[f].title;break;case"blank":g="";break}if(f==d.options.start_slide-1){if(d.options.slide_links){i=i+'<li class="slide'+f+' current-slide"><a>'+g+"</a></li>"}if(d.options.thumb_links){d.options.slides[f].thumb?h=d.options.slides[f].thumb:h=d.options.slides[f].image;e=e+'<li class="thumb'+f+' current-thumb"><img src="'+h+'"/></li>'}}else{if(d.options.slide_links){i=i+'<li class="slide'+f+'"><a>'+g+"</a></li>"}if(d.options.thumb_links){d.options.slides[f].thumb?h=d.options.slides[f].thumb:h=d.options.slides[f].image;e=e+'<li class="thumb'+f+'"><img src="'+h+'"/></li>'}}f++}if(d.options.slide_links){a(vars.slide_list).html(i)}if(d.options.thumb_links&&vars.thumb_tray.length){a(vars.thumb_tray).append('<ul id="'+vars.thumb_list.replace("#","")+'"></ul>');a(vars.thumb_list).html(e)}if(d.options.thumbnail_navigation){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).show().html(a("<img/>").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).show().html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}d._start()};d._start=function(){if(d.options.start_slide){vars.current_slide=d.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*d.options.slides.length)}var n=d.options.new_window?' target="_blank"':"";if(d.options.performance==3){d.$el.addClass("speed")}else{if((d.options.performance==1)||(d.options.performance==2)){d.$el.addClass("quality")}}if(d.options.random){arr=d.options.slides;for(var g,e,h=arr.length;h;g=parseInt(Math.random()*h),e=arr[--h],arr[h]=arr[g],arr[g]=e){}d.options.slides=arr}if(d.options.slides.length>1){vars.current_slide-1<0?loadPrev=d.options.slides.length-1:loadPrev=vars.current_slide-1;var m=(d.options.slides[loadPrev].url)?"href='"+d.options.slides[loadPrev].url+"'":"";var l=a('<img src="'+d.options.slides[loadPrev].image+'"/>');l.appendTo(d.el).wrap('<a class="image-loading" '+m+n+"></a>");l.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}else{d.options.slideshow=0}m=(api.getField("url"))?"href='"+api.getField("url")+"'":"";var f=a('<img src="'+api.getField("image")+'"/>');f.appendTo(d.el).wrap('<a class="image-loading activeslide" '+m+n+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow();d.launch();if(typeof theme!="undefined"&&typeof theme._init=="function"){theme._init()}});if(d.options.slides.length>1){vars.current_slide==d.options.slides.length-1?loadNext=0:loadNext=vars.current_slide+1;m=(d.options.slides[loadNext].url)?"href='"+d.options.slides[loadNext].url+"'":"";var k=a('<img src="'+d.options.slides[loadNext].image+'"/>');k.appendTo(d.el).wrap('<a class="image-loading" '+m+n+"></a>");k.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}d.$el.css("visibility","hidden");a(".load-item").hide()};d.launch=function(){d.$el.css("visibility","visible");a("#supersized-loader").hide();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}a(".load-item").show();if(d.options.keyboard_nav){a(document.documentElement).keyup(function(e){if(vars.in_animation){return false}if((e.keyCode==37)||(e.keyCode==40)){clearInterval(vars.slideshow_interval);d.prevSlide()}else{if((e.keyCode==39)||(e.keyCode==38)){clearInterval(vars.slideshow_interval);d.nextSlide()}else{if(e.keyCode==32&&!vars.hover_pause){clearInterval(vars.slideshow_interval);d.playToggle()}}}})}if(d.options.slideshow&&d.options.pause_hover){a(d.el).hover(function(){if(vars.in_animation){return false}vars.hover_pause=true;if(!vars.is_paused){vars.hover_pause="resume";d.playToggle()}},function(){if(vars.hover_pause=="resume"){d.playToggle();vars.hover_pause=false}})}if(d.options.slide_links){a("li",vars.slide_list).click(function(){index=a("li",vars.slide_list).index(this);targetSlide=index+1;d.goTo(targetSlide);return false})}if(d.options.thumb_links){a("li",vars.thumb_list).click(function(){index=a("li",vars.thumb_list).index(this);targetSlide=index+1;api.goTo(targetSlide);return false})}if(d.options.slideshow&&d.options.slides.length>1){if(d.options.autoplay&&d.options.slides.length>1){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true}a(".load-item img").bind("contextmenu mousedown",function(){return false})}a(window).resize(function(){d.resizeNow()})};d.resizeNow=function(){return d.$el.each(function(){a("img",d.el).each(function(){thisSlide=a(this);var f=(thisSlide.data("origHeight")/thisSlide.data("origWidth")).toFixed(2);var e=d.$el.width(),h=d.$el.height(),i;if(d.options.fit_always){if((h/e)>f){g()}else{j()}}else{if((h<=d.options.min_height)&&(e<=d.options.min_width)){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j(true)}else{d.options.fit_portrait&&f>=1?j(true):g(true)}}else{if(e<=d.options.min_width){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j()}else{d.options.fit_portrait&&f>=1?j():g(true)}}else{if(h<=d.options.min_height){if((h/e)>f){d.options.fit_landscape&&f<1?g():j(true)}else{d.options.fit_portrait&&f>=1?j(true):g()}}else{if((h/e)>f){d.options.fit_landscape&&f<1?g():j()}else{d.options.fit_portrait&&f>=1?j():g()}}}}}function g(k){if(k){if(thisSlide.width()<e||thisSlide.width()<d.options.min_width){if(thisSlide.width()*f>=d.options.min_height){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}else{j()}}}else{if(d.options.min_height>=h&&!d.options.fit_landscape){if(e*f>=d.options.min_height||(e*f>=d.options.min_height&&f<=1)){thisSlide.width(e);thisSlide.height(e*f)}else{if(f>1){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{if(thisSlide.width()<e){thisSlide.width(e);thisSlide.height(thisSlide.width()*f)}}}}else{thisSlide.width(e);thisSlide.height(e*f)}}}function j(k){if(k){if(thisSlide.height()<h){if(thisSlide.height()/f>=d.options.min_width){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{g(true)}}}else{if(d.options.min_width>=e){if(h/f>=d.options.min_width||f>1){thisSlide.height(h);thisSlide.width(h/f)}else{if(f<=1){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}}}else{thisSlide.height(h);thisSlide.width(h/f)}}}if(thisSlide.parent().hasClass("image-loading")){a(".image-loading").removeClass("image-loading")}if(d.options.horizontal_center){a(this).css("left",(e-a(this).width())/2)}if(d.options.vertical_center){a(this).css("top",(h-a(this).height())/2)}});if(d.options.image_protect){a("img",d.el).bind("contextmenu mousedown",function(){return false})}return false})};d.nextSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");e.removeClass("activeslide");if(e.length==0){e=d.$el.find("a:last")}var g=e.next().length?e.next():d.$el.find("a:first"),i=g.prev().length?g.prev():d.$el.find("a:last");i.addClass("prevslide");vars.current_slide+1==d.options.slides.length?vars.current_slide=0:vars.current_slide++;if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=false;var j=d.options.new_window?' target="_blank"':"";vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.appendTo(d.el).wrap('<a class="image-loading" '+imageLink+j+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()});if(d.options.thumbnail_navigation==1){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).html(a("<img/>").attr("src",d.options.slides[prevThumb].image));nextThumb=loadSlide;a(vars.next_thumb).html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}e.prev().remove();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a("li",vars.slide_list).eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.prevSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");e.removeClass("activeslide");if(e.length==0){e=d.$el.find("a:first")}var g=e.prev().length?e.prev():d.$el.find("a:last"),i=g.next().length?g.next():d.$el.find("a:first");i.addClass("prevslide");vars.current_slide==0?vars.current_slide=d.options.slides.length-1:vars.current_slide--;if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=false;var j=d.options.new_window?' target="_blank"':"";vars.current_slide-1<0?loadSlide=d.options.slides.length-1:loadSlide=vars.current_slide-1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.prependTo(d.el).wrap('<a class="image-loading" '+imageLink+j+"></a>").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()});if(d.options.thumbnail_navigation==1){prevThumb=loadSlide;a(vars.prev_thumb).html(a("<img/>").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).html(a("<img/>").attr("src",d.options.slides[nextThumb].image))}e.next().remove();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("prev")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a("li",vars.slide_list).eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;d.afterAnimation();break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.playToggle=function(){if(vars.in_animation||!api.options.slideshow){return false}if(vars.is_paused){vars.is_paused=false;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("play")}vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("pause")}clearInterval(vars.slideshow_interval)}return false};d.goTo=function(f){if(vars.in_animation||!api.options.slideshow){return false}var e=d.options.slides.length;vars.update_images=true;if(f<0){f=e}else{if(f>e){f=1}}f=e-f+1;clearInterval(vars.slideshow_interval);if(typeof theme!="undefined"&&typeof theme.goTo=="function"){theme.goTo()}if(vars.current_slide==e-f){if(!(vars.is_paused)){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}return false}if(e-f>vars.current_slide){vars.current_slide=e-f-1;d._placeSlide("next")}else{if(e-f<vars.current_slide){vars.current_slide=e-f+1;d._placeSlide("prev")}}if(d.options.slide_links){a(".current-slide",vars.slide_list).removeClass("current-slide");a("li",vars.slide_list).eq((e-f)).addClass("current-slide")}if(d.options.thumb_links){a(".current-thumb",vars.thumb_list).removeClass("current-thumb");a("li",vars.thumb_list).eq((e-f)).addClass("current-thumb")}};d._placeSlide=function(e){var g=d.options.new_window?' target="_blank"':"";if(e=="next"){a(".activeslide").next().remove();loadSlide=false;vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.appendTo(d.el).wrap('<a class="image-loading" '+imageLink+g+"></a>").css("visibility","hidden");if(vars.update_images){d.nextSlide()}f.load(function(){d._origDim(a(this));d.resizeNow()})}else{if(e=="prev"){a(".activeslide").prev().remove();loadSlide=false;vars.current_slide-1<0?loadSlide=d.options.slides.length-1:loadSlide=vars.current_slide-1;imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('<img src="'+d.options.slides[loadSlide].image+'"/>');f.prependTo(d.el).wrap('<a class="image-loading" '+imageLink+g+"></a>").css("visibility","hidden");if(vars.update_images){d.prevSlide()}f.load(function(){d._origDim(a(this));d.resizeNow()})}}};d._origDim=function(e){e.data("origWidth",e.width()).data("origHeight",e.height()).css("visibility","visible")};d.afterAnimation=function(){if(d.options.performance==1){d.$el.removeClass("speed").addClass("quality")}if(vars.update_images){vars.update_images=false;d._placeSlide("next");d._placeSlide("prev")}vars.in_animation=false;if(!vars.is_paused&&d.options.slideshow){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval);if(d.options.stop_loop&&vars.current_slide==d.options.slides.length-1){d.playToggle()}}if(typeof theme!="undefined"&&typeof theme.afterAnimation=="function"){theme.afterAnimation()}return false};d.getField=function(e){return d.options.slides[vars.current_slide][e]};d.init()};a.supersized.vars={thumb_tray:"#thumb-tray",thumb_list:"#thumb-list",current_slide:0,in_animation:false,is_paused:false,hover_pause:false,slideshow_interval:false,update_images:false,options:{}};a.supersized.defaultOptions={slideshow:1,autoplay:1,start_slide:1,stop_loop:0,random:0,slide_interval:5000,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,fit_always:0,fit_landscape:0,fit_portrait:1,min_width:0,min_height:0,horizontal_center:1,vertical_center:1,slide_links:1,thumb_links:1,thumbnail_navigation:0};a.fn.supersized=function(b){return this.each(function(){(new a.supersized(b))})}})(jQuery);
View
4 slideshow/slide.html
@@ -4,7 +4,7 @@
<!--
Supersized - Fullscreen Slideshow jQuery Plugin
- Version : 3.2.0
+ Version : 3.2.1
Site : www.buildinternet.com/project/supersized
Author : Sam Dunn
@@ -23,7 +23,7 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
- <script type="text/javascript" src="js/supersized.3.2.0.min.js"></script>
+ <script type="text/javascript" src="js/supersized.3.2.1.min.js"></script>
<script type="text/javascript" src="theme/supersized.shutter.min.js"></script>
<script type="text/javascript">
View
2  slideshow/theme/supersized.shutter.js
@@ -196,7 +196,7 @@
/* Go To Slide
----------------------------*/
- goTo : function(state){
+ goTo : function(){
if (api.options.progress_bar && !vars.is_paused){
$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 );
theme.progressBar();
Please sign in to comment.
Something went wrong with that request. Please try again.