suchow/Dissertate

View on GitHub
packages/Berkeley/Resources/Dissertation Writing and Filing Berkeley Graduate Division_files/portfolio-slideshow.min.js

Summary

Maintainability
A
0 mins
Test Coverage
/*!
 * jQuery imagesLoaded plugin v1.0.3
 * http://github.com/desandro/imagesloaded
 *
 * MIT License. by Paul Irish et al.
 */
(function(a,b){a.fn.imagesLoaded=function(i){var g=this,e=g.find("img").add(g.filter("img")),c=e.length,h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";function f(){i.call(g,e)}function d(){if(--c<=0&&this.src!==h){setTimeout(f);e.unbind("load error",d)}}if(!c){f()}e.bind("load error",d).each(function(){if(this.complete||this.complete===b){var j=this.src;
this.src=h;this.src=j}});return g}})(jQuery);
/*!
 * Portfolio Slideshow Pro
 */
(function(a){a(window).load(function(){var e,b,d;currSlide=new Array();var c=new Array();e=portfolioSlideshowOptions.psLoader;d=portfolioSlideshowOptions.psFluid;b=portfolioSlideshowOptions.psHash;if(navigator.userAgent.match(/msie/i)&&navigator.userAgent.match(/8/)){ie=true}else{ie=false}if(e===true){a(".slideshow-wrapper").delay(1000).queue(function(){a(".portfolio-slideshow, .slideshow-nav, .pager").css("visibility","visible");
a(this).removeClass("showloader")})}a("div[id^=portfolio-slideshow]").each(function(){var k=this.id.match(/portfolio-slideshow(\d+)/)[1];var i=a("#slideshow-wrapper"+k);var j=a("#slideshow-nav"+k);var p=a("#portfolio-slideshow"+k);var l=p.find(".slideshow-content img");var g=i.find(".show");var n=i.find(".hide");var o=i.find(".pscarousel");var h=j.find(".play");var m=j.find(".pause");var f=j.find(".restart");if(ie===true){i.addClass("ie")}if(psLoop[k]==true){c[k]=0}else{c[k]=true}a(function(){var t=0,u=window.location.hash;
if(/\d+/.exec(u)){t=/\d+/.exec(u)[0];t=(parseInt(t)||1)-1}a.fn.cycle.updateActivePagerLink=function(x,y){a(x).find("img").removeClass("activeSlide").filter("#pager"+k+" img:eq("+y+")").addClass("activeSlide")};function v(){p.cycle({fx:psTrans[k],speed:psSpeed[k],timeout:psTimeout[k],nowrap:c[k],next:"#slideshow-wrapper"+k+" a.slideshow-next, #slideshow-wrapper"+k+" #psnext"+k,startingSlide:t,prev:"#slideshow-wrapper"+k+" a.slideshow-prev , #slideshow-wrapper"+k+" #psprev"+k,before:w,after:q,end:s,slideExpr:".slideshow-content",manualTrump:true,slideResize:false,containerResize:false,pager:"#pager"+k,cleartypeNoBg:true,pagerAnchorBuilder:r})
}v();l.each(function(){a(this).attr("src",a(this).attr("data-img"))});if(psAutoplay[k]===false){p.cycle("pause")}else{h.fadeOut(100,function(){m.fadeIn(10)})}m.click(function(){a(this).fadeOut(100,function(){h.fadeIn(10)});p.cycle("pause")});h.click(function(){p.cycle("resume");a(this).fadeOut(100,function(){m.fadeIn(10)})});f.click(function(){a("#pager"+k+" .numbers").empty();a(this).fadeOut(100,function(){m.fadeIn(10)});v()});a(window).resize(function(){p.css("width","").css("height","");var x,y;
x=p.find(".slideshow-content").eq(currSlide[k]).outerHeight();y=p.find(".slideshow-content").eq(currSlide[k]).width();p.css("height",x).css("width",y)});function r(y,x){return"#pager"+k+" img:eq("+(y)+")"}function w(C,z,A){var y=a(this);var x,B;x=y.height();B=y.width();p.height(x).width(B);y.find("img").imagesLoaded(function(){var D,E;D=y.parents(".slideshow-content").height();E=y.parents(".slideshow-content").width();p.height(D).width(E)})}function q(D,A,B){var y=a(this);currSlide[k]=B.currSlide;
var x,C;x=y.height();C=y.width();if(ie===true){p.height(x).width(C)}if(psLoop[k]===false){if(B.currSlide===0){j.find(".slideshow-prev, .sep").addClass("inactive")}else{j.find(".slideshow-prev, .sep").removeClass("inactive")}if(B.currSlide===B.slideCount-1){j.find(".slideshow-next, .sep").addClass("inactive")}else{j.find(".slideshow-next").removeClass("inactive")}}if(b===true){window.location.hash=B.currSlide+1}var z=(B.currSlide+1)+" of "+B.slideCount;a(".slideshow-info"+k).html(z)}function s(){j.find(".slideshow-next, .sep").addClass("inactive");
m.hide();h.hide();f.show()}})})})})(jQuery);