/** * Capture Slideshow Minified - A jQuery plugin for fullscreen slideshow functionality in the Capture WordPress theme. * * License: GPL2 * Copyright Scott Sousa (Slocum Studio), https://slocumthemes.com/ */ !function(e){"use strict" function t(e){var t,s return t={orig_height:parseInt(e.attr("height"),10),orig_width:parseInt(e.attr("width"),10),smaller_than_window:!1},t.aspect_ratio=t.orig_width/t.orig_height,t.aspect_ratio=t.aspect_ratio.toFixed(2),s={aspect_ratio:p.width()/p.height()},s.aspect_ratio=s.aspect_ratio.toFixed(2),p.width()>t.orig_width&&p.height()>t.orig_height&&(e.css({position:"absolute",top:(p.height()-e.height())/2+"px",left:(p.width()-e.width())/2+"px",width:"auto",height:"auto"}),t.smaller_than_window=!0),s.aspect_ratio!==t.aspect_ratio||t.smaller_than_window||e.css({width:p.width(),height:p.height(),top:0,left:0}),s.aspect_ratio>t.aspect_ratio&&!t.smaller_than_window&&e.css({width:"auto",height:p.height(),top:0,left:(p.width()-p.height()*t.aspect_ratio)/2+"px"}),s.aspect_ratio2?5:2,e(this).data("capture-slideshow.clicks",s),d.capture_slideshow_elements.$next.removeClass("disabled"),void(0!==d.collection.indexOf(d.collection.getModel())?(d.collection.prevModel(),d.capture_slideshow_elements.$img.removeClass("loaded").fadeOut(400,function(){d.render()}),d.collection.getModel().attributes.hasOwnProperty("no_more_images")&&e(this).addClass("disabled")):(d.capture_slideshow_elements.$ui_elements.addClass("hidden hide initial-hide"),d.capture_slideshow_elements.$loader.removeClass("hidden hide"),d.capture_slideshow_elements.$img.removeClass("loaded").fadeOut(400,function(){d.getImages(l,function(){0!==d.collection.indexOf(d.collection.getModel())&&(d.collection.prevModel(),d.render(),d.collection.getModel().attributes.hasOwnProperty("no_more_images")&&i.addClass("disabled"))})}))))}),d.capture_slideshow_elements.$next.on("click.capture-slideshow",function(t){var s,l,i=e(this) return t.preventDefault(),e(this).hasClass("disabled")?!1:(s=parseInt(e(this).data("capture-slideshow.clicks"),10)||0,s++,l=s>2?5:2,e(this).data("capture-slideshow.clicks",s),d.capture_slideshow_elements.$prev.removeClass("disabled"),void(d.collection.indexOf(d.collection.getModel())!==d.collection.length-1?(d.collection.nextModel(),d.capture_slideshow_elements.$img.removeClass("loaded").fadeOut(400,function(){d.render()}),d.collection.getModel().attributes.hasOwnProperty("no_more_images")&&e(this).addClass("disabled")):(d.capture_slideshow_elements.$ui_elements.addClass("hidden hide initial-hide"),d.capture_slideshow_elements.$loader.removeClass("hidden hide"),d.capture_slideshow_elements.$img.removeClass("loaded").fadeOut(400,function(){d.getImages(l,function(){0!==d.collection.indexOf(d.collection.getModel())&&(d.collection.nextModel(),d.render(),d.collection.getModel().attributes.hasOwnProperty("no_more_images")&&i.addClass("disabled"))})}))))}),d.capture_slideshow_elements.$parent.on("mousemove.capture-slideshow",function(){return d.capture_slideshow_elements.$ui_elements?void(d.capture_slideshow_elements.$ui_elements.hasClass("initial-hide")||capture.is_mobile||(d.capture_slideshow_elements.$ui_elements.removeClass("hidden hide"),clearTimeout(m["capture-slideshow-mousemove"]),m["capture-slideshow-mousemove"]=setTimeout(function(){d.capture_slideshow_elements.$ui_elements.addClass("hidden hide")},2500))):!1}),d.capture_slideshow_elements.$parent.data("capture-slideshow","active")),this},e.fn.captureSlideshow.defaults={}}(jQuery)