(function(s){var e={cache:{},support:{},objects:{},init:function(t){return this.each(function(){s(this).unbind("click.lightcase").bind("click.lightcase",function(i){i.preventDefault(),s(this).lightcase("start",t)})})},start:function(t){e.origin=lightcase.origin=this,e.settings=lightcase.settings=s.extend(!0,{idPrefix:"lightcase-",classPrefix:"lightcase-",attrPrefix:"lc-",transition:"elastic",transitionOpen:null,transitionClose:null,transitionIn:null,transitionOut:null,cssTransitions:!0,speedIn:250,speedOut:250,width:null,height:null,maxWidth:800,maxHeight:500,forceWidth:!1,forceHeight:!1,liveResize:!0,fullScreenModeForMobile:!0,mobileMatchExpression:/(iphone|ipod|ipad|android|blackberry|symbian)/,disableShrink:!1,fixedRatio:!0,shrinkFactor:.75,overlayOpacity:.9,slideshow:!1,slideshowAutoStart:!0,breakBeforeShow:!1,timeout:5e3,swipe:!0,useKeys:!0,useCategories:!0,useAsCollection:!1,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(){e.objects.body.append(e.objects.overlay=s('
'),e.objects.loading=s('
'),e.objects.case=s('')),e.objects.case.after(e.objects.close=s(''+e.settings.labels.close+""),e.objects.nav=s('
')),e.objects.nav.append(e.objects.prev=s(''+e.settings.labels["navigator.prev"]+"").hide(),e.objects.next=s(''+e.settings.labels["navigator.next"]+"").hide(),e.objects.play=s(''+e.settings.labels["navigator.play"]+"").hide(),e.objects.pause=s(''+e.settings.labels["navigator.pause"]+"").hide()),e.objects.case.append(e.objects.content=s('
'),e.objects.info=s('
')),e.objects.content.append(e.objects.contentInner=s('
')),e.objects.info.append(e.objects.sequenceInfo=s('
'),e.objects.title=s('

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

'))},onInit:{},onStart:{},onBeforeCalculateDimensions:{},onAfterCalculateDimensions:{},onBeforeShow:{},onFinish:{},onResize:{},onClose:{},onCleanup:{}},t,e.origin.data?e.origin.data("lc-options"):{}),e.objects.document=s("html"),e.objects.body=s("body"),e._callHooks(e.settings.onInit),e.objectData=e._setObjectData(this),e._addElements(),e._open(),e.dimensions=e.getViewportDimensions()},get:function(t){return e.objects[t]},getObjectData:function(){return e.objectData},_setObjectData:function(t){var i=s(t),n={this:s(t),title:e.settings.title||i.attr(e._prefixAttributeName("title"))||i.attr("title"),caption:e.settings.caption||i.attr(e._prefixAttributeName("caption"))||i.children("img").attr("alt"),url:e._determineUrl(),requestType:e.settings.ajax.type,requestData:e.settings.ajax.data,requestDataType:e.settings.ajax.dataType,rel:i.attr(e._determineAttributeSelector()),type:e.settings.type||e._verifyDataType(e._determineUrl()),isPartOfSequence:e.settings.useAsCollection||e._isPartOfSequence(i.attr(e.settings.attr),":"),isPartOfSequenceWithSlideshow:e._isPartOfSequence(i.attr(e.settings.attr),":slideshow"),currentIndex:s(e._determineAttributeSelector()).index(i),sequenceLength:s(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||s(e.origin).attr(e._prefixAttributeName("href"))||s(e.origin).attr("href")},_determineAttributeSelector:function(){var t=s(e.origin),i="";if(typeof e.cache.selector<"u")i=e.cache.selector;else if(e.settings.useCategories===!0&&t.attr(e._prefixAttributeName("categories"))){var n=t.attr(e._prefixAttributeName("categories")).split(" ");s.each(n,function(o,a){o>0&&(i+=","),i+="["+e._prefixAttributeName("categories")+'~="'+a+'"]'})}else i="["+e.settings.attr+'="'+t.attr(e.settings.attr)+'"]';return e.cache.selector=i,i},_determineUrl:function(){var t=e._verifyDataUrl(e._determineLinkTarget()),i=0,n=0,o="",a;return s.each(t,function(f,c){switch(e._verifyDataType(c.url)){case"video":var l=document.createElement("video"),r=e._verifyDataType(c.url)+"/"+e._getFileUrlSuffix(c.url);o!=="probably"&&o!==l.canPlayType(r)&&l.canPlayType(r)!==""&&(o=l.canPlayType(r),a=c.url);break;default:e._devicePixelRatio()>=c.density&&c.density>=n&&e._matchMedia()("screen and (min-width:"+c.width+"px)").matches&&c.width>=i&&(i=c.width,n=c.density,a=c.url);break}}),a},_normalizeUrl:function(t){var i=/^\d+$/;return t.split(",").map(function(n){var o={width:0,density:0};return n.trim().split(/\s+/).forEach(function(a,f){if(f===0)return o.url=a;var c=a.substring(0,a.length-1),l=a[a.length-1],r=parseInt(c,10),u=parseFloat(c);l==="w"&&i.test(c)?o.width=r:l==="h"&&i.test(c)?o.height=r:l==="x"&&!isNaN(u)&&(o.density=u)}),o})},_isPartOfSequence:function(t,i){var n=s("["+e.settings.attr+'="'+t+'"]'),o=new RegExp(i);return o.test(t)&&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 t;switch(e.objectData.type){case"image":t=s(new Image),t.attr({src:e.objectData.url,alt:e.objectData.title});break;case"inline":t=s('
'),t.html(e._cloneObject(s(e.objectData.url))),s.each(e.settings.inline,function(i,n){t.attr(e._prefixAttributeName(i),n)});break;case"ajax":t=s('
'),s.each(e.settings.ajax,function(i,n){i!=="data"&&t.attr(e._prefixAttributeName(i),n)});break;case"flash":t=s(''),s.each(e.settings.flash,function(i,n){t.attr(i,n)});break;case"video":t=s(""),t.attr("src",e.objectData.url),s.each(e.settings.video,function(i,n){t.attr(i,n)});break;default:t=s(""),t.attr({src:e.objectData.url}),s.each(e.settings.iframe,function(i,n){t.attr(i,n)});break}e._addObject(t),e._loadObject(t)},_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&&e.objectData.title!==void 0&&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&&e.objectData.caption!==void 0&&e.objectData.caption!==""?(e.objects.caption.html(e.objectData.caption),e.objects.caption.show()):(e.objects.caption.empty(),e.objects.caption.hide())},_loadObject:function(t){switch(e.objectData.type){case"inline":s(e.objectData.url)?e._showContent(t):e.error();break;case"ajax":s.ajax(s.extend({},e.settings.ajax,{url:e.objectData.url,type:e.objectData.requestType,dataType:e.objectData.requestDataType,data:e.objectData.requestData,success:function(i,n,o){o.getResponseHeader("X-Ajax-Location")?(e.objectData.url=o.getResponseHeader("X-Ajax-Location"),e._loadObject(t)):(e.objectData.requestDataType==="json"?e.objectData.data=i:t.html(i),e._showContent(t))},error:function(i,n,o){e.error()}}));break;case"flash":e._showContent(t);break;case"video":typeof t.get(0).canPlayType=="function"||e.objects.case.find("video").length===0?e._showContent(t):e.error();break;default:e.objectData.url?(t.on("load",function(){e._showContent(t)}),t.on("error",function(){e.error()})):e.error();break}},error:function(){e.objectData.type="error";var t=s('
');t.html(e.settings.errorMessage),e.objects.contentInner.html(t),e._showContent(e.objects.contentInner)},_calculateDimensions:function(t){if(e._cleanupDimensions(),!!t){var i={ratio:1,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":case"iframe":case"ajax":case"inline":if(e.objectData.type==="image"||e.settings.fixedRatio===!0){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)&&i.objectHeight!=="auto"||i.objectHeight>i.maxHeight)&&!e.settings.forceHeight&&(i.objectHeight=i.maxHeight);break}if(e.settings.forceWidth){try{i.objectWidth=e.settings[e.objectData.type].width}catch{i.objectWidth=e.settings.width||i.objectWidth}i.maxWidth=null}if(t.attr(e._prefixAttributeName("max-width"))&&(i.maxWidth=t.attr(e._prefixAttributeName("max-width"))),e.settings.forceHeight){try{i.objectHeight=e.settings[e.objectData.type].height}catch{i.objectHeight=e.settings.height||i.objectHeight}i.maxHeight=null}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(),"max-width":"100%"}),e.objects.case.css({"margin-top":parseInt(-(e.objects.case.outerHeight()/2)),"margin-left":parseInt(-(e.objects.case.outerWidth()/2))})},_loading:function(t){t==="start"?(e.objects.case.addClass(e.settings.classPrefix+"loading"),e.objects.loading.show()):t==="end"&&(e.objects.case.removeClass(e.settings.classPrefix+"loading"),e.objects.loading.hide())},getViewportDimensions:function(){return{windowWidth:s(window).innerWidth(),windowHeight:s(window).innerHeight()}},_verifyDataUrl:function(t){return!t||t===void 0||t===""?!1:(t.indexOf("#")>-1&&(t=t.split("#"),t="#"+t[t.length-1]),e._normalizeUrl(t.toString()))},_getFileUrlSuffix:function(t){var i=/(?:\.([^.]+))?$/;return i.exec(t.toLowerCase())[1]},_verifyDataType:function(t){var i=e.settings.typeMapping;if(!t)return!1;for(var n in i)if(i.hasOwnProperty(n))for(var o=i[n].split(","),a=0;a-1)return n}return"iframe"},_addElements:function(){typeof e.objects.case<"u"&&s("#"+e.objects.case.attr("id")).length||e.settings.markup()},_showContent:function(t){e.objects.document.attr(e._prefixAttributeName("type"),e.objectData.type),e.cache.object=t,e._callHooks(e.settings.onBeforeShow),!e.settings.breakBeforeShow&&e.show()},_startInTransition:function(){switch(e.transition.in()){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);break}e._loading("end"),e.isBusy=!1,e.cache.firstOpened||(e.cache.firstOpened=e.objectData.this),e.objects.info.hide(),setTimeout(function(){e.transition.fade(e.objects.info,"in",e.settings.speedIn)},e.settings.speedIn),e._callHooks(e.settings.onFinish)},_processContent:function(){switch(e.isBusy=!0,e.transition.fade(e.objects.info,"out",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.contentInner,"out",0),e.transition.fade(e.objects.case,"out",0,0,function(){e._loadContent()})):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()});break}},_handleEvents:function(){e._unbindEvents(),e.objects.nav.children().not(e.objects.close).hide(),e.isSlideshowEnabled()&&((e.settings.slideshowAutoStart===!0||e.isSlideshowStarted)&&!e.objects.nav.hasClass(e.settings.classPrefix+"paused")?e._startTimeout():e._stopTimeout()),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&&(s.isPlainObject(s.event.special.swipeleft)&&e.objects.case.on("swipeleft",function(t){t.preventDefault(),e.objects.next.click(),e.isSlideshowEnabled()&&e._stopTimeout()}),s.isPlainObject(s.event.special.swiperight)&&e.objects.case.on("swiperight",function(t){t.preventDefault(),e.objects.prev.click(),e.isSlideshowEnabled()&&e._stopTimeout()})))},_addKeyEvents:function(){s(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();break}})},_startTimeout:function(){e.isSlideshowStarted=!0,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 t=s(e.cache.selector||e.settings.attr),i=e.objectData.sequenceLength-1,n={prev:t.eq(e.objectData.prevIndex),next:t.eq(e.objectData.nextIndex)};return e.objectData.currentIndex>0?e.objects.prev.show():n.prevItem=t.eq(i),e.objectData.nextIndex<=i?e.objects.next.show():n.next=t.eq(0),e.settings.navigateEndless===!0&&(e.objects.prev.show(),e.objects.next.show()),n},item:{isFirst:function(){return e.objectData.currentIndex===0},isFirstOpened:function(){return e.objectData.this.is(e.cache.firstOpened)},isLast:function(){return e.objectData.currentIndex===e.objectData.sequenceLength-1}},_cloneObject:function(t){var i=t.clone(),n=t.attr("id");return t.is(":hidden")?(e._cacheObjectData(t),t.attr("id",e.settings.idPrefix+"temp-"+n).empty()):i.removeAttr("id"),i.show()},isMobileDevice:function(){var t=navigator.userAgent.toLowerCase(),i=t.match(e.settings.mobileMatchExpression);return!!i},isTransitionSupported:function(){var t=e.objects.body.get(0),i=!1,n={transition:"",WebkitTransition:"-webkit-",MozTransition:"-moz-",OTransition:"-o-",MsTransition:"-ms-"};for(var o in n)n.hasOwnProperty(o)&&o in t.style&&(e.support.transition=n[o],i=!0);return i},transition:{in:function(){return e.settings.transitionOpen&&!e.cache.firstOpened?e.settings.transitionOpen:e.settings.transitionIn},fade:function(t,i,n,o,a){var f=i==="in",c={},l=t.css("opacity"),r={},u=o||(f?1:0);!e.isOpen&&f||(c.opacity=l,r.opacity=u,t.css(e.support.transition+"transition","none"),t.css(c).show(),e.support.transitions?(r[e.support.transition+"transition"]=n+"ms ease",setTimeout(function(){t.css(r),setTimeout(function(){t.css(e.support.transition+"transition",""),a&&(e.isOpen||!f)&&a()},n)},15)):(t.stop(),t.animate(r,n,a)))},scroll:function(t,i,n,o){var a=i==="in",f=a?e.settings.transitionIn:e.settings.transitionOut,c="left",l={},r=a?0:1,u=a?"-50%":"50%",d={},p=a?1:0,h=a?"50%":"-50%";if(!(!e.isOpen&&a)){switch(f){case"scrollTop":c="top";break;case"scrollRight":u=a?"150%":"50%",h=a?"50%":"150%";break;case"scrollBottom":c="top",u=a?"150%":"50%",h=a?"50%":"150%";break;case"scrollHorizontal":u=a?"150%":"50%",h=a?"50%":"-50%";break;case"scrollVertical":c="top",u=a?"-50%":"50%",h=a?"50%":"150%";break}if(e.cache.action==="prev")switch(f){case"scrollHorizontal":u=a?"-50%":"50%",h=a?"50%":"150%";break;case"scrollVertical":u=a?"150%":"50%",h=a?"50%":"-50%";break}l.opacity=r,l[c]=u,d.opacity=p,d[c]=h,t.css(e.support.transition+"transition","none"),t.css(l).show(),e.support.transitions?(d[e.support.transition+"transition"]=n+"ms ease",setTimeout(function(){t.css(d),setTimeout(function(){t.css(e.support.transition+"transition",""),o&&(e.isOpen||!a)&&o()},n)},15)):(t.stop(),t.animate(d,n,o))}},zoom:function(t,i,n,o){var a=i==="in",f={},c=t.css("opacity"),l=a?"scale(0.75)":"scale(1)",r={},u=a?1:0,d=a?"scale(1)":"scale(0.75)";!e.isOpen&&a||(f.opacity=c,f[e.support.transition+"transform"]=l,r.opacity=u,t.css(e.support.transition+"transition","none"),t.css(f).show(),e.support.transitions?(r[e.support.transition+"transform"]=d,r[e.support.transition+"transition"]=n+"ms ease",setTimeout(function(){t.css(r),setTimeout(function(){t.css(e.support.transition+"transform",""),t.css(e.support.transition+"transition",""),o&&(e.isOpen||!a)&&o()},n)},15)):(t.stop(),t.animate(r,n,o)))}},_callHooks:function(t){typeof t=="object"&&s.each(t,function(i,n){typeof n=="function"&&n.call(e.origin)})},_cacheObjectData:function(t){s.data(t,"cache",{id:t.attr("id"),content:t.html()}),e.cache.originalObject=t},_restoreObject:function(){var t=s('[id^="'+e.settings.idPrefix+'temp-"]');t.attr("id",s.data(e.cache.originalObject,"cache").id),t.html(s.data(e.cache.originalObject,"cache").content)},resize:function(t,i){e.isOpen&&(e.isSlideshowEnabled()&&e._stopTimeout(),typeof i=="object"&&i!==null&&(i.width&&e.cache.object.attr(e._prefixAttributeName("width"),i.width),i.maxWidth&&e.cache.object.attr(e._prefixAttributeName("max-width"),i.maxWidth),i.height&&e.cache.object.attr(e._prefixAttributeName("height"),i.height),i.maxHeight&&e.cache.object.attr(e._prefixAttributeName("max-height"),i.maxHeight)),e.dimensions=e.getViewportDimensions(),e._calculateDimensions(e.cache.object),e._callHooks(e.settings.onResize))},_watchResizeInteraction:function(){s(window).resize(e.resize)},_unwatchResizeInteraction:function(){s(window).off("resize",e.resize)},_switchToFullScreenMode:function(){e.settings.shrinkFactor=1,e.settings.overlayOpacity=1,s("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&&(s("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.transition.in()){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()});break}e.objects.document.addClass(e.settings.classPrefix+"open"),e.objects.case.attr("aria-hidden","false")},show:function(){e._callHooks(e.settings.onBeforeCalculateDimensions),e._calculateDimensions(e.cache.object),e._callHooks(e.settings.onAfterCalculateDimensions),e._startInTransition()},close:function(){switch(e.isOpen=!1,e.isSlideshowEnabled()&&(e._stopTimeout(),e.isSlideshowStarted=!1,e.objects.nav.removeClass(e.settings.classPrefix+"paused")),e.objects.loading.hide(),e._unbindEvents(),e._unwatchResizeInteraction(),s("html").removeClass(e.settings.classPrefix+"open"),e.objects.case.attr("aria-hidden","true"),e.objects.nav.children().hide(),e.objects.close.hide(),e._callHooks(e.settings.onClose),e.transition.fade(e.objects.info,"out",0),e.settings.transitionClose||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();break}},_unbindEvents:function(){e.objects.overlay.unbind("click"),s(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.document.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 typeof e[t]=="function"&&t.charAt(0)!=="_"},_export:function(){window.lightcase={},s.each(e,function(t){e._isPublicMethod(t)&&(lightcase[t]=e[t])})}};e._export(),s.fn.lightcase=function(t){if(e._isPublicMethod(t))return e[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return e.init.apply(this,arguments);s.error("Method "+t+" does not exist on jQuery.lightcase")}})(jQuery);