function loadHtml5LightBox(a){var u,t,W;(u=jQuery).fn.html5lightbox=function(o){var d=this;d.options=u.extend({freelink:"http://html5box.com/",defaultvideovolume:1,autoclose:!1,insideiframe:!1,autoresizecontent:!0,defaultwidth:960,defaultheight:540,autoplay:!0,loopvideo:!1,html5player:!0,responsive:!0,nativehtml5controls:!1,videohidecontrols:!1,nativecontrolsonfirefox:!0,nativecontrolsonie:!0,imagekeepratio:!0,maxheight:!1,useflashonie9:!0,useflashonie10:!0,useflashonie11:!1,useflashformp4onfirefox:!1,googleanalyticsaccount:"",arrowloop:!0,showall:!1,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:.9,bgcolor:"#fff",bordersize:8,borderradius:0,bordermargin:16,bordertopmargin:48,bordertopmarginsmall:48,barautoheight:!0,barheight:64,responsivebarheight:!1,smallscreenheight:415,barheightonsmallheight:64,notkeepratioonsmallheight:!1,loadingwidth:64,loadingheight:64,resizespeed:400,fadespeed:400,jsfolder:a,skinsfoldername:"skins/default/",loadingimage:"lightbox-loading.gif",nextimage:"lightbox-next.png",previmage:"lightbox-prev.png",closeimage:"lightbox-close.png",playvideoimage:"lightbox-playvideo.png",titlebgimage:"lightbox-titlebg.png",navarrowsprevimage:"lightbox-navprev.png",navarrowsnextimage:"lightbox-navnext.png",navarrowsalwaysshowontouch:!0,navarrowsbottomscreenwidth:479,closeonoverlay:!0,alwaysshownavarrows:!1,showplaybutton:!0,playimage:"lightbox-play.png",pauseimage:"lightbox-pause.png",fullscreenmode:!1,fullscreencloseimage:"lightbox-close-fullscreen.png",fullscreennextimage:"lightbox-next-fullscreen.png",fullscreenprevimage:"lightbox-prev-fullscreen.png",fullscreennomargin:!1,fullscreenmodeonsmallscreen:!1,fullscreennomarginonsmallscreen:!1,fullscreensmallscreenwidth:736,fullscreenbgcolor:"rgba(0, 0, 0, 0.9)",fullscreennomargintextinside:!1,videobgcolor:"#000",html5videoposter:"",showtitle:!0,titlestyle:"bottom",titleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px;",titlebottomcss:"color:#333; font-size:16px; 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;",fullscreentitlebottomcss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px 8px;",fullscreendescriptionbottomcss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",showtitleprefix:!0,titleprefix:"%NUM / %TOTAL",autoslide:!1,slideinterval:5e3,showtimer:!0,timerposition:"bottom",timerheight:2,timercolor:"#dc572e",timeropacity:1,initvimeo:!0,inityoutube:!0,initsocial:!0,showsocial:!1,socialposition:"position:absolute;top:100%;right:0;",socialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",socialdirection:"horizontal",socialbuttonsize:32,socialbuttonfontsize:18,socialrotateeffect:!0,showfacebook:!0,showtwitter:!0,showpinterest:!0,imagepercentage:75,sidetobottomscreenwidth:479,errorwidth:280,errorheight:48,errorcss:"text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;",enabletouchswipe:!0,supportesckey:!0,supportarrowkeys:!0,version:"3.3",stamp:!0,freemark:"72,84,77,76,53,32,76,105,103,104,116,98,111,120,32,70,114,101,101,32,86,101,114,115,105,111,110",watermark:"",watermarklink:""},o),"undefined"!=typeof html5lightbox_options&&html5lightbox_options&&u.extend(d.options,html5lightbox_options),u("div#html5lightbox_options").length&&u.each(u("div#html5lightbox_options").data(),function(o,t){d.options[o.toLowerCase()]=t}),u("div#html5lightbox_general_options").length&&u.each(u("div#html5lightbox_general_options").data(),function(o,t){d.options[o.toLowerCase()]=t});var t,c=d.options.defaultwidth,m=d.options.defaultheight;d.options.types=["IMAGE","FLASH","VIDEO","YOUTUBE","VIMEO","PDF","MP3","WEB","FLV","DAILYMOTION","DIV","WISTIA","IFRAMEVIDEO"],d.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1),d.options.skinsfolder=d.options.skinsfoldername,0"+o+""),d.$lightbox=u(""),d.options.positionFixed=d.options.supportCSSPositionFixed&&d.options.responsive&&!d.options.iequirksmode,d.$lightbox.css({position:d.options.positionFixed?"fixed":"absolute"}),d.$lightbox.appendTo("body"),d.$lightboxBox=u("#html5-lightbox-box",d.$lightbox),d.$elem=u("#html5-elem-box",d.$lightbox),d.$elemWrap=u("#html5-elem-wrap",d.$lightbox),d.$loading=u("#html5-loading",d.$lightbox),d.$error=u("#html5-error",d.$lightbox),d.$image=u("#html5-image",d.$lightbox),d.options.fullscreenmode&&d.options.fullscreennomargin&&d.$elem.css({overflow:"hidden"});var t,i="";"left"==d.options.titlestyle?d.$elem.prepend(i):d.$elem.append(i),d.$elemData=u("#html5-elem-data-box",d.$lightbox),d.$text=u("#html5-text",d.$lightbox),0',o=("horizontal"==d.options.socialdirection?"display:inline-block;":"display:block;")+"margin:4px;",i="display:table-cell;width:"+d.options.socialbuttonsize+"px;height:"+d.options.socialbuttonsize+"px;font-size:"+d.options.socialbuttonfontsize+"px;border-radius:50%;color:#fff;vertical-align:middle;text-align:center;cursor:pointer;padding:0;",d.options.showfacebook&&(t+='
'),d.options.showtwitter&&(t+='
'),d.options.showpinterest&&(t+='
'),t+='
',d.$lightboxBox.append(t),u(".html5-social-btn",d.$lightbox).on("click",function(){var o,t=window.location.href+(window.location.href.indexOf("?")<0?"?":"&")+"html5lightboxshare="+encodeURIComponent(d.currentElem[1]),i=d.currentElem[2],e=d.currentElem[1];0==d.currentElem[0]?e=d.absoluteUrl(d.currentElem[1]):3==d.currentElem[0]?e="https://img.youtube.com/vi/"+d.getYoutubeId(d.currentElem[1])+"/0.jpg":0<(o=u('.html5lightbox[href="'+d.currentElem[1]+'"]')).length&&(o.data("shareimage")&&0
"),d.$next=u(".html5-next-fullscreen",d.$lightbox),d.$prev=u(".html5-prev-fullscreen",d.$lightbox),d.$lightboxBox.append("
"),d.$nextbottom=u(".html5-next-bottom-fullscreen",d.$lightbox),d.$prevbottom=u(".html5-prev-bottom-fullscreen",d.$lightbox),d.$nextbottom.on("click",function(){d.nextArrowClicked()}),d.$prevbottom.on("click",function(){d.prevArrowClicked()}),d.$lightbox.append("
"),d.$close=u("#html5-close-fullscreen",d.$lightbox)):(d.$elemWrap.append(""),d.$next=u("#html5-next",d.$lightbox),d.$prev=u("#html5-prev",d.$lightbox),(d.options.isTouch&&d.options.navarrowsalwaysshowontouch||d.options.alwaysshownavarrows)&&(d.$lightboxBox.append("
"),d.$nexttouch=u(".html5-next-touch",d.$lightbox),d.$prevtouch=u(".html5-prev-touch",d.$lightbox),d.$nexttouch.on("click",function(){d.nextArrowClicked()}),d.$prevtouch.on("click",function(){d.prevArrowClicked()})),d.$lightboxBox.append(""),d.$close=u("#html5-close",d.$lightbox)),d.$watermark=u("#html5-watermark",d.$lightbox),d.options.stamp?d.$watermark.html("
"+d.options.freemark+"
"):d.options.watermark&&(t="",d.options.watermarklink&&(t=""+t+""),d.$watermark.html(t)),d.options.closeonoverlay&&u("#html5-lightbox-overlay",d.$lightbox).click(d.finish),d.$close.click(d.finish),d.$next.on("click",function(){d.nextArrowClicked()}),d.$prev.on("click",function(){d.prevArrowClicked()}),u(window).on("resize",function(){clearTimeout(d.options.resizeTimeout),d.options.resizeTimeout=setTimeout(function(){d.resizeWindow()},500)}),u(window).on("scroll",function(){d.scrollBox()}),u(window).on("orientationchange",function(o){d.options.isMobile&&d.resizeWindow()}),d.options.isIPhone&&(d.options.windowInnerHeight=window.innerHeight,setInterval(function(){d.options.windowInnerHeight!=window.innerHeight&&(d.options.windowInnerHeight=window.innerHeight,d.resizeWindow())},500)),d.options.enabletouchswipe&&d.enableSwipe()},d.slideTimer=function(o,t,i){var e=this;e.timeout=o;var n=null,s=0,l=!1,r=!1,a=!1;return this.pause=function(){r&&(l=!0,clearInterval(n))},this.resume=function(o){a&&!o||(a=!1,r&&l&&(l=!1,n=setInterval(function(){(s+=50)>e.timeout&&(clearInterval(n),t&&t()),i&&i(s/e.timeout)},50)))},this.stop=function(){clearInterval(n),i&&i(-1),s=0,r=l=!1},this.start=function(){s=0,r=!(l=!1),n=setInterval(function(){(s+=50)>e.timeout&&(clearInterval(n),t&&t()),i&&i(s/e.timeout)},50)},this.startandpause=function(){a=r=l=!(s=0)},this},d.updateTimer=function(o){o=Math.round(100*o);100=d.options.curElem&&d.options.onfirstarrowclicked&&window[d.options.onfirstarrowclicked]&&"function"==typeof window[d.options.onfirstarrowclicked]&&window[d.options.onfirstarrowclicked](),d.gotoSlide(-2)},d.calcNextPrevElem=function(){d.options.nextElem=-1,d.options.prevElem=-1,d.options.inGroup=!1,d.options.groupIndex=0,d.options.groupCount=0;for(var o=d.elemArray[d.options.curElem][3],t=0;td.options.curElem;i--)if(d.matchGroup(e,d.elemArray[i][3])){d.options.prevElem=i;break}}}(0<=d.options.nextElem||0<=d.options.prevElem)&&(d.options.inGroup=!0)},d.calcBoxPosition=function(o,t){var i=o+2*d.options.bordersize,e=t+2*d.options.bordersize,n=window.innerHeight||u(window).height(),o=Math.round((n-d.options.navheight)/2-e/2);"bottom"==d.options.titlestyle&&(o-=Math.round(d.options.barheight/2));t=u(window).width()")}),o.src=t},d.matchGroup=function(o,t){if(d.options.showall)return!0;if(!o||!t)return!1;var i,e=o.split(":"),n=t.split(":"),s=!1;for(i in e)if(-1
");for(var i=0,e=0;e"),this.loadThumbnail(d.elemArray[e][8],i),i++);u(".html5-nav-thumb").hover(function(){u(this).css({opacity:1}),u(this).css({border:d.options.thumbborder+"px solid "+d.options.thumbhighlightbordercolor})},function(){u(this).css({opacity:d.options.thumbopacity}),u(this).css({border:d.options.thumbborder+"px solid "+d.options.thumbbordercolor})}),u(".html5-nav-thumb").on("click",function(){var o=u(this).data("arrayindex");0<=o&&d.gotoSlide(o)}),d.options.totalwidth=i*(d.options.thumbgap+d.options.thumbwidth+2*d.options.thumbborder),u(".html5-nav-list").css({display:"block",position:"relative","margin-left":0,width:d.options.totalwidth+"px"}).append("
");var n=u(".html5-nav-mask"),s=u(".html5-nav-prev"),l=u(".html5-nav-next");s.on("click",function(){var o=u(".html5-nav-list"),t=u(".html5-nav-next"),i=u(window).width()-2*d.options.navbuttonwidth,e=parseInt(o.css("margin-left"))+i;0<=e?(e=0,u(this).css({"background-position":"center left"})):u(this).css({"background-position":"center right"}),e<=i-d.options.totalwidth?t.css({"background-position":"center left"}):t.css({"background-position":"center right"}),o.animate({"margin-left":e})}),l.on("click",function(){var o=u(".html5-nav-list"),t=u(".html5-nav-prev"),i=u(window).width()-2*d.options.navbuttonwidth,e=parseInt(o.css("margin-left"))-i;e<=i-d.options.totalwidth?(e=i-d.options.totalwidth,u(this).css({"background-position":"center left"})):u(this).css({"background-position":"center right"}),0<=e?t.css({"background-position":"center left"}):t.css({"background-position":"center right"}),o.animate({"margin-left":e})});var r=u(window).width();d.options.totalwidth<=r?(n.css({width:d.options.totalwidth+"px"}),s.hide(),l.hide()):(n.css({width:r-2*d.options.navbuttonwidth+"px"}),s.show(),l.show())}}},d.loadElem=function(o){switch(d.currentElem=o,d.showing=!0,d.showNavigation(),d.$elem.off("mouseenter").off("mouseleave").off("mousemove"),d.$loading.show(),d.options.onshowitem&&window[d.options.onshowitem]&&"function"==typeof window[d.options.onshowitem]&&window[d.options.onshowitem](o),o[0]){case 0:var t=new Image;u(t).on("load",function(){d.showImage(o,t.width,t.height)}),u(t).on("error",function(){d.showError()}),t.src=o[1];break;case 1:d.showSWF(o);break;case 2:case 8:d.showVideo(o);break;case 3:case 4:case 9:case 11:case 12:d.showYoutubeVimeo(o);break;case 5:d.showPDF(o);break;case 6:d.showMP3(o);break;case 7:d.showWeb(o);break;case 10:d.showDiv(o)}d.options.googleanalyticsaccount&&window._gaq&&window._gaq.push(["_trackEvent","Lightbox","Open",o[1]])},d.loadCurElem=function(){d.loadElem(d.elemArray[d.options.curElem])},d.showError=function(){d.$loading.hide(),d.resizeLightbox(d.options.errorwidth,d.options.errorheight,!0,function(){d.$loading.hide(),d.$error.show(),d.$elem.fadeIn(d.options.fadespeed,function(){d.showData()})})},d.calcTextWidth=function(o){return o-36},d.showTitle=function(o,t,i){"inside"==d.options.titlestyle&&d.$elemData.css({width:o+"px"});o="";d.options.showtitle&&t&&0 "+o)),d.options.showdescription&&i&&0'+i+"

"),d.$text.html(o),d.options.inGroup&&d.options.showplaybutton&&(d.autosliding?(u("#html5-play",d.$lightbox).hide(),u("#html5-pause",d.$lightbox).show()):(u("#html5-play",d.$lightbox).show(),u("#html5-pause",d.$lightbox).hide()),u("#html5-play",d.$lightbox).on("click",function(){u("#html5-play",d.$lightbox).hide(),u("#html5-pause",d.$lightbox).show(),d.slideTimeout&&(d.slideTimeout.stop(),d.slideTimeout.start(),d.autosliding=!0)}),u("#html5-pause",d.$lightbox).on("click",function(){u("#html5-play",d.$lightbox).show(),u("#html5-pause",d.$lightbox).hide(),d.slideTimeout&&(d.slideTimeout.stop(),d.autosliding=!1)})),u("#html5-social",d.$lightbox).show()},d.showImage=function(t,o,i){var e,n;t[4]?e=t[4]:(e=o,t[4]=o),t[5]?n=t[5]:(n=i,t[5]=i);var s=d.calcElemSize({w:e,h:n},d.options.imagekeepratio);d.resizeLightbox(s.w,s.h,!0,function(){d.$loading.hide(),d.showTitle(s.w,t[2],t[9]);var o=d.options.showtimer&&d.options.inGroup?"":"";d.$image.show(),d.$image.html("
"+o+"
"),d.$elem.fadeIn(d.options.fadespeed,function(){d.showData()}),d.autosliding&&(d.slideTimeout.stop(),d.slideTimeout.start())})},d.showSWF=function(o){var t=o[4]||c,i=o[5]||m,e=d.calcElemSize({w:t,h:i},!0),t=e.w,i=e.h;d.resizeLightbox(t,i,!0,function(){d.$loading.hide(),d.showTitle(e.w,o[2],o[9]),d.$image.html("
").show(),d.embedFlash(u("#html5lightbox-swf"),o[1],"window",{width:t,height:i}),d.$elem.show(),d.showData(),d.autosliding&&(d.slideTimeout.stop(),d.slideTimeout.start())})},d.showVideo=function(i){d.slideTimeout.stop();var e=i[4]||c,n=i[5]||m,s=d.calcElemSize({w:e,h:n},!0),e=s.w,n=s.h;d.resizeLightbox(e,n,!0,function(){d.$loading.hide(),d.showTitle(s.w,i[2],i[9]),d.$image.html("
").show();var o,t=!1;d.options.isIE678||8==i[0]||d.options.isIE9&&d.options.useflashonie9||d.options.isIE10&&d.options.useflashonie10||d.options.isIE11&&d.options.useflashonie11?t=!1:d.options.isMobile?t=!0:!d.options.html5player&&d.options.flashInstalled||!d.options.html5VideoSupported||(t=!0,(d.options.isFirefox||d.options.isOpera)&&(i[6]||i[7]||d.options.canplaymp4&&!d.options.useflashformp4onfirefox||(t=!1))),t?(o=i[1],(d.options.isFirefox||d.options.isOpera)&&(i[6]?o=i[6]:i[7]&&(o=i[7])),d.embedHTML5Video(u("#html5lightbox-video"),o,d.options.autoplay,d.options.loopvideo)):("/"!=(o=i[1]).charAt(0)&&"http:"!=o.substring(0,5)&&"https:"!=o.substring(0,6)&&(o=d.options.htmlfolder+o),d.embedFlash(u("#html5lightbox-video"),d.options.jsfolder+"html5boxplayer.swf","transparent",{width:e,height:n,jsobjectname:"html5Lightbox",hidecontrols:d.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:o,hdfile:"",ishd:"0",defaultvolume:d.options.defaultvideovolume,autoplay:d.options.autoplay?"1":"0",loop:d.options.loopvideo?"1":"0",errorcss:".html5box-error"+d.options.errorcss,id:0})),d.$elem.show(),d.showData()})},d.loadNext=function(){u(window).trigger("html5lightbox.videofinished"),d.autosliding?d.gotoSlide(-1):d.options.autoclose&&d.finish()},d.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 o,t,i=n[1],e="";if(3==n[0]&&(e=d.getYoutubeId(i),i=d.prepareYoutubeHref(i)),9==n[0]&&(i=d.prepareDailymotionHref(i)),d.options.autoplay&&(i+=i.indexOf("?")<0?"?":"&",11==n[0]?i+="autoPlay=true":i+="autoplay=1"),d.options.loopvideo)switch(i+=i.indexOf("?")<0?"?":"&",n[0]){case 3:i+="loop=1&playlist="+e;break;case 4:case 9:i+="loop=1";break;case 11:i+="endVideoBehavior=loop"}3==n[0]?(i.indexOf("?")<0?i+="?wmode=transparent&rel=0":i+="&wmode=transparent&rel=0",d.options.videohidecontrols&&(i+="&controls=0&showinfo=0"),i+="&enablejsapi=1&origin="+document.location.protocol+"//"+document.location.hostname):4==n[0]&&(i+=i.indexOf("?")<0?"?":"&",i+="api=1&player_id=html5boxiframevideo"),u("#html5lightbox-video").html(""),d.$elem.show(),d.showData(),3==n[0]&&"object"==typeof YT&&"function"==typeof YT.Player?new YT.Player("html5boxiframevideo",{events:{onStateChange:function(o){o.data==YT.PlayerState.ENDED&&(u(window).trigger("html5lightbox.videofinished"),d.autosliding?d.gotoSlide(-1):d.options.autoclose&&d.finish())}}}):4==n[0]&&"function"==typeof $f&&(o=u("#html5boxiframevideo")[0],(t=$f(o)).addEvent("ready",function(){t.addEvent("finish",function(o){u(window).trigger("html5lightbox.videofinished"),d.autosliding?d.gotoSlide(-1):d.options.autoclose&&d.finish()})}))})},d.showPDF=function(o){},d.showMP3=function(o){},d.showDiv=function(t){var o=u(window).width(),i=window.innerHeight||u(window).height(),o=t[4]||o,i=t[5]||i-d.options.navheight,e=d.calcElemSize({w:o,h:i},!1),o=e.w,i=e.h;d.resizeLightbox(o,i,!0,function(){d.$loading.hide(),d.showTitle(e.w,t[2],t[9]),d.$image.html("
").show();var o=t[1];0The specified div ID does not exist."),d.$elem.show(),d.showData(),d.options.autoresizecontent&&d.resizeWindow(),d.autosliding&&(d.slideTimeout.stop(),d.slideTimeout.start())})},d.isSameDomain=function(o){if("http:"!=o.substring(0,5)&&"https:"!=o.substring(0,6))return!0;(t=document.createElement("a")).setAttribute("href",o);var o=t.protocol==document.location.protocol&&t.host==document.location.host&&t.port==document.location.port,t=null;return o},d.showWeb=function(o){var t=u(window).width(),i=window.innerHeight||u(window).height(),t=o[4]||t,i=o[5]||i-d.options.navheight,e=d.calcElemSize({w:t,h:i},!1),t=e.w,i=e.h;d.resizeLightbox(t,i,!0,function(){d.$loading.hide(),d.showTitle(e.w,o[2],o[9]),d.$image.html("
").show(),u("#html5lightbox-web").html(""),d.$elem.show(),d.showData(),d.options.autoresizecontent&&d.isSameDomain(o[1])&&(u("#html5lightbox-web-iframe",d.$lightbox).data("sameorigin",!0),u("#html5lightbox-web-iframe",d.$lightbox).on("load",function(){u(this).data("sameoriginloaded",!0),d.resizeWindow()})),d.autosliding&&(d.slideTimeout.stop(),d.slideTimeout.start())})},d.scrollBox=function(){},d.resizeWindow=function(){var o,t,i,e,n,s,l,r,a,h,p;d.currentElem&&d.options.responsive&&(p=u(window).width(),s=window.innerHeight||u(window).height(),d.options.responsivebarheight&&(s<=d.options.smallscreenheight?d.options.barheight=d.options.barheightonsmallheight:d.options.barheight=d.options.barheightoriginal,"bottom"==d.options.titlestyle&&"auto"!=d.options.barautoheight&&d.$elemData.css({height:d.options.barheight+"px","max-height":d.options.barheight+"px"})),i=7==d.currentElem[0]||10==d.currentElem[0]?(o=d.currentElem[4]||p,t=d.currentElem[5]||s-d.options.navheight,!1):(o=d.currentElem[4]||c,t=d.currentElem[5]||m,0!=d.currentElem[0]||d.options.imagekeepratio),e=d.calcElemSize({w:o,h:t},i),n=(r=d.calcBoxPosition(e.w,e.h))[0],h=r[1],a=r[2],d.$lightboxBox.css({"margin-top":a}),d.options.positionFixed||d.$lightboxBox.css("margin-top",u(window).scrollTop()+d.options.bordertopmargin),"left"==d.options.titlestyle||"right"==d.options.titlestyle?d.$lightboxBox.css({width:n,height:h}):(d.$lightboxBox.css({width:n,height:"auto"}),d.$elemWrap.css({width:n,height:h})),"inside"==d.options.titlestyle&&d.$elemData.css({width:e.w+"px"}),!d.options.autoresizecontent||7!=d.currentElem[0]&&10!=d.currentElem[0]||(s=!1,7==d.currentElem[0]&&0l.contentWindow.document.documentElement.offsetHeight&&(t=l.contentWindow.document.documentElement.offsetHeight,s=!0):10==d.currentElem[0]&&0d.options.sidetobottomscreenwidth&&(o.w=100*o.w/d.options.imagepercentage);var n=u(window).width()n?(t&&(o.w=Math.round(o.w*n/o.h)),o.h=n):d.options.maxheight&&(o.h=n);n=i-2*d.options.bordersize-2*d.options.bordermargin;return(d.options.fullscreenmode&&i>d.options.navarrowsbottomscreenwidth||(d.options.isTouch&&d.options.navarrowsalwaysshowontouch||d.options.alwaysshownavarrows)&&i>d.options.navarrowsbottomscreenwidth)&&(n-=64),o.w>n&&(t&&(o.h=Math.round(o.h*n/o.w)),o.w=n),o},d.showData=function(){0=d.options.curElem&&d.options.onfirstitem&&window[d.options.onfirstitem]&&"function"==typeof window[d.options.onfirstitem]&&window[d.options.onfirstitem](d.currentElem),d.options.fullscreenmode||d.options.isTouch&&d.options.navarrowsalwaysshowontouch||d.options.alwaysshownavarrows||(d.$elem.on("mouseenter mousemove",function(){(d.options.arrowloop&&0<=d.options.prevElem||!d.options.arrowloop&&0<=d.options.prevElem&&d.options.prevElemd.options.curElem)&&d.$next.fadeIn()}),d.$elem.on("mouseleave",function(){d.$next.fadeOut(),d.$prev.fadeOut()})),d.$lightboxBox.css({"margin-top":s}),d.options.positionFixed||d.$lightboxBox.css("margin-top",u(window).scrollTop()+d.options.bordertopmargin),"left"==d.options.titlestyle||"right"==d.options.titlestyle?(n=i?d.options.resizespeed:0,o==d.$lightboxBox.width()&&t==d.$lightboxBox.height()&&(n=0),d.$lightboxBox.animate({width:o},n).animate({height:t},n,function(){d.onAnimateFinish(e)})):(n=i?d.options.resizespeed:0,o==d.$elemWrap.width()&&t==d.$elemWrap.height()&&(n=0),d.$lightboxBox.css({width:o,height:"auto"}),d.$elemWrap.animate({width:o},n).animate({height:t},n,function(){d.onAnimateFinish(e)}))},d.onAnimateFinish=function(o){d.$loading.show(),d.$watermark.show(),d.$close.show(),d.$elem.css({"background-color":d.options.bgcolor}),o()},d.reset=function(){d.options.stamp&&d.$watermark.hide(),d.showing=!1,d.$image.empty(),d.$text.empty(),d.$error.hide(),d.$loading.hide(),d.$image.hide(),"bottom"!=d.options.titlestyle&&"inside"!=d.options.titlestyle||d.$elemData.hide(),d.options.fullscreenmode||d.$close.hide(),d.$elem.css({"background-color":""})},d.resetNavigation=function(){d.options.navheight=0,u(".html5-nav").remove()},d.finish=function(){u("#html5-lightbox-video",d.$lightbox).length&&u("#html5-lightbox-video",d.$lightbox).attr("src",""),u("head").find("style").each(function(){"html5box-html5-lightbox"==u(this).data("creator")&&u(this).remove()}),d.slideTimeout.stop(),d.reset(),d.resetNavigation(),d.$lightbox.remove(),u("#html5box-html5-lightbox").remove(),d.showObjects(),d.options.oncloselightbox&&window[d.options.oncloselightbox]&&"function"==typeof window[d.options.oncloselightbox]&&window[d.options.oncloselightbox](d.currentElem),d.onLightboxClosed&&"function"==typeof d.onLightboxClosed&&d.onLightboxClosed(d.currentElem)},d.pauseSlide=function(){},d.playSlide=function(){},d.gotoSlide=function(o){if(-1==o){if(d.options.nextElem<0)return;d.options.curElem=d.options.nextElem}else if(-2==o){if(d.options.prevElem<0)return;d.options.curElem=d.options.prevElem}else 0<=o&&(d.options.curElem=o);d.autosliding&&d.slideTimeout.stop(),d.calcNextPrevElem(),d.reset(),d.loadCurElem()},d.enableSwipe=function(){d.$elem.html5lightboxTouchSwipe({preventWebBrowser:!1,swipeLeft:function(){d.gotoSlide(-1)},swipeRight:function(){d.gotoSlide(-2)}})},d.hideObjects=function(){u("select, embed, object").css({visibility:"hidden"})},d.showObjects=function(){u("select, embed, object").css({visibility:"visible"})},d.embedHTML5Video=function(o,t,i,e){o.html("
"),d.options.nativehtml5controls||(u("video",o).data("src",t),u("video",o).lightboxHTML5VideoControls(d.options.skinsfolder,d,d.options.videohidecontrols,!1,d.options.defaultvideovolume)),u("video",o).off("ended").on("ended",function(){u(window).trigger("html5lightbox.videofinished"),d.autosliding?d.gotoSlide(-1):d.options.autoclose&&d.finish()})},d.embedFlash=function(o,t,i,e){if(d.options.flashInstalled){var n={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash",width:"100%",height:"100%"};n.src=t,n.flashVars=u.param(e),n.wmode=i;var s,l="";for(s in n)l+=s+"="+n[s]+" ";o.html("")}else o.html("
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
")},d.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:o.match(/\#\w+/i)?10:o.match(/\:\/\/.*(wistia)/i)?11:7:-1},d.getURLParams=function(){for(var o={},t=window.location.search.substring(1).split("&"),i=0;iMath.abs(s-e)?i
");g||(x.after(v),v.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+o+"html5boxplayer_playvideo.png')","background-position":"center center","background-repeat":"no-repeat"}).on(h,function(){x.get(0).play()}));var y=W("
"),k=W("
--:--
--:--
");x.after(k),x.after(y),y.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0,"z-index":2147483647}),k.css({display:"block",position:"absolute",width:"100%",height:p,left:0,bottom:0,right:0,"max-width":"640px",margin:"0 auto"});function $(){u=!0}x.on(h,function(){u=!0}).hover(function(){u=!0},function(){u=!1}),i||setInterval(function(){u&&(k.show(),u=!1,clearTimeout(c),c=setTimeout(function(){x.get(0).paused||k.fadeOut()},5e3))},250),W(".html5boxVideoControlsBg",k).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:.7,filter:"alpha(opacity=70)"}),W(".html5boxPlayPause",k).css({display:"block",position:"relative",width:"32px",height:"32px",margin:Math.floor((p-32)/2),float:"left"});var E=W(".html5boxPlay",k),A=W(".html5boxPause",k);E.css({display:"block",position:"absolute",top:0,left:0,width:"32px",height:"32px",cursor:"pointer","background-image":"url('"+o+"html5boxplayer_playpause.png')","background-position":"top left"}).hover(function(){W(this).css({"background-position":"bottom left"})},function(){W(this).css({"background-position":"top left"})}).on(h,function(){x.get(0).play()}),A.css({display:"none",position:"absolute",top:0,left:0,width:"32px",height:"32px",cursor:"pointer","background-image":"url('"+o+"html5boxplayer_playpause.png')","background-position":"top right"}).hover(function(){W(this).css({"background-position":"bottom right"})},function(){W(this).css({"background-position":"top right"})}).on(h,function(){x.get(0).pause()});var T,z,S=W(".html5boxTimeCurrent",k),I=W(".html5boxTimeTotal",k),B=W(".html5boxSeeker",k),C=W(".html5boxSeekerPlay",k),F=W(".html5boxSeekerBuffer",k),P=W(".html5boxSeekerHandler",k);S.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"}),I.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"}),B.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((p-10)/2)+"px 4px"}).on(l,function(o){o=(s?o.originalEvent.touches[0]:o).pageX-B.offset().left;C.css({width:o}),x.get(0).currentTime=o*x.get(0).duration/B.width(),B.on(r,function(o){o=(s?o.originalEvent.touches[0]:o).pageX-B.offset().left;C.css({width:o}),x.get(0).currentTime=o*x.get(0).duration/B.width()})}).on(a,function(){B.off(r)}),F.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"}),C.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"}),!g&&(x.get(0).requestFullscreen||x.get(0).webkitRequestFullScreen||x.get(0).mozRequestFullScreen||x.get(0).webkitEnterFullScreen||x.get(0).msRequestFullscreen)&&(T=function(o){k.css({position:o?"fixed":"absolute"});var t=z.css("background-position")?z.css("background-position").split(" ")[1]:z.css("background-position-y");z.css({"background-position":(o?"right":"left")+" "+t}),y.css({display:o?"block":"none"}),o?(W(document).on("mousemove",$),k.css({"z-index":2147483647})):(W(document).off("mousemove",$),k.css({"z-index":""}))},document.addEventListener("MSFullscreenChange",function(){m=null!=document.msFullscreenElement;var o=null!=navigator.userAgent.match(/Trident\/7/)&&null!=navigator.userAgent.match(/rv:11/),t=null!=navigator.userAgent.match(/MSIE/i)&&!this.options.isOpera;(o||t)&&(m||x.get(0).removeAttribute("controls")),T(m)},!1),document.addEventListener("fullscreenchange",function(){m=document.fullscreen,T(document.fullscreen)},!1),document.addEventListener("mozfullscreenchange",function(){m=document.mozFullScreen,null!=navigator.userAgent.match(/Firefox/i)&&(m?x.get(0).setAttribute("controls","controls"):x.get(0).removeAttribute("controls")),T(document.mozFullScreen)},!1),document.addEventListener("webkitfullscreenchange",function(){m=document.webkitIsFullScreen,T(document.webkitIsFullScreen)},!1),x.get(0).addEventListener("webkitbeginfullscreen",function(){m=!0},!1),x.get(0).addEventListener("webkitendfullscreen",function(){m=!1},!1),W("head").append(""),(z=W(".html5boxFullscreen",k)).css({display:"block",position:"relative",float:"right",width:"32px",height:"32px",margin:Math.floor((p-32)/2),cursor:"pointer","background-image":"url('"+o+"html5boxplayer_fullscreen.png')","background-position":"left top"}).hover(function(){var o=W(this).css("background-position")?W(this).css("background-position").split(" ")[0]:W(this).css("background-position-x");W(this).css({"background-position":o+" bottom"})},function(){var o=W(this).css("background-position")?W(this).css("background-position").split(" ")[0]:W(this).css("background-position-x");W(this).css({"background-position":o+" top"})}).on(h,function(){!function(o){var t;o?(t=null!=navigator.userAgent.match(/Trident\/7/)&&null!=navigator.userAgent.match(/rv:11/),o=null!=navigator.userAgent.match(/MSIE/i)&&!this.options.isOpera,(t||o)&&x.get(0).setAttribute("controls","controls"),x.get(0).requestFullscreen?x.get(0).requestFullscreen():x.get(0).webkitRequestFullScreen?x.get(0).webkitRequestFullScreen():x.get(0).mozRequestFullScreen?x.get(0).mozRequestFullScreen():x.get(0).webkitEnterFullScreen&&x.get(0).webkitEnterFullScreen(),x.get(0).msRequestFullscreen&&x.get(0).msRequestFullscreen()):document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}(m=!m)})),f&&W(".html5boxHD",k).css({display:"block",position:"relative",float:"right",width:"32px",height:"32px",margin:Math.floor((p-32)/2),cursor:"pointer","background-image":"url('"+o+"html5boxplayer_hd.png')","background-position":(b?"right":"left")+" center"}).on(h,function(){b=!b,W(this).css({"background-position":(b?"right":"left")+" center"}),t.isHd=b;var o=x.get(0).isPaused;x.get(0).setAttribute("src",(b?f:w)+"#t="+x.get(0).currentTime),o?g||x.get(0).pause():x.get(0).play()});var L,M,O,H,D=0==(x.get(0).volume=n)?1:n,_=x.get(0).volume;x.get(0).volume=_/2+.1,x.get(0).volume===_/2+.1&&(x.get(0).volume=_,n=W(".html5boxVolume",k),L=W(".html5boxVolumeButton",k),M=W(".html5boxVolumeBar",k),O=W(".html5boxVolumeBarBg",k),H=W(".html5boxVolumeBarActive",k),n.css({display:"block",position:"relative",float:"right",width:"32px",height:"32px",margin:Math.floor((p-32)/2)}).hover(function(){clearTimeout(d);var o=x.get(0).volume;H.css({height:Math.round(100*o)+"%"}),M.show()},function(){clearTimeout(d),d=setTimeout(function(){M.hide()},1e3)}),L.css({display:"block",position:"absolute",top:0,left:0,width:"32px",height:"32px",cursor:"pointer","background-image":"url('"+o+"html5boxplayer_volume.png')","background-position":"top "+(0<_?"left":"right")}).hover(function(){var o=W(this).css("background-position")?W(this).css("background-position").split(" ")[0]:W(this).css("background-position-x");W(this).css({"background-position":o+" bottom"})},function(){var o=W(this).css("background-position")?W(this).css("background-position").split(" ")[0]:W(this).css("background-position-x");W(this).css({"background-position":o+" top"})}).on(h,function(){var o=0<(o=x.get(0).volume)?(D=o,0):D,t=W(this).css("background-position")?W(this).css("background-position").split(" ")[1]:W(this).css("background-position-y");L.css({"background-position":(0