/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */ (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;di||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;xMath.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(se.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)}); /* * Lightcase - jQuery Plugin * The smart and flexible Lightbox Plugin. * * @author Cornel Boppart * @copyright Author * * @version 2.3.4 (29/12/2015) */ !function(t){"use strict";var e={cache:{},support:{},objects:{},init:function(e){return this.each(function(){t(this).unbind("click.lightcase").bind("click.lightcase",function(i){i.preventDefault(),t(this).lightcase("start",e)})})},start:function(i){e.origin=lightcase.origin=this,e.settings=lightcase.settings=t.extend(!0,{idPrefix:"lightcase-",classPrefix:"lightcase-",attrPrefix:"lc-",transition:"elastic",transitionIn:null,transitionOut:null,cssTransitions:!0,speedIn:250,speedOut:250,maxWidth:800,maxHeight:500,forceWidth:!1,forceHeight:!1,liveResize:!0,fullScreenModeForMobile:!0,mobileMatchExpression:/(iphone|ipod|ipad|android|blackberry|symbian)/,disableShrink:!1,shrinkFactor:.75,overlayOpacity:.9,slideshow:!1,timeout:5e3,swipe:!0,useKeys:!0,useCategories:!0,navigateEndless:!0,closeOnOverlayClick:!0,title:null,caption:null,showTitle:!0,showCaption:!0,showSequenceInfo:!0,inline:{width:"auto",height:"auto"},ajax:{width:"auto",height:"auto",type:"get",dataType:"html",data:{}},iframe:{width:800,height:500,frameborder:0},flash:{width:400,height:205,wmode:"transparent"},video:{width:400,height:225,poster:"",preload:"auto",controls:!0,autobuffer:!0,autoplay:!0,loop:!1},attr:"data-rel",href:null,type:null,typeMapping:{image:"jpg,jpeg,gif,png,bmp",flash:"swf",video:"mp4,mov,ogv,ogg,webm",iframe:"html,php",ajax:"json,txt",inline:"#"},errorMessage:function(){return'

'+e.settings.labels.errorMessage+"

"},labels:{errorMessage:"Source could not be found...","sequenceInfo.of":" of ",close:"Close","navigator.prev":"Prev","navigator.next":"Next","navigator.play":"Play","navigator.pause":"Pause"},markup:function(){t("body").append(e.objects.overlay=t('
'),e.objects.loading=t('
'),e.objects["case"]=t('')),e.objects["case"].after(e.objects.nav=t('
')),e.objects.nav.append(e.objects.close=t(''+e.settings.labels.close+""),e.objects.prev=t(''+e.settings.labels["navigator.prev"]+"").hide(),e.objects.next=t(''+e.settings.labels["navigator.next"]+"").hide(),e.objects.play=t(''+e.settings.labels["navigator.play"]+"").hide(),e.objects.pause=t(''+e.settings.labels["navigator.pause"]+"").hide()),e.objects["case"].append(e.objects.content=t('
'),e.objects.info=t('
')),e.objects.content.append(e.objects.contentInner=t('
')),e.objects.info.append(e.objects.sequenceInfo=t('
'),e.objects.title=t('

'),e.objects.caption=t('

'))},onInit:{},onStart:{},onFinish:{},onClose:{},onCleanup:{}},i),e._callHooks(e.settings.onInit),e.objectData=e._setObjectData(this),e._cacheScrollPosition(),e._watchScrollInteraction(),e._addElements(),e._open(),e.dimensions=e.getViewportDimensions()},get:function(t){return e.objects[t]},getObjectData:function(){return e.objectData},_setObjectData:function(i){var s=t(i),n={title:e.settings.title||s.attr(e._prefixAttributeName("title"))||s.attr("title"),caption:e.settings.caption||s.attr(e._prefixAttributeName("caption"))||s.attr('data-caption'),url:e._determineUrl(),requestType:e.settings.ajax.type,requestData:e.settings.ajax.data,requestDataType:e.settings.ajax.dataType,rel:s.attr(e._determineAttributeSelector()),type:e.settings.type||e._verifyDataType(e._determineUrl()),isPartOfSequence:e._isPartOfSequence(s.attr(e.settings.attr),":"),isPartOfSequenceWithSlideshow:e._isPartOfSequence(s.attr(e.settings.attr),":slideshow"),currentIndex:t(e._determineAttributeSelector()).index(s),sequenceLength:t(e._determineAttributeSelector()).length};return n.sequenceInfo=n.currentIndex+1+e.settings.labels["sequenceInfo.of"]+n.sequenceLength,n.prevIndex=n.currentIndex-1,n.nextIndex=n.currentIndex+1,n},_prefixAttributeName:function(t){return"data-"+e.settings.attrPrefix+t},_determineLinkTarget:function(){return e.settings.href||t(e.origin).attr(e._prefixAttributeName("href"))||t(e.origin).attr("href")},_determineAttributeSelector:function(){var i=t(e.origin),s="";if("undefined"!=typeof e.cache.selector)s=e.cache.selector;else if(e.settings.useCategories===!0&&i.attr(e._prefixAttributeName("categories"))){var n=i.attr(e._prefixAttributeName("categories")).split(" ");t.each(n,function(t,i){t>0&&(s+=","),s+="["+e._prefixAttributeName("categories")+'~="'+i+'"]'})}else s="["+e.settings.attr+'="'+i.attr(e.settings.attr)+'"]';return e.cache.selector=s,s},_determineUrl:function(){var i,s=e._verifyDataUrl(e._determineLinkTarget()),n=0,a=0;return t.each(s,function(t,s){e._devicePixelRatio()>=s.density&&s.density>=a&&e._matchMedia()("screen and (min-width:"+s.width+"px)")&&s.width>=n&&(n=s.width,a=s.density,i=s.url)}),i},_normalizeUrl:function(t){var e=/^\d+$/;return t.split(",").map(function(t){var i={width:0,density:0};return t.trim().split(/\s+/).forEach(function(t,s){if(0===s)return i.url=t;var n=t.substring(0,t.length-1),a=t[t.length-1],o=parseInt(n,10),c=parseFloat(n);"w"===a&&e.test(n)?i.width=o:"h"===a&&e.test(n)?i.height=o:"x"!==a||isNaN(c)||(i.density=c)}),i})},_isPartOfSequence:function(i,s){var n=t("["+e.settings.attr+'="'+i+'"]'),a=new RegExp(s);return a.test(i)&&n.length>1},isSlideshowEnabled:function(){return e.objectData.isPartOfSequence&&(e.settings.slideshow===!0||e.objectData.isPartOfSequenceWithSlideshow===!0)},_loadContent:function(){e.cache.originalObject&&e._restoreObject(),e._createObject()},_createObject:function(){var i;switch(e.objectData.type){case"image":i=t(new Image),i.attr({src:e.objectData.url,alt:e.objectData.title});break;case"inline":i=t('
'),i.html(e._cloneObject(t(e.objectData.url))),t.each(e.settings.inline,function(t,s){i.attr(e._prefixAttributeName(t),s)});break;case"ajax":i=t('
'),t.each(e.settings.ajax,function(t,s){"data"!==t&&i.attr(e._prefixAttributeName(t),s)});break;case"flash":i=t(''),t.each(e.settings.flash,function(t,e){i.attr(t,e)});break;case"video":i=t(""),i.attr("src",e.objectData.url),t.each(e.settings.video,function(t,e){i.attr(t,e)});break;default:i=t(""),i.attr({src:e.objectData.url}),t.each(e.settings.iframe,function(t,e){i.attr(t,e)})}e._addObject(i),e._loadObject(i)},_addObject:function(t){e.objects.contentInner.html(t),e._loading("start"),e._callHooks(e.settings.onStart),e.settings.showSequenceInfo===!0&&e.objectData.isPartOfSequence?(e.objects.sequenceInfo.html(e.objectData.sequenceInfo),e.objects.sequenceInfo.show()):(e.objects.sequenceInfo.empty(),e.objects.sequenceInfo.hide()),e.settings.showTitle===!0&&void 0!==e.objectData.title&&""!==e.objectData.title?(e.objects.title.html(e.objectData.title),e.objects.title.show()):(e.objects.title.empty(),e.objects.title.hide()),e.settings.showCaption===!0&&void 0!==e.objectData.caption&&""!==e.objectData.caption?(e.objects.caption.html(e.objectData.caption),e.objects.caption.show()):(e.objects.caption.empty(),e.objects.caption.hide())},_loadObject:function(i){switch(e.objectData.type){case"inline":t(e.objectData.url)?e._showContent(i):e.error();break;case"ajax":t.ajax(t.extend({},e.settings.ajax,{url:e.objectData.url,type:e.objectData.requestType,dataType:e.objectData.requestDataType,data:e.objectData.requestData,success:function(t,s,n){"json"===e.objectData.requestDataType?e.objectData.data=t:i.html(t),e._showContent(i)},error:function(t,i,s){e.error()}}));break;case"flash":e._showContent(i);break;case"video":"function"==typeof i.get(0).canPlayType||0===e.objects["case"].find("video").length?e._showContent(i):e.error();break;default:e.objectData.url?(i.load(function(){e._showContent(i)}),i.error(function(){e.error()})):e.error()}},error:function(){e.objectData.type="error";var i=t('
');i.html(e.settings.errorMessage),e.objects.contentInner.html(i),e._showContent(e.objects.contentInner)},_calculateDimensions:function(t){e._cleanupDimensions();var i={objectWidth:t.attr("width")?t.attr("width"):t.attr(e._prefixAttributeName("width")),objectHeight:t.attr("height")?t.attr("height"):t.attr(e._prefixAttributeName("height"))};if(!e.settings.disableShrink)switch(i.maxWidth=parseInt(e.dimensions.windowWidth*e.settings.shrinkFactor),i.maxHeight=parseInt(e.dimensions.windowHeight*e.settings.shrinkFactor),i.maxWidth>e.settings.maxWidth&&(i.maxWidth=e.settings.maxWidth),i.maxHeight>e.settings.maxHeight&&(i.maxHeight=e.settings.maxHeight),i.differenceWidthAsPercent=parseInt(100/i.maxWidth*i.objectWidth),i.differenceHeightAsPercent=parseInt(100/i.maxHeight*i.objectHeight),e.objectData.type){case"image":case"flash":case"video":i.differenceWidthAsPercent>100&&i.differenceWidthAsPercent>i.differenceHeightAsPercent&&(i.objectWidth=i.maxWidth,i.objectHeight=parseInt(i.objectHeight/i.differenceWidthAsPercent*100)),i.differenceHeightAsPercent>100&&i.differenceHeightAsPercent>i.differenceWidthAsPercent&&(i.objectWidth=parseInt(i.objectWidth/i.differenceHeightAsPercent*100),i.objectHeight=i.maxHeight),i.differenceHeightAsPercent>100&&i.differenceWidthAsPercenti.maxWidth&&(i.objectWidth=i.maxWidth);break;default:(isNaN(i.objectWidth)||i.objectWidth>i.maxWidth)&&!e.settings.forceWidth&&(i.objectWidth=i.maxWidth),(isNaN(i.objectHeight)&&"auto"!==i.objectHeight||i.objectHeight>i.maxHeight)&&!e.settings.forceHeight&&(i.objectHeight=i.maxHeight)}e.settings.forceWidth?i.maxWidth=i.objectWidth:t.attr(e._prefixAttributeName("max-width"))&&(i.maxWidth=t.attr(e._prefixAttributeName("max-width"))),e.settings.forceHeight?i.maxHeight=i.objectHeight:t.attr(e._prefixAttributeName("max-height"))&&(i.maxHeight=t.attr(e._prefixAttributeName("max-height"))),e._adjustDimensions(t,i)},_adjustDimensions:function(t,i){t.css({width:i.objectWidth,height:i.objectHeight,"max-width":i.maxWidth,"max-height":i.maxHeight}),e.objects.contentInner.css({width:t.outerWidth(),height:t.outerHeight(),"max-width":"100%"}),e.objects["case"].css({width:e.objects.contentInner.outerWidth()}),e.objects["case"].css({"margin-top":parseInt(-(e.objects["case"].outerHeight()/2)),"margin-left":parseInt(-(e.objects["case"].outerWidth()/2))})},_loading:function(t){"start"===t?(e.objects["case"].addClass(e.settings.classPrefix+"loading"),e.objects.loading.show()):"end"===t&&(e.objects["case"].removeClass(e.settings.classPrefix+"loading"),e.objects.loading.hide())},getViewportDimensions:function(){return{windowWidth:t(window).innerWidth(),windowHeight:t(window).innerHeight()}},_verifyDataUrl:function(t){return t&&void 0!==t&&""!==t?(t.indexOf("#")>-1&&(t=t.split("#"),t="#"+t[t.length-1]),e._normalizeUrl(t.toString())):!1},_verifyDataType:function(t){var i=e.settings.typeMapping;if(!t)return!1;for(var s in i)if(i.hasOwnProperty(s))for(var n=i[s].split(","),a=0;a-1)return s}return"iframe"},_addElements:function(){"undefined"!=typeof e.objects["case"]&&t("#"+e.objects["case"].attr("id")).length||e.settings.markup()},_showContent:function(t){switch(e.objects["case"].attr(e._prefixAttributeName("type"),e.objectData.type),e.cache.object=t,e._calculateDimensions(t),e._callHooks(e.settings.onFinish),e.settings.transitionIn){case"scrollTop":case"scrollRight":case"scrollBottom":case"scrollLeft":case"scrollHorizontal":case"scrollVertical":e.transition.scroll(e.objects["case"],"in",e.settings.speedIn),e.transition.fade(e.objects.contentInner,"in",e.settings.speedIn);break;case"elastic":e.objects["case"].css("opacity")<1&&(e.transition.zoom(e.objects["case"],"in",e.settings.speedIn),e.transition.fade(e.objects.contentInner,"in",e.settings.speedIn));case"fade":case"fadeInline":e.transition.fade(e.objects["case"],"in",e.settings.speedIn),e.transition.fade(e.objects.contentInner,"in",e.settings.speedIn);break;default:e.transition.fade(e.objects["case"],"in",0)}e._loading("end"),e.isBusy=!1},_processContent:function(){switch(e.isBusy=!0,e.settings.transitionOut){case"scrollTop":case"scrollRight":case"scrollBottom":case"scrollLeft":case"scrollVertical":case"scrollHorizontal":e.objects["case"].is(":hidden")?(e.transition.fade(e.objects["case"],"out",0,0,function(){e._loadContent()}),e.transition.fade(e.objects.contentInner,"out",0)):e.transition.scroll(e.objects["case"],"out",e.settings.speedOut,function(){e._loadContent()});break;case"fade":e.objects["case"].is(":hidden")?e.transition.fade(e.objects["case"],"out",0,0,function(){e._loadContent()}):e.transition.fade(e.objects["case"],"out",e.settings.speedOut,0,function(){e._loadContent()});break;case"fadeInline":case"elastic":e.objects["case"].is(":hidden")?e.transition.fade(e.objects["case"],"out",0,0,function(){e._loadContent()}):e.transition.fade(e.objects.contentInner,"out",e.settings.speedOut,0,function(){e._loadContent()});break;default:e.transition.fade(e.objects["case"],"out",0,0,function(){e._loadContent()})}},_handleEvents:function(){e._unbindEvents(),e.objects.nav.children().not(e.objects.close).hide(),e.isSlideshowEnabled()&&(e.objects.nav.hasClass(e.settings.classPrefix+"paused")?e._stopTimeout():e._startTimeout()),e.settings.liveResize&&e._watchResizeInteraction(),e.objects.close.click(function(t){t.preventDefault(),e.close()}),e.settings.closeOnOverlayClick===!0&&e.objects.overlay.css("cursor","pointer").click(function(t){t.preventDefault(),e.close()}),e.settings.useKeys===!0&&e._addKeyEvents(),e.objectData.isPartOfSequence&&(e.objects.nav.attr(e._prefixAttributeName("ispartofsequence"),!0),e.objects.nav.data("items",e._setNavigation()),e.objects.prev.click(function(t){t.preventDefault(),e.settings.navigateEndless!==!0&&e.item.isFirst()||(e.objects.prev.unbind("click"),e.cache.action="prev",e.objects.nav.data("items").prev.click(),e.isSlideshowEnabled()&&e._stopTimeout())}),e.objects.next.click(function(t){t.preventDefault(),e.settings.navigateEndless!==!0&&e.item.isLast()||(e.objects.next.unbind("click"),e.cache.action="next",e.objects.nav.data("items").next.click(),e.isSlideshowEnabled()&&e._stopTimeout())}),e.isSlideshowEnabled()&&(e.objects.play.click(function(t){t.preventDefault(),e._startTimeout()}),e.objects.pause.click(function(t){t.preventDefault(),e._stopTimeout()})),e.settings.swipe===!0&&(t.isPlainObject(t.event.special.swipeleft)&&e.objects["case"].on("swipeleft",function(t){t.preventDefault(),e.objects.next.click(),e.isSlideshowEnabled()&&e._stopTimeout()}),t.isPlainObject(t.event.special.swiperight)&&e.objects["case"].on("swiperight",function(t){t.preventDefault(),e.objects.prev.click(),e.isSlideshowEnabled()&&e._stopTimeout()})))},_addKeyEvents:function(){t(document).bind("keyup.lightcase",function(t){if(!e.isBusy)switch(t.keyCode){case 27:e.objects.close.click();break;case 37:e.objectData.isPartOfSequence&&e.objects.prev.click();break;case 39:e.objectData.isPartOfSequence&&e.objects.next.click()}})},_startTimeout:function(){e.objects.play.hide(),e.objects.pause.show(),e.cache.action="next",e.objects.nav.removeClass(e.settings.classPrefix+"paused"),e.timeout=setTimeout(function(){e.objects.nav.data("items").next.click()},e.settings.timeout)},_stopTimeout:function(){e.objects.play.show(),e.objects.pause.hide(),e.objects.nav.addClass(e.settings.classPrefix+"paused"),clearTimeout(e.timeout)},_setNavigation:function(){var i=t(e.cache.selector||e.settings.attr),s=e.objectData.sequenceLength-1,n={prev:i.eq(e.objectData.prevIndex),next:i.eq(e.objectData.nextIndex)};return e.objectData.currentIndex>0?e.objects.prev.show():n.prevItem=i.eq(s),e.objectData.nextIndex<=s?e.objects.next.show():n.next=i.eq(0),e.settings.navigateEndless===!0&&(e.objects.prev.show(),e.objects.next.show()),n},item:{isFirst:function(){return 0===e.objectData.currentIndex},isLast:function(){return e.objectData.currentIndex===e.objectData.sequenceLength-1}},_cloneObject:function(t){var i=t.clone(),s=t.attr("id");return t.is(":hidden")?(e._cacheObjectData(t),t.attr("id",e.settings.idPrefix+"temp-"+s).empty()):i.removeAttr("id"),i.show()},isMobileDevice:function(){var t=navigator.userAgent.toLowerCase(),i=t.match(e.settings.mobileMatchExpression);return i?!0:!1},isTransitionSupported:function(){var i=t("body").get(0),s=!1,n={transition:"",WebkitTransition:"-webkit-",MozTransition:"-moz-",OTransition:"-o-",MsTransition:"-ms-"};for(var a in n)n.hasOwnProperty(a)&&a in i.style&&(e.support.transition=n[a],s=!0);return s},transition:{fade:function(t,i,s,n,a){var o="in"===i,c={},r=t.css("opacity"),l={},d=n?n:o?1:0;(e.isOpen||!o)&&(c.opacity=r,l.opacity=d,t.css(c).show(),e.support.transitions?(l[e.support.transition+"transition"]=s+"ms ease",setTimeout(function(){t.css(l),setTimeout(function(){t.css(e.support.transition+"transition",""),!a||!e.isOpen&&o||a()},s)},15)):(t.stop(),t.animate(l,s,a)))},scroll:function(t,i,s,n){var a="in"===i,o=a?e.settings.transitionIn:e.settings.transitionOut,c="left",r={},l=a?0:1,d=a?"-50%":"50%",u={},h=a?1:0,f=a?"50%":"-50%";if(e.isOpen||!a){switch(o){case"scrollTop":c="top";break;case"scrollRight":d=a?"150%":"50%",f=a?"50%":"150%";break;case"scrollBottom":c="top",d=a?"150%":"50%",f=a?"50%":"150%";break;case"scrollHorizontal":d=a?"150%":"50%",f=a?"50%":"-50%";break;case"scrollVertical":c="top",d=a?"-50%":"50%",f=a?"50%":"150%"}if("prev"===e.cache.action)switch(o){case"scrollHorizontal":d=a?"-50%":"50%",f=a?"50%":"150%";break;case"scrollVertical":d=a?"150%":"50%",f=a?"50%":"-50%"}r.opacity=l,r[c]=d,u.opacity=h,u[c]=f,t.css(r).show(),e.support.transitions?(u[e.support.transition+"transition"]=s+"ms ease",setTimeout(function(){t.css(u),setTimeout(function(){t.css(e.support.transition+"transition",""),!n||!e.isOpen&&a||n()},s)},15)):(t.stop(),t.animate(u,s,n))}},zoom:function(t,i,s,n){var a="in"===i,o={},c=t.css("opacity"),r=a?"scale(0.75)":"scale(1)",l={},d=a?1:0,u=a?"scale(1)":"scale(0.75)";(e.isOpen||!a)&&(o.opacity=c,o[e.support.transition+"transform"]=r,l.opacity=d,t.css(o).show(),e.support.transitions?(l[e.support.transition+"transform"]=u,l[e.support.transition+"transition"]=s+"ms ease",setTimeout(function(){t.css(l),setTimeout(function(){t.css(e.support.transition+"transform",""),t.css(e.support.transition+"transition",""),!n||!e.isOpen&&a||n()},s)},15)):(t.stop(),t.animate(l,s,n)))}},_callHooks:function(i){"object"==typeof i&&t.each(i,function(t,i){"function"==typeof i&&i.call(e.origin)})},_cacheObjectData:function(i){t.data(i,"cache",{id:i.attr("id"),content:i.html()}),e.cache.originalObject=i},_restoreObject:function(){var i=t('[id^="'+e.settings.idPrefix+'temp-"]');i.attr("id",t.data(e.cache.originalObject,"cache").id),i.html(t.data(e.cache.originalObject,"cache").content)},resize:function(){e.isOpen&&(e.isSlideshowEnabled()&&e._stopTimeout(),e.dimensions=e.getViewportDimensions(),e._calculateDimensions(e.cache.object))},_cacheScrollPosition:function(){var i=t(window),s=t(document),n={top:i.scrollTop(),left:i.scrollLeft()};e.cache.scrollPosition=e.cache.scrollPosition||{},s.width()>i.width()&&(e.cache.scrollPosition.left=n.left),s.height()>i.height()&&(e.cache.scrollPosition.top=n.top)},_watchResizeInteraction:function(){t(window).resize(e.resize)},_unwatchResizeInteraction:function(){t(window).off("resize",e.resize)},_watchScrollInteraction:function(){t(window).scroll(e._cacheScrollPosition)},_unwatchScrollInteraction:function(){t(window).off("scroll",e._cacheScrollPosition)},_restoreScrollPosition:function(){t(window).scrollTop(parseInt(e.cache.scrollPosition.top)).scrollLeft(parseInt(e.cache.scrollPosition.left)).resize()},_switchToFullScreenMode:function(){e.settings.shrinkFactor=1,e.settings.overlayOpacity=1,t("html").addClass(e.settings.classPrefix+"fullScreenMode")},_open:function(){switch(e.isOpen=!0,e.support.transitions=e.settings.cssTransitions?e.isTransitionSupported():!1,e.support.mobileDevice=e.isMobileDevice(),e.support.mobileDevice&&(t("html").addClass(e.settings.classPrefix+"isMobileDevice"),e.settings.fullScreenModeForMobile&&e._switchToFullScreenMode()),e.settings.transitionIn||(e.settings.transitionIn=e.settings.transition),e.settings.transitionOut||(e.settings.transitionOut=e.settings.transition),e.settings.transitionIn){case"fade":case"fadeInline":case"elastic":case"scrollTop":case"scrollRight":case"scrollBottom":case"scrollLeft":case"scrollVertical":case"scrollHorizontal":e.objects["case"].is(":hidden")&&(e.objects.close.css("opacity",0),e.objects.overlay.css("opacity",0),e.objects["case"].css("opacity",0),e.objects.contentInner.css("opacity",0)),e.transition.fade(e.objects.overlay,"in",e.settings.speedIn,e.settings.overlayOpacity,function(){e.transition.fade(e.objects.close,"in",e.settings.speedIn),e._handleEvents(),e._processContent()});break;default:e.transition.fade(e.objects.overlay,"in",0,e.settings.overlayOpacity,function(){e.transition.fade(e.objects.close,"in",0),e._handleEvents(),e._processContent()})}t("html").addClass(e.settings.classPrefix+"open"),e.objects["case"].attr("aria-hidden","false")},close:function(){switch(e.isOpen=!1,e.isSlideshowEnabled()&&(e._stopTimeout(),e.objects.nav.removeClass(e.settings.classPrefix+"paused")),e.objects.loading.hide(),e._unbindEvents(),e._unwatchResizeInteraction(),e._unwatchScrollInteraction(),t("html").removeClass(e.settings.classPrefix+"open"),e.objects["case"].attr("aria-hidden","true"),e.objects.nav.children().hide(),e._restoreScrollPosition(),e._callHooks(e.settings.onClose),e.settings.transitionOut){case"fade":case"fadeInline":case"scrollTop":case"scrollRight":case"scrollBottom":case"scrollLeft":case"scrollHorizontal":case"scrollVertical":e.transition.fade(e.objects["case"],"out",e.settings.speedOut,0,function(){e.transition.fade(e.objects.overlay,"out",e.settings.speedOut,0,function(){e.cleanup()})});break;case"elastic":e.transition.zoom(e.objects["case"],"out",e.settings.speedOut,function(){e.transition.fade(e.objects.overlay,"out",e.settings.speedOut,0,function(){e.cleanup()})});break;default:e.cleanup()}},_unbindEvents:function(){e.objects.overlay.unbind("click"),t(document).unbind("keyup.lightcase"),e.objects["case"].unbind("swipeleft").unbind("swiperight"),e.objects.prev.unbind("click"),e.objects.next.unbind("click"),e.objects.play.unbind("click"),e.objects.pause.unbind("click"),e.objects.close.unbind("click")},_cleanupDimensions:function(){var t=e.objects.contentInner.css("opacity");e.objects["case"].css({width:"",height:"",top:"",left:"","margin-top":"","margin-left":""}),e.objects.contentInner.removeAttr("style").css("opacity",t),e.objects.contentInner.children().removeAttr("style")},cleanup:function(){e._cleanupDimensions(),e.objects.loading.hide(),e.objects.overlay.hide(),e.objects["case"].hide(),e.objects.prev.hide(),e.objects.next.hide(),e.objects.play.hide(),e.objects.pause.hide(),e.objects["case"].removeAttr(e._prefixAttributeName("type")),e.objects.nav.removeAttr(e._prefixAttributeName("ispartofsequence")),e.objects.contentInner.empty().hide(),e.objects.info.children().empty(),e.cache.originalObject&&e._restoreObject(),e._callHooks(e.settings.onCleanup),e.cache={}},_matchMedia:function(){return window.matchMedia||window.msMatchMedia},_devicePixelRatio:function(){return window.devicePixelRatio||1},_isPublicMethod:function(t){return"function"==typeof e[t]&&"_"!==t.charAt(0)},_export:function(){window.lightcase={},t.each(e,function(t){e._isPublicMethod(t)&&(lightcase[t]=e[t])})}};e._export(),t.fn.lightcase=function(i){return e._isPublicMethod(i)?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.lightcase"):e.init.apply(this,arguments)}}(jQuery);