function loadHtml5LightBox(o){!function(t){t.fn.html5lightbox=function(i){var e=this;e.options=jQuery.extend({freelink:!1,autoplay:!0,html5player:!0,responsive:!0,nativehtml5controls:!1,videohidecontrols:!1,useflashonie9:!0,useflashonie10:!1,useflashonie11:!1,googleanalyticsaccount:"",arrowloop:!0,shownavigation:!0,thumbwidth:96,thumbheight:72,thumbgap:4,thumbtopmargin:12,thumbbottommargin:12,thumbborder:1,thumbbordercolor:"transparent",thumbhighlightbordercolor:"#fff",thumbopacity:1,navbuttonwidth:32,overlaybgcolor:"#000",overlayopacity:.8,bgcolor:"#fff",bordersize:8,borderradius:0,bordermargin:16,barautoheight:!0,barheight:48,loadingwidth:64,loadingheight:64,resizespeed:400,fadespeed:400,jsfolder:o,skinsfoldername:"images/",loadingimage:"lightbox-loading.gif",nextimage:"lightbox-next.png",previmage:"lightbox-prev.png",closeimage:"close-box.png",playvideoimage:"lightbox-playvideo.png",titlebgimage:"lightbox-titlebg.png",showtitle:!0,titlestyle:"bottom",titleinsidecss:"{color:#fff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;}",titlebottomcss:"{color:#333; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;}",showdescription:!0,descriptioninsidecss:"{color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",descriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",errorwidth:280,errorheight:48,errorcss:"{text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",supportesckey:!0,supportarrowkeys:!0,version:"3.3",stamp:!0,freemark:"",watermark:!1,watermarklink:""},i),"undefined"!=typeof html5lightbox_options&&html5lightbox_options&&jQuery.extend(e.options,html5lightbox_options),t("div#html5lightbox_options").length&&t.each(t("div#html5lightbox_options").data(),function(o,t){e.options[o.toLowerCase()]=t}),e.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1),e.options.skinsfolder=e.options.skinsfoldername,e.options.skinsfolder.length>0&&"/"!=e.options.skinsfolder[e.options.skinsfolder.length-1]&&(e.options.skinsfolder+="/"),"/"!=e.options.skinsfolder.charAt(0)&&"http:"!=e.options.skinsfolder.substring(0,5)&&"https:"!=e.options.skinsfolder.substring(0,6)&&(e.options.skinsfolder=e.options.jsfolder+e.options.skinsfolder);var n,s,r="",l=e.options.freemark.split(",");for(n=0;n=n;n++)a=a.slice(0,n)+a.slice(n+1);for(s=a.length,n=0;5>n;n++)a=a.slice(0,s-9+n)+a.slice(s-8+n);-1!=e.options.htmlfolder.indexOf(a)&&(e.options.stamp=!1),e.options.navheight=0,e.options.thumbgap+=2*e.options.thumbborder,e.options.types=["IMAGE","FLASH","VIDEO","YOUTUBE","VIMEO","PDF","MP3","WEB","FLV","DAILYMOTION"],e.elemArray=new Array,e.options.curElem=-1,e.options.flashInstalled=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(e.options.flashInstalled=!0)}catch(h){navigator.mimeTypes["application/x-shockwave-flash"]&&(e.options.flashInstalled=!0)}e.options.html5VideoSupported=!!document.createElement("video").canPlayType,e.options.isChrome=null!=navigator.userAgent.match(/Chrome/i),e.options.isFirefox=null!=navigator.userAgent.match(/Firefox/i),e.options.isOpera=null!=navigator.userAgent.match(/Opera/i)||null!=navigator.userAgent.match(/OPR\//i),e.options.isSafari=null!=navigator.userAgent.match(/Safari/i),e.options.isIE11=null!=navigator.userAgent.match(/Trident\/7/)&&null!=navigator.userAgent.match(/rv:11/),e.options.isIE=null!=navigator.userAgent.match(/MSIE/i)&&!e.options.isOpera,e.options.isIE10=null!=navigator.userAgent.match(/MSIE 10/i)&&!this.options.isOpera,e.options.isIE9=null!=navigator.userAgent.match(/MSIE 9/i)&&!e.options.isOpera,e.options.isIE8=null!=navigator.userAgent.match(/MSIE 8/i)&&!e.options.isOpera,e.options.isIE7=null!=navigator.userAgent.match(/MSIE 7/i)&&!e.options.isOpera,e.options.isIE6=null!=navigator.userAgent.match(/MSIE 6/i)&&!e.options.isOpera,e.options.isIE678=e.options.isIE6||e.options.isIE7||e.options.isIE8,e.options.isIE6789=e.options.isIE6||e.options.isIE7||e.options.isIE8||e.options.isIE9,e.options.isAndroid=null!=navigator.userAgent.match(/Android/i),e.options.isIPad=null!=navigator.userAgent.match(/iPad/i),e.options.isIPhone=null!=navigator.userAgent.match(/iPod/i)||null!=navigator.userAgent.match(/iPhone/i),e.options.isIOS=e.options.isIPad||e.options.isIPhone,e.options.isMobile=e.options.isAndroid||e.options.isIPad||e.options.isIPhone,e.options.isIOSLess5=e.options.isIPad&&e.options.isIPhone&&(null!=navigator.userAgent.match(/OS 4/i)||null!=navigator.userAgent.match(/OS 3/i)),e.options.supportCSSPositionFixed=!e.options.isIE6&&!e.options.isIOSLess5,e.options.iequirksmode=e.options.isIE6789&&!jQuery.support.boxModel,e.options.resizeTimeout=-1,e.options.isMobile&&(e.options.autoplay=!1),e.options.googleanalyticsaccount&&!window._gaq&&(window._gaq=window._gaq||[],window._gaq.push(["_setAccount",e.options.googleanalyticsaccount]),window._gaq.push(["_trackPageview"]),t.getScript(("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js")),e.init=function(){e.showing=!1,e.readData(),e.createMarkup(),e.supportKeyboard()};var d=0,p=1,c=2,u=3,m=4,g=5,b=6,w=7,f=8,v=9;return e.readData=function(){e.each(function(){if("a"==this.nodeName.toLowerCase()||"area"==this.nodeName.toLowerCase()){var o=t(this),i=e.checkType(o.attr("href"));if(!(0>i)){for(var n=0;n"+o+""),e.$lightbox=jQuery(""),e.$lightbox.css({position:e.options.supportCSSPositionFixed&&e.options.responsive&&!e.options.iequirksmode?"fixed":"absolute"}),e.$lightbox.appendTo("body"),e.$lightboxBox=t("#html5-lightbox-box",e.$lightbox),e.$elem=t("#html5-elem-box",e.$lightbox),e.$elemWrap=t("#html5-elem-wrap",e.$lightbox),e.$loading=t("#html5-loading",e.$lightbox),e.$error=t("#html5-error",e.$lightbox),e.$image=t("#html5-image",e.$lightbox),e.$next=t("#html5-next",e.$lightbox),e.$prev=t("#html5-prev",e.$lightbox);var i="";if(e.$elem.append(i),e.$elemData=t("#html5-elem-data-box",e.$lightbox),e.$text=t("#html5-text",e.$lightbox),e.options.borderradius>0&&(e.$elem.css({"border-radius":e.options.borderradius+"px","-moz-border-radius":e.options.borderradius+"px","-webkit-border-radius":e.options.borderradius+"px"}),"inside"==e.options.titlestyle?e.$elemWrap.css({"border-radius":e.options.borderradius+"px","-moz-border-radius":e.options.borderradius+"px","-webkit-border-radius":e.options.borderradius+"px"}):(e.$elemWrap.css({"border-top-left-radius":e.options.borderradius+"px","-moz-top-left-border-radius":e.options.borderradius+"px","-webkit-top-left-border-radius":e.options.borderradius+"px","border-top-right-radius":e.options.borderradius+"px","-moz-top-right-border-radius":e.options.borderradius+"px","-webkit-top-right-border-radius":e.options.borderradius+"px"}),e.$elemData.css({"border-bottom-left-radius":e.options.borderradius+"px","-moz-top-bottom-border-radius":e.options.borderradius+"px","-webkit-bottom-left-border-radius":e.options.borderradius+"px","border-bottom-right-radius":e.options.borderradius+"px","-moz-bottom-right-border-radius":e.options.borderradius+"px","-webkit-bottom-right-border-radius":e.options.borderradius+"px"}))),"inside"==e.options.titlestyle?(e.$elemData.css({position:"absolute",margin:e.options.bordersize+"px",bottom:0,left:0,"background-color":"#333","background-color":"rgba(51, 51, 51, 0.6)"}),e.$text.css({padding:e.options.bordersize+"px "+2*e.options.bordersize+"px"})):(e.$elemData.css({position:"relative",width:"100%",height:e.options.barautoheight?"auto":e.options.barheight+"px",padding:"0 0 "+e.options.bordersize+"px 0","background-color":e.options.bgcolor,"text-align":"left"}),e.$text.css({margin:"0 "+e.options.bordersize+"px"})),e.$lightboxBox.append(""),e.$close=t("#html5-close",e.$lightbox),e.$watermark=t("#html5-watermark",e.$lightbox),e.options.stamp)e.$watermark.html("
"+e.options.freemark+"
");else if(e.options.watermark){var n="";e.options.watermarklink&&(n=""+n+""),e.$watermark.html(n)}t("#html5-lightbox-overlay",e.$lightbox).click(e.finish),e.$close.click(e.finish),e.$next.click(function(){e.options.nextElem<=e.options.curElem&&e.options.onlastarrowclicked&&window[e.options.onlastarrowclicked]&&"function"==typeof window[e.options.onlastarrowclicked]&&window[e.options.onlastarrowclicked](),e.gotoSlide(-1)}),e.$prev.click(function(){e.options.prevElem>=e.options.curElem&&e.options.onfirstarrowclicked&&window[e.options.onfirstarrowclicked]&&"function"==typeof window[e.options.onfirstarrowclicked]&&window[e.options.onfirstarrowclicked](),e.gotoSlide(-2)}),t(window).resize(function(){e.options.isMobile||(clearTimeout(e.options.resizeTimeout),e.options.resizeTimeout=setTimeout(function(){e.resizeWindow()},500))}),t(window).scroll(function(){e.scrollBox()}),t(window).bind("orientationchange",function(o){e.options.isMobile&&e.resizeWindow()}),e.options.isIPhone&&(e.options.windowInnerHeight=window.innerHeight,setInterval(function(){e.options.windowInnerHeight!=window.innerHeight&&(e.options.windowInnerHeight=window.innerHeight,e.resizeWindow())},500)),e.enableSwipe()},e.calcNextPrevElem=function(){e.options.nextElem=-1,e.options.prevElem=-1;var o,t=e.elemArray[e.options.curElem][u];if(void 0!=t&&null!=t){for(o=e.options.curElem+1;o=0){for(o=e.options.curElem-1;o>=0;o--)if(e.elemArray[o][u]==t){e.options.prevElem=o;break}if(e.options.prevElem<0)for(o=e.elemArray.length-1;o>e.options.curElem;o--)if(e.elemArray[o][u]==t){e.options.prevElem=o;break}}}},e.clickHandler=function(){if(e.elemArray.length<=0)return!0;var o=t(this);e.hideObjects();for(var i=0;il&&(l=16),e.options.iequirksmode?e.$lightboxBox.css({top:l}):e.$lightboxBox.css({"margin-top":l}),e.$lightboxBox.css({width:n,height:s}),e.$elemWrap.css({width:n,height:s}),e.loadCurElem(),!1},e.loadThumbnail=function(o,i){var n=new Image;t(n).load(function(){var n;n=this.width/this.height<=e.options.thumbwidth/e.options.thumbheight?"width:100%;":"height:100%;",t(".html5-nav-thumb").eq(i).html("")}),n.src=o},e.showNavigation=function(){if(e.options.shownavigation&&e.currentElem&&e.currentElem[u]){var o,i=!1,n=e.currentElem[u];for(o=0;o0){i=!0;break}if(i&&(e.options.navheight=e.options.thumbheight+e.options.thumbtopmargin+e.options.thumbbottommargin,!(t(".html5-nav").length>0))){t("body").append("
");var s=0;for(o=0;o0&&(t(".html5-nav-list").append("
"),this.loadThumbnail(e.elemArray[o][f],s),s++);t(".html5-nav-thumb").hover(function(){t(this).css({opacity:1}),t(this).css({border:e.options.thumbborder+"px solid "+e.options.thumbhighlightbordercolor})},function(){t(this).css({opacity:e.options.thumbopacity}),t(this).css({border:e.options.thumbborder+"px solid "+e.options.thumbbordercolor})}),t(".html5-nav-thumb").click(function(){var o=t(this).data("arrayindex");o>=0&&e.gotoSlide(o)}),e.options.totalwidth=s*(e.options.thumbgap+e.options.thumbwidth+2*e.options.thumbborder),t(".html5-nav-list").css({display:"block",position:"relative","margin-left":0,width:e.options.totalwidth+"px"}).append("
");var r=t(".html5-nav-mask"),l=t(".html5-nav-prev"),a=t(".html5-nav-next");l.click(function(){var o=t(".html5-nav-list"),i=t(".html5-nav-next"),n=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width(),s=n-2*e.options.navbuttonwidth,r=parseInt(o.css("margin-left"))+s;r>=0?(r=0,t(this).css({"background-position":"center left"})):t(this).css({"background-position":"center right"}),r<=s-e.options.totalwidth?i.css({"background-position":"center left"}):i.css({"background-position":"center right"}),o.animate({"margin-left":r})}),a.click(function(){var o=t(".html5-nav-list"),i=t(".html5-nav-prev"),n=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width(),s=n-2*e.options.navbuttonwidth,r=parseInt(o.css("margin-left"))-s;r<=s-e.options.totalwidth?(r=s-e.options.totalwidth,t(this).css({"background-position":"center left"})):t(this).css({"background-position":"center right"}),r>=0?i.css({"background-position":"center left"}):i.css({"background-position":"center right"}),o.animate({"margin-left":r})});var h=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width();e.options.totalwidth<=h?(r.css({width:e.options.totalwidth+"px"}),l.hide(),a.hide()):(r.css({width:h-2*e.options.navbuttonwidth+"px"}),l.show(),a.show())}}},e.loadElem=function(o){switch(e.currentElem=o,e.showing=!0,e.showNavigation(),e.$elem.unbind("mouseenter").unbind("mouseleave").unbind("mousemove"),e.$loading.show(),e.options.onshowitem&&window[e.options.onshowitem]&&"function"==typeof window[e.options.onshowitem]&&window[e.options.onshowitem](o),o[d]){case 0:var i=new Image;t(i).load(function(){e.showImage(o,i.width,i.height)}),t(i).error(function(){e.showError()}),i.src=o[p];break;case 1:e.showSWF(o);break;case 2:case 8:e.showVideo(o);break;case 3:case 4:case 9:e.showYoutubeVimeo(o);break;case 5:e.showPDF(o);break;case 6:e.showMP3(o);break;case 7:e.showWeb(o)}e.options.googleanalyticsaccount&&window._gaq&&window._gaq.push(["_trackEvent","Lightbox","Open",o[p]])},e.loadCurElem=function(){e.loadElem(e.elemArray[e.options.curElem])},e.showError=function(){e.$loading.hide(),e.resizeLightbox(e.options.errorwidth,e.options.errorheight,!0,function(){e.$error.show(),e.$elem.fadeIn(e.options.fadespeed,function(){e.showData()})})},e.calcTextWidth=function(o){return o-36},e.showTitle=function(o,t,i){"inside"==e.options.titlestyle&&e.$elemData.css({width:o+"px"});var n="";e.options.showtitle&&t&&t.length>0&&(n+=t),e.options.showdescription&&i&&i.length>0&&(n+='

'+i+"

"),e.$text.html(n)},e.showImage=function(o,t,i){var n,s;o[m]?n=o[m]:(n=t,o[m]=t),o[g]?s=o[g]:(s=i,o[g]=i);var r=e.calcElemSize({w:n,h:s});e.resizeLightbox(r.w,r.h,!0,function(){e.showTitle(r.w,o[c],o[v]),e.$image.css({width:r.w,height:r.h}).show(),e.$image.html(""),e.$elem.fadeIn(e.options.fadespeed,function(){e.showData()})})},e.showSWF=function(o){var i=o[m]?o[m]:960,n=o[g]?o[g]:540,s=e.calcElemSize({w:i,h:n});i=s.w,n=s.h,e.resizeLightbox(i,n,!0,function(){e.showTitle(s.w,o[c],o[v]),e.$image.css({width:s.w,height:s.h}).html("
").show(),e.embedFlash(t("#html5lightbox-swf"),o[p],"window",{width:i,height:n}),e.$elem.show(),e.showData()})},e.showVideo=function(o){var i=o[m]?o[m]:960,n=o[g]?o[g]:540,s=e.calcElemSize({w:i,h:n});i=s.w,n=s.h,e.resizeLightbox(i,n,!0,function(){e.showTitle(s.w,o[c],o[v]),e.$image.css({width:s.w,height:s.h}).html("
").show();var r=!1;if(e.options.isIE678||8==o[d]||e.options.isIE9&&e.options.useflashonie9||e.options.isIE10&&e.options.useflashonie10||e.options.isIE11&&e.options.useflashonie11?r=!1:e.options.isMobile?r=!0:!e.options.html5player&&e.options.flashInstalled||!e.options.html5VideoSupported||(!e.options.isFirefox&&!e.options.isOpera||(e.options.isFirefox||e.options.isOpera)&&(o[w]||o[b]))&&(r=!0),r){var l=o[p];(e.options.isFirefox||e.options.isOpera||!l)&&(l=o[b]?o[b]:o[w]),e.embedHTML5Video(t("#html5lightbox-video"),l,e.options.autoplay)}else{var a=o[p];"/"!=a.charAt(0)&&"http:"!=a.substring(0,5)&&"https:"!=a.substring(0,6)&&(a=e.options.htmlfolder+a),e.embedFlash(t("#html5lightbox-video"),e.options.jsfolder+"html5boxplayer.swf","transparent",{width:i,height:n,hidecontrols:e.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:a,hdfile:"",ishd:"0",autoplay:e.options.autoplay?"1":"0",errorcss:".html5box-error"+e.options.errorcss,id:0})}e.$elem.show(),e.showData()})},e.getYoutubeParams=function(o){var t={};if(o.indexOf("?")<0)return t;for(var i=o.substring(o.indexOf("?")+1).split("&"),e=0;e").show();var i=o[p];3==o[d]&&(i=e.prepareYoutubeHref(i)),9==o[d]&&(i=e.prepareDailymotionHref(i)),e.options.autoplay&&(i+=i.indexOf("?")<0?"?autoplay=1":"&autoplay=1"),3==o[d]&&(i+=i.indexOf("?")<0?"?wmode=transparent&rel=0":"&wmode=transparent&rel=0",e.options.videohidecontrols&&(i+="&controls=0&showinfo=0")),t("#html5lightbox-video").html(""),e.$elem.show(),e.showData()})},e.showPDF=function(o){},e.showMP3=function(o){},e.showWeb=function(o){var i=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width(),n=window.innerHeight?window.innerHeight:t(window).height(),s=o[m]?o[m]:i,r=o[g]?o[g]:n-e.options.navheight,l=e.calcElemSize({w:s,h:r});s=l.w,r=l.h,e.resizeLightbox(s,r,!0,function(){e.$loading.hide(),e.showTitle(l.w,o[c],o[v]),e.$image.css({width:l.w,height:l.h}).html("
").show(),t("#html5lightbox-web").html(""),e.$elem.show(),e.showData()})},e.scrollBox=function(){e.options.supportCSSPositionFixed||e.$lightbox.css("top",t(window).scrollTop())},e.resizeWindow=function(){if(e.currentElem&&e.options.responsive){var o=e.currentElem[m]?e.currentElem[m]:960,i=e.currentElem[g]?e.currentElem[g]:540,n=e.calcElemSize({w:o,h:i}),s=window.innerHeight?window.innerHeight:t(window).height(),r=n.w+2*e.options.bordersize,l=n.h+2*e.options.bordersize,a=Math.round((s-e.options.navheight)/2-l/2);if("inside"!=e.options.titlestyle&&(a-=Math.round(e.options.barheight/2)),16>a&&(a=16),e.$lightboxBox.css({"margin-top":a}),e.$lightboxBox.css({width:r,height:l}),e.$elemWrap.css({width:r,height:l}),e.$image.css({width:n.w,height:n.h}),!(t(".html5-nav").length<=0)){t(".html5-nav-list").css({"margin-left":0});var h=t(".html5-nav-mask"),d=t(".html5-nav-prev"),p=t(".html5-nav-next"),c=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width();e.options.totalwidth<=c?(h.css({width:e.options.totalwidth+"px"}),d.hide(),p.hide()):(h.css({width:c-2*e.options.navbuttonwidth+"px"}),d.show(),p.show())}}},e.calcElemSize=function(o){if(!e.options.responsive)return o;var i=window.innerHeight?window.innerHeight:t(window).height();i=i?i:t(document).height();var n=i-e.options.navheight-2*e.options.bordersize-2*e.options.bordermargin;"inside"!=e.options.titlestyle&&(n-=e.options.barheight),o.h>n&&(o.w=Math.round(o.w*n/o.h),o.h=n);var s=e.options.isMobile?Math.max(t(window).width(),t(document).width()):t(window).width();s=s?s:t(document).width();var r=s-2*e.options.bordersize-2*e.options.bordermargin;return o.w>r&&(o.h=Math.round(o.h*r/o.w),o.w=r),o},e.showData=function(){e.$text.text().length>0&&e.$elemData.show(),e.$text.text().length>0&&"inside"!=e.options.titlestyle&&e.$lightboxBox.css({height:String(e.$lightboxBox.height()+e.options.barheight)+"px"}),t("#html5-lightbox-overlay",e.$lightbox).css({height:Math.max(t(window).height(),t(document).height())})},e.resizeLightbox=function(o,i,n,s){var r=window.innerHeight?window.innerHeight:t(window).height(),l=n?e.options.resizespeed:0,a=o+2*e.options.bordersize,h=i+2*e.options.bordersize,d=Math.round((r-e.options.navheight)/2-h/2);"inside"!=e.options.titlestyle&&(d-=Math.round(e.options.barheight/2)),16>d&&(d=16),a==e.$elemWrap.width()&&h==e.$elemWrap.height()&&(l=0),e.$loading.hide(),e.$watermark.hide(),e.options.arrowloop||(e.options.prevElem>=e.options.curElem&&e.$prev.hide(),e.options.nextElem<=e.options.curElem&&e.$next.hide()),e.options.nextElem<=e.options.curElem&&e.options.onlastitem&&window[e.options.onlastitem]&&"function"==typeof window[e.options.onlastitem]&&window[e.options.onlastitem](e.currentElem),e.options.prevElem>=e.options.curElem&&e.options.onfirstitem&&window[e.options.onfirstitem]&&"function"==typeof window[e.options.onfirstitem]&&window[e.options.onfirstitem](e.currentElem),e.$elem.bind("mouseenter mousemove",function(){(e.options.arrowloop&&e.options.prevElem>=0||!e.options.arrowloop&&e.options.prevElem>=0&&e.options.prevElem=0||!e.options.arrowloop&&e.options.nextElem>=0&&e.options.nextElem>e.options.curElem)&&e.$next.fadeIn()}),e.$elem.bind("mouseleave",function(){e.$next.fadeOut(),e.$prev.fadeOut()}),e.$lightboxBox.css({"margin-top":d}),e.$lightboxBox.css({width:a,height:h}),e.$elemWrap.animate({width:a},l).animate({height:h},l,function(){e.$loading.show(),e.$watermark.show(),e.$close.show(),e.$elem.css({"background-color":e.options.bgcolor}),s()})},e.reset=function(){e.options.stamp&&e.$watermark.hide(),e.showing=!1,e.$image.empty(),e.$text.empty(),e.$error.hide(),e.$loading.hide(),e.$image.hide(),e.$elemData.hide(),e.$close.hide(),e.$elem.css({"background-color":""})},e.resetNavigation=function(){e.options.navheight=0,t(".html5-nav").remove()},e.finish=function(){e.reset(),e.resetNavigation(),e.$lightbox.hide(),e.showObjects(),e.options.oncloselightbox&&window[e.options.oncloselightbox]&&"function"==typeof window[e.options.oncloselightbox]&&window[e.options.oncloselightbox](e.currentElem)},e.pauseSlide=function(){},e.playSlide=function(){},e.gotoSlide=function(o){if(-1==o){if(e.options.nextElem<0)return;e.options.curElem=e.options.nextElem}else if(-2==o){if(e.options.prevElem<0)return;e.options.curElem=e.options.prevElem}else o>=0&&(e.options.curElem=o);e.calcNextPrevElem(),e.reset(),e.loadCurElem()},e.supportKeyboard=function(){t(document).keyup(function(o){e.showing&&(e.options.supportesckey&&27==o.keyCode?e.finish():e.options.supportarrowkeys&&(39==o.keyCode?e.gotoSlide(-1):37==o.keyCode&&e.gotoSlide(-2)))})},e.enableSwipe=function(){e.$elem.touchSwipe({preventWebBrowser:!0,swipeLeft:function(){e.gotoSlide(-1)},swipeRight:function(){e.gotoSlide(-2)}})},e.hideObjects=function(){t("select, embed, object").css({visibility:"hidden"})},e.showObjects=function(){t("select, embed, object").css({visibility:"visible"})},e.embedHTML5Video=function(o,i,n){o.html("
"),e.options.nativehtml5controls||(t("video",o).data("src",i),t("video",o).lightboxHTML5VideoControls(e.options.skinsfolder,e,e.options.videohidecontrols,!1))},e.embedFlash=function(o,i,n,s){if(e.options.flashInstalled){var r={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};r.width="100%",r.height="100%",r.src=i,r.flashVars=t.param(s),r.wmode=n;var l="";for(var a in r)l+=a+"="+r[a]+" ";o.html("")}else o.html("
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
")},e.checkType=function(o){return o?o.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)?0:o.match(/[^\.]\.(swf)\s*$/i)?1:o.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i)?2:o.match(/\:\/\/.*(youtube\.com)/i)||o.match(/\:\/\/.*(youtu\.be)/i)?3:o.match(/\:\/\/.*(vimeo\.com)/i)?4:o.match(/\:\/\/.*(dailymotion\.com)/i)||o.match(/\:\/\/.*(dai\.ly)/i)?9:o.match(/[^\.]\.(pdf)\s*$/i)?5:o.match(/[^\.]\.(mp3)\s*$/i)?6:o.match(/[^\.]\.(flv)\s*$/i)?8:7:-1},e.showLightbox=function(o,i,n,s,r,l,a,h,d){e.$next.hide(),e.$prev.hide(),e.reset(),e.$lightbox.show(),e.options.supportCSSPositionFixed||e.$lightbox.css("top",t(window).scrollTop());var p=window.innerHeight?window.innerHeight:t(window).height(),c=e.options.loadingwidth+2*e.options.bordersize,u=e.options.loadingheight+2*e.options.bordersize,m=Math.round(p/2-u/2);"inside"!=e.options.titlestyle&&(m-=Math.round(e.options.barheight/2)),16>m&&(m=16),e.$lightboxBox.css({"margin-top":m,width:c,height:u}),e.$elemWrap.css({width:c,height:u}),e.loadElem(new Array(o,i,n,null,s,r,l,a,h,d))},e.addItem=function(o,t,i,n,s,r,l,a,h){type=e.checkType(o),e.elemArray.push(new Array(type,o,t,i,n,s,r,l,a,h))},e.showItem=function(o){if(e.elemArray.length<=0)return!0;e.hideObjects();for(var i=0;il&&(l=16),e.$lightboxBox.css({"margin-top":l,width:s,height:r}),e.$elemWrap.css({width:s,height:r}),e.loadCurElem(),!1},e.init(),e.unbind("click").click(e.clickHandler)}}(jQuery),function(o){o.fn.touchSwipe=function(t){var i={preventWebBrowser:!1,swipeLeft:null,swipeRight:null,swipeTop:null,swipeBottom:null};return t&&o.extend(i,t),this.each(function(){function t(o){var t=o.originalEvent;t.targetTouches.length>=1?(l=t.targetTouches[0].pageX,a=t.targetTouches[0].pageY):s(o)}function e(o){i.preventWebBrowser&&o.preventDefault();var t=o.originalEvent;t.targetTouches.length>=1?(h=t.targetTouches[0].pageX,d=t.targetTouches[0].pageY):s(o)}function n(o){h>0||d>0?(r(),s(o)):s(o)}function s(o){l=-1,a=-1,h=-1,d=-1}function r(){h>l?i.swipeRight&&i.swipeRight.call():i.swipeLeft&&i.swipeLeft.call(),d>a?i.swipeBottom&&i.swipeBottom.call():i.swipeTop&&i.swipeTop.call()}var l=-1,a=-1,h=-1,d=-1;try{o(this).bind("touchstart",t),o(this).bind("touchmove",e),o(this).bind("touchend",n),o(this).bind("touchcancel",s)}catch(p){}})}}(jQuery),function(o){o.fn.lightboxHTML5VideoControls=function(t,i,e,n){var s="ontouchstart"in window,r=s?"touchstart":"mousedown",l=s?"touchmove":"mousemove",a=s?"touchcancel":"mouseup",h=s?"touchstart":"click",d=32,p=s?48:36,c=null,u=null,m=!1,g=!1,b=!0,w=null!=navigator.userAgent.match(/iPod/i)||null!=navigator.userAgent.match(/iPhone/i),f=o(this).data("ishd"),v=o(this).data("hd"),x=o(this).data("src"),y=o(this);if(y.get(0).removeAttribute("controls"),w){var k=y.height()-p;y.css({height:k})}var E=o("
");w||(y.after(E),E.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+t+"html5boxplayer_playvideo.png')","background-position":"center center","background-repeat":"no-repeat"}).bind(h,function(){y.get(0).play()}));var $=o("
"),S=o("
--:--
--:--
");y.after(S),y.after($),$.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0,"z-index":2147483647}),S.css({display:"block",position:"absolute",width:"100%",height:p,left:0,bottom:0,right:0,"max-width":"640px",margin:"0 auto"});var z=function(){b=!0};y.bind(h,function(){b=!0}).hover(function(){b=!0},function(){b=!1}),e||setInterval(function(){b&&(S.show(),b=!1,clearTimeout(c),c=setTimeout(function(){y.get(0).paused||S.fadeOut()},5e3))},250),o(".html5boxVideoControlsBg",S).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:.7,filter:"alpha(opacity=70)"}),o(".html5boxPlayPause",S).css({display:"block",position:"relative",width:d+"px",height:d+"px",margin:Math.floor((p-d)/2),"float":"left"});var A=o(".html5boxPlay",S),I=o(".html5boxPause",S);A.css({display:"block",position:"absolute",top:0,left:0,width:d+"px",height:d+"px",cursor:"pointer","background-image":"url('"+t+"html5boxplayer_playpause.png')","background-position":"top left"}).hover(function(){o(this).css({"background-position":"bottom left"})},function(){o(this).css({"background-position":"top left"})}).bind(h,function(){y.get(0).play()}),I.css({display:"none",position:"absolute",top:0,left:0,width:d+"px",height:d+"px",cursor:"pointer","background-image":"url('"+t+"html5boxplayer_playpause.png')","background-position":"top right"}).hover(function(){o(this).css({"background-position":"bottom right"})},function(){o(this).css({"background-position":"top right"})}).bind(h,function(){y.get(0).pause()});var M=o(".html5boxTimeCurrent",S),T=o(".html5boxTimeTotal",S),F=o(".html5boxSeeker",S),P=o(".html5boxSeekerPlay",S),H=o(".html5boxSeekerBuffer",S),B=o(".html5boxSeekerHandler",S);if(M.css({display:"block",position:"relative","float":"left","line-height":p+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"}),T.css({display:"block",position:"relative","float":"right","line-height":p+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"}),F.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((p-10)/2)+"px 4px"}).bind(r,function(o){var t=s?o.originalEvent.touches[0]:o,i=t.pageX-F.offset().left;P.css({width:i}),y.get(0).currentTime=i*y.get(0).duration/F.width(),F.bind(l,function(o){var t=s?o.originalEvent.touches[0]:o,i=t.pageX-F.offset().left;P.css({width:i}),y.get(0).currentTime=i*y.get(0).duration/F.width()})}).bind(a, function(){F.unbind(l)}),H.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"}),P.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"}),!w&&(y.get(0).requestFullscreen||y.get(0).webkitRequestFullScreen||y.get(0).mozRequestFullScreen||y.get(0).webkitEnterFullScreen||y.get(0).msRequestFullscreen)){var L=function(o){o?(y.get(0).requestFullscreen?y.get(0).requestFullscreen():y.get(0).webkitRequestFullScreen?y.get(0).webkitRequestFullScreen():y.get(0).mozRequestFullScreen?y.get(0).mozRequestFullScreen():y.get(0).webkitEnterFullScreen&&y.get(0).webkitEnterFullScreen(),y.get(0).msRequestFullscreen&&y.get(0).msRequestFullscreen()):document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},O=function(t){S.css({position:t?"fixed":"absolute"});var i=C.css("background-position")?C.css("background-position").split(" ")[1]:C.css("background-position-y");C.css({"background-position":(t?"right":"left")+" "+i}),$.css({display:t?"block":"none"}),t?(o(document).bind("mousemove",z),S.css({"z-index":2147483647})):(o(document).unbind("mousemove",z),S.css({"z-index":""}))};document.addEventListener("fullscreenchange",function(){g=document.fullscreen,O(document.fullscreen)},!1),document.addEventListener("mozfullscreenchange",function(){g=document.mozFullScreen,O(document.mozFullScreen)},!1),document.addEventListener("webkitfullscreenchange",function(){g=document.webkitIsFullScreen,O(document.webkitIsFullScreen)},!1),y.get(0).addEventListener("webkitbeginfullscreen",function(){g=!0},!1),y.get(0).addEventListener("webkitendfullscreen",function(){g=!1},!1),o("head").append("");var C=o(".html5boxFullscreen",S);C.css({display:"block",position:"relative","float":"right",width:d+"px",height:d+"px",margin:Math.floor((p-d)/2),cursor:"pointer","background-image":"url('"+t+"html5boxplayer_fullscreen.png')","background-position":"left top"}).hover(function(){var t=o(this).css("background-position")?o(this).css("background-position").split(" ")[0]:o(this).css("background-position-x");o(this).css({"background-position":t+" bottom"})},function(){var t=o(this).css("background-position")?o(this).css("background-position").split(" ")[0]:o(this).css("background-position-x");o(this).css({"background-position":t+" top"})}).bind(h,function(){g=!g,L(g)})}if(v){var j=o(".html5boxHD",S);j.css({display:"block",position:"relative","float":"right",width:d+"px",height:d+"px",margin:Math.floor((p-d)/2),cursor:"pointer","background-image":"url('"+t+"html5boxplayer_hd.png')","background-position":(f?"right":"left")+" center"}).bind(h,function(){f=!f,o(this).css({"background-position":(f?"right":"left")+" center"}),i.isHd=f;var t=y.get(0).isPaused;y.get(0).setAttribute("src",(f?v:x)+"#t="+y.get(0).currentTime),t?w||y.get(0).pause():y.get(0).play()})}var q=y.get(0).volume;if(y.get(0).volume=q/2+.1,y.get(0).volume===q/2+.1){y.get(0).volume=q;var V=o(".html5boxVolume",S),D=o(".html5boxVolumeButton",S),_=o(".html5boxVolumeBar",S),W=o(".html5boxVolumeBarBg",S),N=o(".html5boxVolumeBarActive",S);V.css({display:"block",position:"relative","float":"right",width:d+"px",height:d+"px",margin:Math.floor((p-d)/2)}).hover(function(){clearTimeout(u);var o=y.get(0).volume;N.css({height:Math.round(100*o)+"%"}),_.show()},function(){clearTimeout(u),u=setTimeout(function(){_.hide()},1e3)}),D.css({display:"block",position:"absolute",top:0,left:0,width:d+"px",height:d+"px",cursor:"pointer","background-image":"url('"+t+"html5boxplayer_volume.png')","background-position":"top left"}).hover(function(){var t=o(this).css("background-position")?o(this).css("background-position").split(" ")[0]:o(this).css("background-position-x");o(this).css({"background-position":t+" bottom"})},function(){var t=o(this).css("background-position")?o(this).css("background-position").split(" ")[0]:o(this).css("background-position-x");o(this).css({"background-position":t+" top"})}).bind(h,function(){var t=y.get(0).volume;t>0?(volumeSaved=t,t=0):t=volumeSaved;var i=o(this).css("background-position")?o(this).css("background-position").split(" ")[1]:o(this).css("background-position-y");D.css({"background-position":(t>0?"left":"right")+" "+i}),y.get(0).volume=t,N.css({height:Math.round(100*t)+"%"})}),_.css({display:"none",position:"absolute",left:4,bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((p-d)/2),"background-color":"#000000",opacity:.7,filter:"alpha(opacity=70)"}),W.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"}),N.css({display:"block",position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"}),W.bind(r,function(o){var t=s?o.originalEvent.touches[0]:o,i=1-(t.pageY-W.offset().top)/W.height();i=i>1?1:0>i?0:i,N.css({height:Math.round(100*i)+"%"}),D.css({"background-position":"left "+(i>0?"top":"bottom")}),y.get(0).volume=i,W.bind(l,function(o){var t=s?o.originalEvent.touches[0]:o,i=1-(t.pageY-W.offset().top)/W.height();i=i>1?1:0>i?0:i,N.css({height:Math.round(100*i)+"%"}),D.css({"background-position":"left "+(i>0?"top":"bottom")}),y.get(0).volume=i})}).bind(a,function(){W.unbind(l)})}var R=function(o){var t=Math.floor(o/3600),i=10>t?"0"+t:t,e=Math.floor((o-60*t)/60),n=10>e?"0"+e:e,s=Math.floor(o-(3600*t+60*e)),r=10>s?"0"+s:s,l=n+":"+r;return t>0&&(l=i+":"+l),l};n&&E.hide(),e&&S.hide();var Q=function(){n||E.hide(),e||(A.hide(),I.show())},Y=function(){n||E.show(),e||(S.show(),clearTimeout(c),A.show(),I.hide())},X=function(){o(window).trigger("html5lightbox.videoended"),n||E.show(),e||(S.show(),clearTimeout(c),A.show(),I.hide())},G=function(){var o=y.get(0).currentTime;if(o){M.text(R(o));var t=y.get(0).duration;if(t&&(T.text(R(t)),!m)){var i=F.width(),e=Math.round(i*o/t);P.css({width:e}),B.css({left:e})}}},K=function(){if(y.get(0).buffered&&y.get(0).buffered.length>0&&!isNaN(y.get(0).buffered.end(0))&&!isNaN(y.get(0).duration)){var o=F.width();H.css({width:Math.round(o*y.get(0).buffered.end(0)/y.get(0).duration)})}};try{y.bind("play",Q),y.bind("pause",Y),y.bind("ended",X),y.bind("timeupdate",G),y.bind("progress",K)}catch(U){}}}(jQuery),jQuery(document).ready(function(){"undefined"==typeof html5Lightbox&&(html5Lightbox=jQuery(".html5lightbox").html5lightbox())})}!function(){"use strict";for(var o=document.getElementsByTagName("script"),t="",i=0;i