!function(a,b,c){function d(a,b){return typeof a===b}function e(a){var b=z.className,c=w._config.classPrefix||"";if(A&&(b=b.baseVal),w._config.enableJSClass){var d=new RegExp("(^|\\s)"+c+"no-js(\\s|$)");b=b.replace(d,"$1"+c+"js$2")}w._config.enableClasses&&(b+=" "+c+a.join(" "+c),A?z.className.baseVal=b:z.className=b)}function f(a,b){if("object"==typeof a)for(var c in a)D(a,c)&&f(c,a[c]);else{a=a.toLowerCase();var d=a.split("."),g=w[d[0]];if(2==d.length&&(g=g[d[1]]),void 0!==g)return w;b="function"==typeof b?b():b,1==d.length?w[d[0]]=b:(!w[d[0]]||w[d[0]]instanceof Boolean||(w[d[0]]=new Boolean(w[d[0]])),w[d[0]][d[1]]=b),e([(b&&0!=b?"":"no-")+d.join("-")]),w._trigger(a,b)}return w}function g(){return"function"!=typeof b.createElement?b.createElement(arguments[0]):A?b.createElementNS.call(b,"http://www.w3.org/2000/svg",arguments[0]):b.createElement.apply(b,arguments)}function h(a){return a.replace(/([a-z])-([a-z])/g,function(a,b,c){return b+c.toUpperCase()}).replace(/^-/,"")}function i(a,b){return!!~(""+a).indexOf(b)}function j(){var a=b.body;return a||(a=g(A?"svg":"body"),a.fake=!0),a}function k(a,c,d,e){var f,h,i,k,l="modernizr",m=g("div"),n=j();if(parseInt(d,10))for(;d--;)i=g("div"),i.id=e?e[d]:l+(d+1),m.appendChild(i);return f=g("style"),f.type="text/css",f.id="s"+l,(n.fake?n:m).appendChild(f),n.appendChild(m),f.styleSheet?f.styleSheet.cssText=a:f.appendChild(b.createTextNode(a)),m.id=l,n.fake&&(n.style.background="",n.style.overflow="hidden",k=z.style.overflow,z.style.overflow="hidden",z.appendChild(n)),h=c(m,a),n.fake?(n.parentNode.removeChild(n),z.style.overflow=k,z.offsetHeight):m.parentNode.removeChild(m),!!h}function l(a,b){return function(){return a.apply(b,arguments)}}function m(a,b,c){var e;for(var f in a)if(a[f]in b)return!1===c?a[f]:(e=b[a[f]],d(e,"function")?l(e,c||b):e);return!1}function n(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()}).replace(/^ms-/,"-ms-")}function o(b,c,d){var e;if("getComputedStyle"in a){e=getComputedStyle.call(a,b,c);var f=a.console;if(null!==e)d&&(e=e.getPropertyValue(d));else if(f){var g=f.error?"error":"log";f[g].call(f,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else e=!c&&b.currentStyle&&b.currentStyle[d];return e}function p(b,d){var e=b.length;if("CSS"in a&&"supports"in a.CSS){for(;e--;)if(a.CSS.supports(n(b[e]),d))return!0;return!1}if("CSSSupportsRule"in a){for(var f=[];e--;)f.push("("+n(b[e])+":"+d+")");return f=f.join(" or "),k("@supports ("+f+"){ #modernizr { position: absolute; }}",function(a){return"absolute"==o(a,null,"position")})}return c}function q(a,b,e,f){function j(){l&&(delete S.style,delete S.modElem)}if(f=!d(f,"undefined")&&f,!d(e,"undefined")){var k=p(a,e);if(!d(k,"undefined"))return k}for(var l,m,n,o,q,r=["modernizr","tspan","samp"];!S.style&&r.length;)l=!0,S.modElem=g(r.shift()),S.style=S.modElem.style;for(n=a.length,m=0;m7)}),w.addTest("audio",function(){var a=g("audio"),b=!1;try{b=!!a.canPlayType,b&&(b=new Boolean(b),b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),b.mp3=a.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,""),b.opus=a.canPlayType('audio/ogg; codecs="opus"')||a.canPlayType('audio/webm; codecs="opus"').replace(/^no$/,""),b.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),b.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(a){}return b}),w.addTest("canvas",function(){var a=g("canvas");return!(!a.getContext||!a.getContext("2d"))}),w.addTest("canvastext",function(){return!1!==w.canvas&&"function"==typeof g("canvas").getContext("2d").fillText}),w.addTest("video",function(){var a=g("video"),b=!1;try{b=!!a.canPlayType,b&&(b=new Boolean(b),b.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),b.vp9=a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),b.hls=a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(a){}return b}),w.addTest("webgl",function(){var b=g("canvas"),c="probablySupportsContext"in b?"probablySupportsContext":"supportsContext";return c in b?b[c]("webgl")||b[c]("experimental-webgl"):"WebGLRenderingContext"in a}),w.addTest("cssgradients",function(){for(var a,b="background-image:",c="",d=0,e=y.length-1;d-1}),w.addTest("multiplebgs",function(){var a=g("a").style;return a.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(a.background)}),w.addTest("opacity",function(){var a=g("a").style;return a.cssText=y.join("opacity:.55;"),/^0.55$/.test(a.opacity)}),w.addTest("rgba",function(){var a=g("a").style;return a.cssText="background-color:rgba(150,255,150,.5)",(""+a.backgroundColor).indexOf("rgba")>-1}),w.addTest("inlinesvg",function(){var a=g("div");return a.innerHTML="","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&a.firstChild&&a.firstChild.namespaceURI)});var F=g("input"),G="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),H={};w.input=function(b){for(var c=0,d=b.length;c=9;return b||c}()?w.addTest("fontface",!1):O('@font-face {font-family:"font";src:url("https://")}',function(a,c){var d=b.getElementById("smodernizr"),e=d.sheet||d.styleSheet,f=e?e.cssRules&&e.cssRules[0]?e.cssRules[0].cssText:e.cssText||"":"",g=/src/i.test(f)&&0===f.indexOf(c.split(" ")[0]);w.addTest("fontface",g)}),O('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(a){w.addTest("generatedcontent",a.offsetHeight>=6)});var P=v._config.usePrefixes?B.split(" "):[];v._cssomPrefixes=P;var Q=function(b){var d,e=y.length,f=a.CSSRule;if(void 0===f)return c;if(!b)return!1;if(b=b.replace(/^@/,""),(d=b.replace(/-/g,"_").toUpperCase()+"_RULE")in f)return"@"+b;for(var g=0;gx

',d.appendChild(e.childNodes[1])}return b&&a.extend(c,b),this.each(function(){var b=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];c.customSelector&&b.push(c.customSelector);var d=".fitvidsignore";c.ignore&&(d=d+", "+c.ignore);var e=a(this).find(b.join(","));e=e.not("object object"),e=e.not(d),e.each(function(){var b=a(this);if(!(b.parents(d).length>0||"embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){b.css("height")||b.css("width")||!isNaN(b.attr("height"))&&!isNaN(b.attr("width"))||(b.attr("height",9),b.attr("width",16));var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),e=isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10),f=c/e;if(!b.attr("name")){var g="fitvid"+a.fn.fitVids._count;b.attr("name",g),a.fn.fitVids._count++}b.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*f+"%"),b.removeAttr("height").removeAttr("width")}})})},a.fn.fitVids._count=0}(window.jQuery||window.Zepto); function insertParam(a,b,c,d){var e,f,g,h,i,j,k,l;if(0 iframe").each(function(){new Vimeo.Player(jQuery(this)[0]).pause()}),0!==a.slides.eq(a.currentSlide).find("[data-vimeo-video-id] > iframe").length&&("yes"===jQuery(a.slides.eq(a.currentSlide)).data("autoplay")&&new Vimeo.Player(a.slides.eq(a.currentSlide).find("iframe")[0]).play(),"yes"===jQuery(a.slides.eq(a.currentSlide)).data("mute")&&new Vimeo.Player(a.slides.eq(a.currentSlide).find("iframe")[0]).setVolume(0))},300),jQuery(a).find("video").each(function(){"function"==typeof jQuery(this)[0].pause&&jQuery(this)[0].pause(),!jQuery(this).parents("li").hasClass("clone")&&jQuery(this).parents("li").hasClass("flex-active-slide")&&"yes"===jQuery(this).parents("li").attr("data-autoplay")&&"function"==typeof jQuery(this)[0].play&&jQuery(this)[0].play()})}window.YTReady=function(){var a=[],b=!1;return function(c,d){if(!0===c)for(b=!0;a.length;)a.shift()();else"function"==typeof c&&(b?c():a[d?"unshift":"push"](c))}}(),jQuery(document).ready(function(){var a;jQuery(".fusion-fullwidth.video-background").each(function(){jQuery(this).find("[data-youtube-video-id]")&&(window.yt_vid_exists=!0)}),a=jQuery("iframe"),jQuery.each(a,function(a,b){var c,d,e=jQuery(this).attr("src"),f=jQuery(this).data("privacy-src"),g=!e&&f?f:e;g&&(Number(fusionVideoGeneralVars.status_vimeo)&&1<=g.indexOf("vimeo")&&jQuery(this).attr("id","player_"+(a+1)),Number(fusionVideoGeneralVars.status_yt)&&ytVidId(g)&&(jQuery(this).attr("id","player_"+(a+1)),c=insertParam(g,"enablejsapi","1",!1),d=insertParam(c,"wmode","opaque",!1),e?jQuery(this).attr("src",d):f&&jQuery(this).attr("data-privacy-src",d),window.yt_vid_exists=!0))}),jQuery(".full-video, .video-shortcode, .wooslider .slide-content, .fusion-portfolio-carousel .fusion-video").not("#bbpress-forums .full-video, #bbpress-forums .video-shortcode, #bbpress-forums .wooslider .slide-content, #bbpress-forums .fusion-portfolio-carousel .fusion-video").fitVids(),jQuery("#bbpress-forums").fitVids(),("function"!=typeof fusionGetConsent||fusionGetConsent("youtube"))&&(registerYoutubePlayers(),loadYoutubeIframeAPI())}); !function($,window,undefined){function getPixel(a,b){return parseInt(a.css(b),10)||0}function within(a,b,c){return ac?c:a}function getViewport(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}}function removeHash(){history&&history.pushState&&history.pushState("",document.title,window.location.pathname+window.location.search)}function doAjax(a,b){var a="//ilightbox.net/getSource/jsonp.php?url="+encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");$.ajax({url:a,dataType:"jsonp"}),iLCallback=function(a){b.call(this,a)}}function findImageInElement(a){var b=$("*",a),c=new Array;return b.each(function(){var a="",b=this;if("none"!=$(b).css("background-image")?a=$(b).css("background-image"):void 0!==$(b).attr("src")&&"img"==b.nodeName.toLowerCase()&&(a=$(b).attr("src")),-1==a.indexOf("gradient")){a=a.replace(/url\(\"/g,""),a=a.replace(/url\(/g,""),a=a.replace(/\"\)/g,""),a=a.replace(/\)/g,"");for(var d=a.split(","),e=0;e0&&-1==$.inArray(d[e],c)){var f="";browser.msie&&browser.version<9&&(f="?"+floor(3e3*random())),c.push(d[e]+f)}}}),c}function getExtension(a){var b=a.split(".").pop().toLowerCase(),c=-1!==b.indexOf("?")?"?"+b.split("?").pop():"";return b.replace(c,"")}function getTypeByExtension(a){var b=getExtension(a);return-1!==extensions.image.indexOf(b)?"image":-1!==extensions.flash.indexOf(b)?"flash":-1!==extensions.video.indexOf(b)?"video":"iframe"}function percentToValue(a,b){return parseInt(b/100*a)}function parseURI(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function absolutizeURI(a,b){return b=parseURI(b||""),a=parseURI(a||""),b&&a?(b.protocol||a.protocol)+(b.protocol||b.authority?b.authority:a.authority)+function(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}(b.protocol||b.authority||"/"===b.pathname.charAt(0)?b.pathname:b.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+b.pathname:a.pathname)+(b.protocol||b.authority||b.pathname?b.search:b.search||a.search)+b.hash:null}function version_compare(a,b,c){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var d=0,e=0,f=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},h=function(a){return a=(""+a).replace(/[_\-+]/g,"."),a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),a.length?a.split("."):[-8]},i=function(a){return a?isNaN(a)?g[a]||-7:parseInt(a,10):0};for(a=h(a),b=h(b),e=max(a.length,b.length),d=0;db[d]){f=1;break}}if(!c)return f;switch(c){case">":case"gt":return f>0;case">=":case"ge":return f>=0;case"<=":case"le":return f<=0;case"==":case"=":case"eq":return 0===f;case"<>":case"!=":case"ne":return 0!==f;case"":case"<":case"lt":return f<0;default:return null}}function getScrollXY(){var a=0,b=0;return"number"==typeof window.pageYOffset?(b=window.pageYOffset,a=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(b=document.body.scrollTop,a=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(b=document.documentElement.scrollTop,a=document.documentElement.scrollLeft),{x:a,y:b}}function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(a,b){b=b.replace("%%",a),alert(b)}function _QTAddAttribute(a,b,c){var d;return d=gTagAttrs[a+b],null==d&&(d=gTagAttrs[b]),null!=d?(0==b.indexOf(a)&&null==c&&(c=b.substring(a.length)),null==c&&(c=b),c+'="'+d+'" '):""}function _QTAddObjectAttr(a,b){return 0==a.indexOf("emb#")?"":(0==a.indexOf("obj#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("obj#",a,b))}function _QTAddEmbedAttr(a,b){return 0==a.indexOf("obj#")?"":(0==a.indexOf("emb#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("emb#",a,b))}function _QTAddObjectParam(a,b){var c,d="",e=b?" />":">";return-1==a.indexOf("emb#")&&(c=gTagAttrs["obj#"+a],null==c&&(c=gTagAttrs[a]),0==a.indexOf("obj#")&&(a=a.substring(4)),null!=c&&(d=' c.length||0!=c.length%2)return _QTComplain(a,gArgCountErr),"";gTagAttrs=[],gTagAttrs.src=c[0],gTagAttrs.width=c[1],gTagAttrs.height=c[2],gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/",a=c[3],null!=a&&""!=a||(a="6,0,2,0"),gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+a;for(var d,e=4;e\n"+_QTAddObjectParam("src",b),e=" \n"}function QT_GenerateOBJECTText(){return _QTGenerate("QT_GenerateOBJECTText",!1,arguments)}var extensions={flash:["swf"],image:["bmp","gif","jpeg","jpg","png","tiff","tif","jfif","jpe"],iframe:["asp","aspx","cgi","cfm","htm","html","jsp","php","pl","php3","php4","php5","phtml","rb","rhtml","shtml","txt"],video:["avi","mov","mpg","mpeg","movie","mp4","webm","ogv","ogg","3gp","m4v"]},$win=$(window),$doc=$(document),browser,transform,gpuAcceleration,fullScreenApi="",userAgent=navigator.userAgent||navigator.vendor||window.opera,supportTouch="ontouchstart"in window||navigator.msMaxTouchPoints,isMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0,4)),clickEvent=supportTouch?"click itap":"click",touchStartEvent=supportTouch?"mousedown.iLightBox touchstart.iLightBox":"mousedown.iLightBox",touchStopEvent=supportTouch?"mouseup.iLightBox touchend.iLightBox":"mouseup.iLightBox",touchMoveEvent=supportTouch?"mousemove.iLightBox touchmove.iLightBox":"mousemove.iLightBox",abs=Math.abs,sqrt=Math.sqrt,round=Math.round,max=Math.max,min=Math.min,floor=Math.floor,random=Math.random,pluginspages={quicktime:"http://www.apple.com/quicktime/download",flash:"http://www.adobe.com/go/getflash"},iLightBox=function(a,b,c,d){var e=this;if(e.options=b,e.selector=a.selector||a,e.context=a.context,e.instant=d,c.length<1?e.attachItems():e.items=c,e.vars={total:e.items.length,start:0,current:null,next:null,prev:null,BODY:$("body"),loadRequests:0,overlay:$('
'),loader:$('
'),toolbar:$('
'),innerToolbar:$('
'),title:$('
'),closeButton:$(''),fullScreenButton:$(''),innerPlayButton:$(''),innerNextButton:$(''),innerPrevButton:$(''),holder:$('
'),nextPhoto:$('
'),prevPhoto:$('
'),nextButton:$(''),prevButton:$(''),thumbnails:$('
'),thumbs:!1,nextLock:!1,prevLock:!1,hashLock:!1,isMobile:!1,mobileMaxWidth:980,isInFullScreen:!1,isSwipe:!1,mouseID:0,cycleID:0,isPaused:0},e.vars.hideableElements=e.vars.nextButton.add(e.vars.prevButton),e.normalizeItems(),e.availPlugins(),e.options.startFrom=e.options.startFrom>0&&e.options.startFrom>=e.vars.total?e.vars.total-1:e.options.startFrom,e.options.startFrom=e.options.randomStart?floor(random()*e.vars.total):e.options.startFrom,e.vars.start=e.options.startFrom,d?e.instantCall():e.patchItemsEvents(),e.options.linkId&&(e.hashChangeHandler(),$win.iLightBoxHashChange(function(){e.hashChangeHandler()})),supportTouch){var f=/(click|mouseenter|mouseleave|mouseover|mouseout)/gi;e.options.caption.show=e.options.caption.show.replace(f,"itap"),e.options.caption.hide=e.options.caption.hide.replace(f,"itap"),e.options.social.show=e.options.social.show.replace(f,"itap"),e.options.social.hide=e.options.social.hide.replace(f,"itap")}e.options.controls.arrows&&$.extend(e.options.styles,{nextOffsetX:0,prevOffsetX:0,nextOpacity:0,prevOpacity:0})};iLightBox.prototype={showLoader:function(){var a=this;a.vars.loadRequests+=1,"horizontal"==a.options.path.toLowerCase()?a.vars.loader.addClass("ilightbox-show").stop().animate({top:"-30px"},a.options.show.speed,"easeOutCirc"):a.vars.loader.addClass("ilightbox-show").stop().animate({left:"-30px"},a.options.show.speed,"easeOutCirc")},hideLoader:function(){var a=this;a.vars.loadRequests-=1,a.vars.loadRequests=a.vars.loadRequests<0?0:a.vars.loadRequests,"horizontal"==a.options.path.toLowerCase()?a.vars.loadRequests<=0&&a.vars.loader.removeClass("ilightbox-show").stop().animate({top:"-192px"},a.options.show.speed,"easeInCirc"):a.vars.loadRequests<=0&&a.vars.loader.removeClass("ilightbox-show").stop().animate({left:"-192px"},a.options.show.speed,"easeInCirc")},createUI:function(){var a=this;a.ui={currentElement:a.vars.holder,nextElement:a.vars.nextPhoto,prevElement:a.vars.prevPhoto,currentItem:a.vars.current,nextItem:a.vars.next,prevItem:a.vars.prev,hide:function(){a.closeAction()},refresh:function(){arguments.length>0?a.repositionPhoto(!0):a.repositionPhoto()},fullscreen:function(){a.fullScreenAction()}}},attachItems:function(){var iL=this,itemsObject=new Array,items=new Array;$(iL.selector,iL.context).each(function(){var t=$(this),URL=t.attr(iL.options.attr)||null,options=t.data("options")&&eval("({"+t.data("options")+"})")||{},caption=t.data("caption"),title=t.data("title"),type=t.data("type")||getTypeByExtension(URL);items.push({URL:URL,caption:caption,title:title,type:type,options:options}),iL.instant||itemsObject.push(t)}),iL.items=items,iL.itemsObject=itemsObject,iL.vars&&(iL.vars.total=items.length)},normalizeItems:function(){var a=this,b=new Array;$.each(a.items,function(c,d){"string"==typeof d&&(d={url:d});var e=d.url||d.URL||null,f=d.options||{},g=d.caption||null,h=d.title||null,i=d.type?d.type.toLowerCase():getTypeByExtension(e),j="object"!=typeof e?getExtension(e):"";if(f.thumbnail=f.thumbnail||("image"==i?e:null),f.videoType=f.videoType||null,f.skin=f.skin||a.options.skin,f.width=f.width||null,f.height=f.height||null,f.mousewheel=void 0===f.mousewheel||f.mousewheel,f.swipe=void 0===f.swipe||f.swipe,f.social=void 0!==f.social?f.social:a.options.social.buttons&&$.extend({},{},a.options.social.buttons),"video"==i&&(f.html5video=void 0!==f.html5video?f.html5video:{},f.html5video.webm=f.html5video.webm||f.html5video.WEBM||null,f.html5video.controls=void 0!==f.html5video.controls?f.html5video.controls:"controls",f.html5video.preload=f.html5video.preload||"metadata",f.html5video.autoplay=void 0!==f.html5video.autoplay&&f.html5video.autoplay),"iframe"===i)if(-1!==e.indexOf("youtube.com")){var k=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,l=e.match(k);l&&11===l[7].length&&(f.thumbnail="//img.youtube.com/vi/"+l[7]+"/mqdefault.jpg")}else-1!==e.indexOf("vimeo.com")&&($videoID=e.split(/[?#]/)[0].replace(/[^\d]/g,""),$.getJSON("https://www.vimeo.com/api/v2/video/"+$videoID+".json?callback=?",{format:"json"},function(a){f.thumbnail=a[0].thumbnail_medium}));f.width&&f.height||("video"==i?(f.width=fusionLightboxVideoVars.lightbox_video_width,f.height=fusionLightboxVideoVars.lightbox_video_height):"iframe"==i?(f.width=fusionLightboxVideoVars.lightbox_video_width,f.height=fusionLightboxVideoVars.lightbox_video_height):"flash"==i&&(f.width=fusionLightboxVideoVars.lightbox_video_width,f.height=fusionLightboxVideoVars.lightbox_video_height)),delete d.url,d.index=c,d.URL=e,d.caption=g,d.title=h,d.type=i,d.options=f,d.ext=j,b.push(d)}),a.items=b},instantCall:function(){var a=this,b=a.vars.start;a.vars.current=b,a.vars.next=a.items[b+1]?b+1:null,a.vars.prev=a.items[b-1]?b-1:null,a.addContents(),a.patchEvents()},addContents:function(){var a=this,b=a.vars,c=a.options,d=getViewport(),e=c.path.toLowerCase(),f=b.total>0&&a.items.filter(function(a,b,d){return-1===["image","flash","video"].indexOf(a.type)&&void 0===a.recognized&&(c.smartRecognition||a.options.smartRecognition)}),g=f.length>0;c.mobileOptimizer&&!c.innerToolbar&&(b.isMobile=d.width<=b.mobileMaxWidth),b.overlay.addClass(c.skin).hide().css("opacity",c.overlay.opacity),c.linkId&&b.overlay[0].setAttribute("linkid",c.linkId),c.controls.toolbar&&(b.toolbar.addClass(c.skin).append(b.closeButton),c.controls.fullscreen&&b.toolbar.append(b.fullScreenButton),c.controls.slideshow&&b.toolbar.append(b.innerPlayButton),b.total>1&&b.toolbar.append(b.innerPrevButton).append(b.innerNextButton)),b.BODY.addClass("ilightbox-noscroll").append(b.overlay).append(b.loader).append(b.holder).append(b.nextPhoto).append(b.prevPhoto),c.innerToolbar||b.BODY.append(b.toolbar),c.controls.arrows&&b.BODY.append(b.nextButton).append(b.prevButton),c.controls.thumbnail&&b.total>1&&(b.BODY.append(b.thumbnails),b.thumbnails.addClass(c.skin).addClass("ilightbox-"+e),$("div.ilightbox-thumbnails-grid",b.thumbnails).empty(),b.thumbs=!0);var h="horizontal"==c.path.toLowerCase()?{left:parseInt(d.width/2-b.loader.outerWidth()/2)}:{top:parseInt(d.height/2-b.loader.outerHeight()/2)};b.loader.addClass(c.skin).css(h),b.nextButton.add(b.prevButton).addClass(c.skin),"horizontal"==e&&b.loader.add(b.nextButton).add(b.prevButton).addClass("horizontal"),b.BODY[b.isMobile?"addClass":"removeClass"]("isMobile"),c.infinite||(b.prevButton.add(b.prevButton).add(b.innerPrevButton).add(b.innerNextButton).removeClass("disabled"),0==b.current&&b.prevButton.add(b.innerPrevButton).addClass("disabled"),b.current>=b.total-1&&b.nextButton.add(b.innerNextButton).addClass("disabled")),c.show.effect?(b.overlay.stop().fadeIn(c.show.speed),b.toolbar.stop().fadeIn(c.show.speed)):(b.overlay.show(),b.toolbar.show());var i=f.length;g?(a.showLoader(),$.each(f,function(d,e){var f=function(d){var e=-1,f=(a.items.filter(function(a,b,c){return a.URL==d.url&&(e=b),a.URL==d.url}),a.items[e]);d&&$.extend(!0,f,{URL:d.source,type:d.type,recognized:!0,options:{html5video:d.html5video,width:"image"==d.type?0:d.width||f.width,height:"image"==d.type?0:d.height||f.height,thumbnail:f.options.thumbnail||d.thumbnail}}),0==--i&&(a.hideLoader(),b.dontGenerateThumbs=!1,a.generateThumbnails(),c.show.effect?setTimeout(function(){a.generateBoxes()},c.show.speed):a.generateBoxes())};a.ogpRecognition(this,f)})):c.show.effect?setTimeout(function(){a.generateBoxes()},c.show.speed):a.generateBoxes(),a.createUI(),window.iLightBox={close:function(){a.closeAction()},fullscreen:function(){a.fullScreenAction()},moveNext:function(){a.moveTo("next")},movePrev:function(){a.moveTo("prev")},goTo:function(b){a.goTo(b)},refresh:function(){a.refresh()},reposition:function(){arguments.length>0?a.repositionPhoto(!0):a.repositionPhoto()},setOption:function(b){a.setOption(b)},destroy:function(){a.closeAction(),a.dispatchItemsEvents()}},c.linkId&&(b.hashLock=!0,window.location.hash=c.linkId+"/"+b.current,setTimeout(function(){b.hashLock=!1},55)),c.slideshow.startPaused||(a.resume(),b.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")),"function"==typeof a.options.callback.onOpen&&a.options.callback.onOpen.call(a)},loadContent:function(a,b,c){var d,e,f=this;switch(f.createUI(),a.speed=c||f.options.effects.loadedFadeSpeed,"current"==b&&(a.options.mousewheel?f.vars.lockWheel=!1:f.vars.lockWheel=!0,a.options.swipe?f.vars.lockSwipe=!1:f.vars.lockSwipe=!0),b){case"current":d=f.vars.holder,e=f.vars.current;break;case"next":d=f.vars.nextPhoto,e=f.vars.next;break;case"prev":d=f.vars.prevPhoto,e=f.vars.prev}if(d.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")).addClass(a.options.skin),$("div.ilightbox-inner-toolbar",d).remove(),a.title||f.options.innerToolbar){var g=f.vars.innerToolbar.clone();if(a.title&&f.options.show.title){var h=f.vars.title.clone();h.empty().html(a.title),g.append(h)}f.options.innerToolbar&&g.append(f.vars.total>1?f.vars.toolbar.clone():f.vars.toolbar),d.prepend(g)}f.loadSwitcher(a,d,e,b)},loadSwitcher:function(a,b,c,d){var e=this,f=e.options,g={element:b,position:c};switch(a.type){case"image":"function"==typeof f.callback.onBeforeLoad&&f.callback.onBeforeLoad.call(e,e.ui,c),"function"==typeof a.options.onBeforeLoad&&a.options.onBeforeLoad.call(e,g),e.loadImage(a.URL,function(h){"function"==typeof f.callback.onAfterLoad&&f.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,g);var i=h?h.width:400,j=h?h.height:200;b.data({naturalWidth:i,naturalHeight:j}),$("div.ilightbox-container",b).empty().append(h?'':''+f.errors.loadImage+""),"function"==typeof f.callback.onRender&&f.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,g),e.configureHolder(a,d,b)});break;case"video":b.data({naturalWidth:a.options.width,naturalHeight:a.options.height}),e.addContent(b,a),"function"==typeof f.callback.onRender&&f.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,g),e.configureHolder(a,d,b);break;case"iframe":for(var h=a.URL.substring(a.URL.indexOf("?")+1).split("&"),i={},j=0;j').css(p).html(k)),b.show().data({naturalWidth:m||l.outerWidth(),naturalHeight:n||l.outerHeight()}).hide(),"function"==typeof f.callback.onRender&&f.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,g);var q=findImageInElement(b);e.loadImage(q,function(){"function"==typeof f.callback.onAfterLoad&&f.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,g),e.configureHolder(a,d,b)}),f.ajaxSetup.success(h,i,j),"function"==typeof o.success&&o.success(h,i,j)},error:function(h,i,j){"function"==typeof f.callback.onAfterLoad&&f.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,g),e.hideLoader(),$("div.ilightbox-container",b).empty().append(''+f.errors.loadContents+""),e.configureHolder(a,d,b),f.ajaxSetup.error(h,i,j),"function"==typeof o.error&&o.error(h,i,j)}});break;case"html":var l,p=a.URL;if(container=$("div.ilightbox-container",b),p[0].nodeName)l=p.clone();else{var q=$(p);l=q.selector?$("
"+q+"
"):q}var r=e.items[c].options.width||parseInt(l.attr("width")),s=e.items[c].options.height||parseInt(l.attr("height"));e.addContent(b,a),l.appendTo(document.documentElement).hide(),"function"==typeof f.callback.onRender&&f.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,g);var n=findImageInElement(b);"function"==typeof f.callback.onBeforeLoad&&f.callback.onBeforeLoad.call(e,e.ui,c),"function"==typeof a.options.onBeforeLoad&&a.options.onBeforeLoad.call(e,g),e.loadImage(n,function(){"function"==typeof f.callback.onAfterLoad&&f.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,g),b.show().data({naturalWidth:r||container.outerWidth(),naturalHeight:s||container.outerHeight()}).hide(),l.remove(),e.configureHolder(a,d,b)})}},configureHolder:function(a,b,c){var d=this,e=d.vars,f=d.options;if("current"!=b&&("next"==b?c.addClass("ilightbox-next"):c.addClass("ilightbox-prev")),"current"==b)var g=e.current;else if("next"==b)var h=f.styles.nextOpacity,g=e.next;else var h=f.styles.prevOpacity,g=e.prev;var i={element:c,position:g};d.items[g].options.width=d.items[g].options.width||0,d.items[g].options.height=d.items[g].options.height||0,"current"==b?f.show.effect?c.css(transform,gpuAcceleration).fadeIn(a.speed,function(){if(c.css(transform,""),a.caption){d.setCaption(a,c);var b=$("div.ilightbox-caption",c),e=parseInt(b.outerHeight()/c.outerHeight()*100);f.caption.start&e<=50&&b.fadeIn(f.effects.fadeSpeed)}var h=a.options.social;h&&(d.setSocial(h,a.URL,c),f.social.start&&$("div.ilightbox-social",c).fadeIn(f.effects.fadeSpeed)),d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)}):(c.show(),d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)):f.show.effect?c.fadeTo(a.speed,h,function(){"next"==b?e.nextLock=!1:e.prevLock=!1,d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)}):(c.css({opacity:h}).show(),"next"==b?e.nextLock=!1:e.prevLock=!1,d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)),setTimeout(function(){d.repositionPhoto()},0)},generateBoxes:function(){var a=this,b=a.vars,c=a.options;c.infinite&&b.total>=3?(b.current==b.total-1&&(b.next=0),0==b.current&&(b.prev=b.total-1)):c.infinite=!1,a.loadContent(a.items[b.current],"current",c.show.speed),a.items[b.next]&&a.loadContent(a.items[b.next],"next",c.show.speed),a.items[b.prev]&&a.loadContent(a.items[b.prev],"prev",c.show.speed)},generateThumbnails:function(){var a=this,b=a.vars,c=a.options,d=null;if(b.thumbs&&!a.vars.dontGenerateThumbs){var e=b.thumbnails,f=$("div.ilightbox-thumbnails-container",e),g=$("div.ilightbox-thumbnails-grid",f),h=0;g.removeAttr("style").empty(),$.each(a.items,function(i,j){var k=b.current==i?"ilightbox-active":"",l=b.current==i?c.thumbnails.activeOpacity:c.thumbnails.normalOpacity,m=j.options.thumbnail,n=$('
'),o=$('
');n.css({opacity:0}).addClass(k),"video"!=j.type&&"flash"!=j.type||void 0!==j.options.icon?j.options.icon&&(o.addClass("ilightbox-thumbnail-"+j.options.icon),n.append(o)):(o.addClass("ilightbox-thumbnail-video"),n.append(o)),m&&a.loadImage(m,function(b){h++,b?n.data({naturalWidth:b.width,naturalHeight:b.height}).append(''):n.data({naturalWidth:c.thumbnails.maxWidth,naturalHeight:c.thumbnails.maxHeight}),clearTimeout(d),d=setTimeout(function(){a.positionThumbnails(e,f,g)},20),setTimeout(function(){n.fadeTo(c.effects.loadedFadeSpeed,l)},20*h)}),g.append(n)}),a.vars.dontGenerateThumbs=!0}},positionThumbnails:function(a,b,c){var d=this,e=d.vars,f=d.options,g=getViewport(),h=f.path.toLowerCase();a||(a=e.thumbnails),b||(b=$("div.ilightbox-thumbnails-container",a)),c||(c=$("div.ilightbox-thumbnails-grid",b));var i=$(".ilightbox-thumbnail",c),j="horizontal"==h?g.width-f.styles.pageOffsetX:i.eq(0).outerWidth()-f.styles.pageOffsetX,k="horizontal"==h?i.eq(0).outerHeight()-f.styles.pageOffsetY:g.height-f.styles.pageOffsetY,l="horizontal"==h?0:j,m="horizontal"==h?k:0,n=$(".ilightbox-active",c),o={};arguments.length<3&&(i.css({opacity:f.thumbnails.normalOpacity}),n.css({opacity:f.thumbnails.activeOpacity})),i.each(function(a){var b=$(this),c=b.data(),e="horizontal"==h?0:f.thumbnails.maxWidth;height="horizontal"==h?f.thumbnails.maxHeight:0,dims=d.getNewDimenstions(e,height,c.naturalWidth,c.naturalHeight,!0),b.css({width:dims.width,height:dims.height}),"horizontal"==h&&b.css({float:"left"}),"horizontal"==h?l+=b.outerWidth(!0):m+=b.outerHeight()}),o={width:l,height:m},c.css(o),o={};var p=c.offset(),q=n.length?n.offset():{top:parseInt(k/2),left:parseInt(j/2)};p.top=p.top-$doc.scrollTop(),p.left=p.left-$doc.scrollLeft(),q.top=q.top-p.top-$doc.scrollTop(),q.left=q.left-p.left-$doc.scrollLeft(),"horizontal"==h?(o.top=0,o.left=parseInt(j/2-q.left-n.outerWidth()/2)):(o.top=parseInt(k/2-q.top-n.outerHeight()/2),o.left=0),arguments.length<3?c.stop().animate(o,f.effects.repositionSpeed,"easeOutCirc"):c.css(o)},loadImage:function(a,b){$.isArray(a)||(a=[a]);var c=this,d=a.length;d>0?(c.showLoader(),$.each(a,function(e,f){var g=new Image;g.onload=function(){0==(d-=1)&&(c.hideLoader(),b(g))},g.onerror=g.onabort=function(){0==(d-=1)&&(c.hideLoader(),b(!1))},g.src=a[e]})):b(!1)},patchItemsEvents:function(){var a=this,b=a.vars,c=supportTouch?"click.iL itap.iL":"click.iL",d=supportTouch?"click.iL itap.iL":"itap.iL";if(a.context&&a.selector){var e=$(a.selector,a.context);$(a.context).on(c,a.selector,function(){var c=$(this),d=e.index(c);return b.current=d,b.next=a.items[d+1]?d+1:null,b.prev=a.items[d-1]?d-1:null,a.addContents(),a.patchEvents(),!1}).on(d,a.selector,function(){return!1})}else $.each(a.itemsObject,function(e,f){f.on(c,function(){return b.current=e,b.next=a.items[e+1]?e+1:null,b.prev=a.items[e-1]?e-1:null,a.addContents(),a.patchEvents(),!1}).on(d,function(){return!1})})},dispatchItemsEvents:function(){var a=this;a.vars,a.options;a.context&&a.selector?$(a.context).off(".iL",a.selector):$.each(a.itemsObject,function(a,b){b.off(".iL")})},refresh:function(){var a=this;a.dispatchItemsEvents(),a.attachItems(), a.normalizeItems(),a.patchItemsEvents()},patchEvents:function(){function a(a){c.isMobile||(c.mouseID||c.hideableElements.show(),c.mouseID=clearTimeout(c.mouseID),-1===i.indexOf(a.target)&&(c.mouseID=setTimeout(function(){c.hideableElements.hide(),c.mouseID=clearTimeout(c.mouseID)},3e3)))}var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f=$(".ilightbox-holder"),g=fullScreenApi.fullScreenEventName+".iLightBox",h=verticalDistanceThreshold=100,i=[c.nextButton[0],c.prevButton[0],c.nextButton[0].firstChild,c.prevButton[0].firstChild];$win.bind("resize.iLightBox",function(){var a=getViewport();d.mobileOptimizer&&!d.innerToolbar&&(c.isMobile=a.width<=c.mobileMaxWidth),c.BODY[c.isMobile?"addClass":"removeClass"]("isMobile"),b.repositionPhoto(null),supportTouch&&(clearTimeout(c.setTime),c.setTime=setTimeout(function(){var a=getScrollXY().y;window.scrollTo(0,a-30),window.scrollTo(0,a+30),window.scrollTo(0,a)},2e3)),c.thumbs&&b.positionThumbnails()}).bind("keydown.iLightBox",function(a){if(d.controls.keyboard)switch(a.keyCode){case 13:a.shiftKey&&d.keyboard.shift_enter&&b.fullScreenAction();break;case 27:d.keyboard.esc&&b.closeAction();break;case 37:d.keyboard.left&&!c.lockKey&&b.moveTo("prev");break;case 38:d.keyboard.up&&!c.lockKey&&b.moveTo("prev");break;case 39:d.keyboard.right&&!c.lockKey&&b.moveTo("next");break;case 40:d.keyboard.down&&!c.lockKey&&b.moveTo("next")}}),fullScreenApi.supportsFullScreen&&$win.bind(g,function(){b.doFullscreen()});var j=[d.caption.show+".iLightBox",d.caption.hide+".iLightBox",d.social.show+".iLightBox",d.social.hide+".iLightBox"].filter(function(a,b,c){return c.lastIndexOf(a)===b}),k="";$.each(j,function(a,b){0!=a&&(k+=" "),k+=b}),$doc.on(clickEvent,".ilightbox-overlay",function(){d.overlay.blur&&b.closeAction()}).on(clickEvent,".ilightbox-next, .ilightbox-next-button",function(){b.moveTo("next")}).on(clickEvent,".ilightbox-prev, .ilightbox-prev-button",function(){b.moveTo("prev")}).on(clickEvent,".ilightbox-thumbnail",function(){var a=$(this),d=$(".ilightbox-thumbnail",c.thumbnails),e=d.index(a);e!=c.current&&b.goTo(e)}).on(k,".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(a){var b=$("div.ilightbox-caption",c.holder),e=$("div.ilightbox-social",c.holder),f=d.effects.fadeSpeed;c.nextLock||c.prevLock?(a.type!=d.caption.show||b.is(":visible")?a.type==d.caption.hide&&b.is(":visible")&&b.fadeOut(f):b.fadeIn(f),a.type!=d.social.show||e.is(":visible")?a.type==d.social.hide&&e.is(":visible")&&e.fadeOut(f):e.fadeIn(f)):(a.type!=d.caption.show||b.is(":visible")?a.type==d.caption.hide&&b.is(":visible")&&b.stop().fadeOut(f):b.stop().fadeIn(f),a.type!=d.social.show||e.is(":visible")?a.type==d.social.hide&&e.is(":visible")&&e.stop().fadeOut(f):e.stop().fadeIn(f))}).on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-wrapper",function(a){"mouseenter"==a.type?c.lockWheel=!0:c.lockWheel=!1}).on(clickEvent,".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause",function(){var a=$(this);a.hasClass("fusion-updated")||(a.hasClass("ilightbox-fullscreen")?b.fullScreenAction():a.hasClass("ilightbox-play")?(b.resume(),a.addClass("ilightbox-pause").removeClass("ilightbox-play")):a.hasClass("ilightbox-pause")?(b.pause(),a.addClass("ilightbox-play").removeClass("ilightbox-pause")):b.closeAction(),a.addClass("fusion-updated"),setTimeout(function(){a.removeClass("fusion-updated")},100))}).on(touchMoveEvent,".ilightbox-overlay, .ilightbox-thumbnails-container",function(a){a.preventDefault()}),d.controls.arrows&&!supportTouch&&$doc.on("mousemove.iLightBox",a),d.controls.slideshow&&d.slideshow.pauseOnHover&&$doc.on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(a){"mouseenter"==a.type&&c.cycleID?b.pause():"mouseleave"==a.type&&c.isPaused&&b.resume()});var l=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails");d.controls.mousewheel&&l.on("mousewheel.iLightBox",function(a,d){c.lockWheel||(a.preventDefault(),d<0?b.moveTo("next"):d>0&&b.moveTo("prev"))}),d.controls.swipe&&f.on(touchStartEvent,function(a){function g(a){var b=$(this),c=p[a],d=[q.coords[0]-k.coords[0],q.coords[1]-k.coords[1]];b[0].style["horizontal"==e?"left":"top"]=("horizontal"==e?c.left-d[0]:c.top-d[1])+"px"}function i(a){if(q){var b=a.originalEvent.touches?a.originalEvent.touches[0]:a;k={time:(new Date).getTime(),coords:[b.pageX-n,b.pageY-m]},f.each(g),a.preventDefault()}}function j(){f.each(function(){var a=$(this),b=a.data("offset")||{top:a.offset().top-m,left:a.offset().left-n},c=b.top,d=b.left;a.css(transform,gpuAcceleration).stop().animate({top:c,left:d},500,"easeOutCirc",function(){a.css(transform,"")})})}if(!(c.nextLock||c.prevLock||1==c.total||c.lockSwipe)){c.BODY.addClass("ilightbox-closedhand");var k,l=a.originalEvent.touches?a.originalEvent.touches[0]:a,m=$doc.scrollTop(),n=$doc.scrollLeft(),o=[f.eq(0).offset(),f.eq(1).offset(),f.eq(2).offset()],p=[{top:o[0].top-m,left:o[0].left-n},{top:o[1].top-m,left:o[1].left-n},{top:o[2].top-m,left:o[2].left-n}],q={time:(new Date).getTime(),coords:[l.pageX-n,l.pageY-m]};f.bind(touchMoveEvent,i),$doc.one(touchStopEvent,function(a){f.unbind(touchMoveEvent,i),c.BODY.removeClass("ilightbox-closedhand"),q&&k&&("horizontal"==e&&k.time-q.time<1e3&&abs(q.coords[0]-k.coords[0])>h&&abs(q.coords[1]-k.coords[1])k.coords[0]?c.current!=c.total-1||d.infinite?(c.isSwipe=!0,b.moveTo("next")):j():0!=c.current||d.infinite?(c.isSwipe=!0,b.moveTo("prev")):j():"vertical"==e&&k.time-q.time<1e3&&abs(q.coords[1]-k.coords[1])>h&&abs(q.coords[0]-k.coords[0])k.coords[1]?c.current!=c.total-1||d.infinite?(c.isSwipe=!0,b.moveTo("next")):j():0!=c.current||d.infinite?(c.isSwipe=!0,b.moveTo("prev")):j():j()),q=k=undefined})}})},goTo:function(a){var b=this,c=b.vars,d=b.options,e=a-c.current;if(d.infinite&&(a==c.total-1&&0==c.current&&(e=-1),c.current==c.total-1&&0==a&&(e=1)),1==e)b.moveTo("next");else if(-1==e)b.moveTo("prev");else{if(c.nextLock||c.prevLock)return!1;"function"==typeof d.callback.onBeforeChange&&d.callback.onBeforeChange.call(b,b.ui),d.linkId&&(c.hashLock=!0,window.location.hash=d.linkId+"/"+a),b.items[a]&&(b.items[a].options.mousewheel?b.vars.lockWheel=!1:c.lockWheel=!0,b.items[a].options.swipe?c.lockSwipe=!1:c.lockSwipe=!0),$.each([c.holder,c.nextPhoto,c.prevPhoto],function(a,b){b.css(transform,gpuAcceleration).fadeOut(d.effects.loadedFadeSpeed)}),c.current=a,c.next=a+1,c.prev=a-1,b.createUI(),setTimeout(function(){b.generateBoxes()},d.effects.loadedFadeSpeed+50),$(".ilightbox-thumbnail",c.thumbnails).removeClass("ilightbox-active").eq(a).addClass("ilightbox-active"),b.positionThumbnails(),d.linkId&&setTimeout(function(){c.hashLock=!1},55),d.infinite||(c.nextButton.add(c.prevButton).add(c.innerPrevButton).add(c.innerNextButton).removeClass("disabled"),0==c.current&&c.prevButton.add(c.innerPrevButton).addClass("disabled"),c.current>=c.total-1&&c.nextButton.add(c.innerNextButton).addClass("disabled")),b.resetCycle(),"function"==typeof d.callback.onAfterChange&&d.callback.onAfterChange.call(b,b.ui)}},moveTo:function(a){var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f=getViewport(),g=d.effects.switchSpeed,h=b.vars.holder,i=h.find("iframe").length?h.find("iframe").attr("src"):"";if(i&&-1!==i.indexOf("vimeo.com")&&h.find("iframe").attr("src",i),c.nextLock||c.prevLock)return!1;var j="next"==a?c.next:c.prev;if(d.linkId&&j&&(c.hashLock=!0,window.location.hash=d.linkId+"/"+j),"next"==a){if(!b.items[j])return!1;var k=c.nextPhoto,l=c.holder,m=c.prevPhoto,n="ilightbox-prev",o="ilightbox-next"}else if("prev"==a){if(!b.items[j])return!1;var k=c.prevPhoto,l=c.holder,m=c.nextPhoto,n="ilightbox-next",o="ilightbox-prev"}"function"==typeof d.callback.onBeforeChange&&d.callback.onBeforeChange.call(b,b.ui),"next"==a?c.nextLock=!0:c.prevLock=!0;var p=$("div.ilightbox-caption",l),q=$("div.ilightbox-social",l);if(p.length&&p.stop().fadeOut(g,function(){$(this).remove()}),q.length&&q.stop().fadeOut(g,function(){$(this).remove()}),b.items[j].caption){b.setCaption(b.items[j],k);var r=$("div.ilightbox-caption",k),s=parseInt(r.outerHeight()/k.outerHeight()*100);d.caption.start&&s<=50&&r.fadeIn(g)}var t=b.items[j].options.social;t&&(b.setSocial(t,b.items[j].URL,k),d.social.start&&$("div.ilightbox-social",k).fadeIn(d.effects.fadeSpeed)),$.each([k,l,m],function(a,b){b.removeClass("ilightbox-next ilightbox-prev")});var u=k.data("offset"),v=f.width-d.styles.pageOffsetX,w=f.height-d.styles.pageOffsetY,x=u.newDims.width,y=u.newDims.height,z=u.thumbsOffset,A=u.diff,B=parseInt(w/2-y/2-A.H-z.H/2),C=parseInt(v/2-x/2-A.W-z.W/2);k.css(transform,gpuAcceleration).animate({top:B,left:C,opacity:1},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){k.css(transform,"")}),$("div.ilightbox-container",k).animate({width:x,height:y},g,c.isSwipe?"easeOutCirc":"easeInOutCirc");var D=l.data("offset"),E=D.object;A=D.diff,x=D.newDims.width,y=D.newDims.height,x=parseInt(x*d.styles["next"==a?"prevScale":"nextScale"]),y=parseInt(y*d.styles["next"==a?"prevScale":"nextScale"]),B="horizontal"==e?parseInt(w/2-E.offsetY-y/2-A.H-z.H/2):parseInt(w-E.offsetX-A.H-z.H/2),"prev"==a?C="horizontal"==e?parseInt(v-E.offsetX-A.W-z.W/2):parseInt(v/2-x/2-A.W-E.offsetY-z.W/2):(B="horizontal"==e?B:parseInt(E.offsetX-A.H-y-z.H/2),C="horizontal"==e?parseInt(E.offsetX-A.W-x-z.W/2):parseInt(v/2-E.offsetY-x/2-A.W-z.W/2)),$("div.ilightbox-container",l).animate({width:x,height:y},g,c.isSwipe?"easeOutCirc":"easeInOutCirc"),l.addClass(n).css(transform,gpuAcceleration).animate({top:B,left:C,opacity:d.styles.prevOpacity},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){l.css(transform,""),$(".ilightbox-thumbnail",c.thumbnails).removeClass("ilightbox-active").eq(j).addClass("ilightbox-active"),b.positionThumbnails(),b.items[j]&&(b.items[j].options.mousewheel?c.lockWheel=!1:c.lockWheel=!0,b.items[j].options.swipe?c.lockSwipe=!1:c.lockSwipe=!0),c.isSwipe=!1,"next"==a?(c.nextPhoto=m,c.prevPhoto=l,c.holder=k,c.nextPhoto.hide(),c.next=c.next+1,c.prev=c.current,c.current=c.current+1,d.infinite&&(c.current>c.total-1&&(c.current=0),c.current==c.total-1&&(c.next=0),0==c.current&&(c.prev=c.total-1)),b.createUI(),b.items[c.next]?b.loadContent(b.items[c.next],"next"):c.nextLock=!1):(c.prevPhoto=m,c.nextPhoto=l,c.holder=k,c.prevPhoto.hide(),c.next=c.current,c.current=c.prev,c.prev=c.current-1,d.infinite&&(c.current==c.total-1&&(c.next=0),0==c.current&&(c.prev=c.total-1)),b.createUI(),b.items[c.prev]?b.loadContent(b.items[c.prev],"prev"):c.prevLock=!1),d.linkId&&setTimeout(function(){c.hashLock=!1},55),d.infinite||(c.nextButton.add(c.prevButton).add(c.innerPrevButton).add(c.innerNextButton).removeClass("disabled"),0==c.current&&c.prevButton.add(c.innerPrevButton).addClass("disabled"),c.current>=c.total-1&&c.nextButton.add(c.innerNextButton).addClass("disabled")),b.repositionPhoto(),b.resetCycle(),"function"==typeof d.callback.onAfterChange&&d.callback.onAfterChange.call(b,b.ui)}),B="horizontal"==e?getPixel(m,"top"):"next"==a?parseInt(-w/2-m.outerHeight()):parseInt(2*B),C="horizontal"==e?"next"==a?parseInt(-v/2-m.outerWidth()):parseInt(2*C):getPixel(m,"left"),m.css(transform,gpuAcceleration).animate({top:B,left:C,opacity:d.styles.nextOpacity},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){m.css(transform,"")}).addClass(o)},setCaption:function(a,b){var c=$('
');a.caption&&(c.html(a.caption),$("div.ilightbox-container",b).append(c))},normalizeSocial:function(a,b){var c=this,d=(c.vars,c.options),e=window.location.href;return $.each(a,function(c,f){if(!f)return!0;var g,h,i=c.toLowerCase();switch(i){case"facebook":g="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",h="Share on Facebook";break;case"twitter":g="http://twitter.com/home?status={URL}",h="Share on Twitter";break;case"googleplus":g="https://plus.google.com/share?url={URL}",h="Share on Google+";break;case"delicious":g="http://delicious.com/post?url={URL}",h="Share on Delicious";break;case"digg":g="http://digg.com/submit?phase=2&url={URL}",h="Share on Digg";break;case"reddit":g="http://reddit.com/submit?url={URL}",h="Share on reddit"}a[c]={URL:f.URL&&absolutizeURI(e,f.URL)||d.linkId&&window.location.href||"string"!=typeof b&&e||b&&absolutizeURI(e,b)||e,source:f.source||g||f.URL&&absolutizeURI(e,f.URL)||b&&absolutizeURI(e,b),text:f.text||h||"Share on "+c,width:void 0===f.width||isNaN(f.width)?640:parseInt(f.width),height:f.height||360}}),a},setSocial:function(a,b,c){var d=this,e=$('
'),f="
    ";a=d.normalizeSocial(a,b),$.each(a,function(a,b){var c=(a.toLowerCase(),b.source.replace(/\{URL\}/g,encodeURIComponent(b.URL).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")));f+='
  • '}),f+="
",e.html(f),$("div.ilightbox-container",c).append(e)},fullScreenAction:function(){var a=this;a.vars;fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen(document.documentElement):fullScreenApi.requestFullScreen(document.documentElement):a.doFullscreen()},doFullscreen:function(){var a=this,b=a.vars,c=getViewport(),d=a.options;if(d.fullAlone){var e=b.holder,f=a.items[b.current],g=c.width,h=c.height,i=[e,b.nextPhoto,b.prevPhoto,b.nextButton,b.prevButton,b.overlay,b.toolbar,b.thumbnails,b.loader],j=[b.loader,b.thumbnails];if(b.isInFullScreen)b.isInFullScreen=b.lockKey=b.lockWheel=b.lockSwipe=!1,b.overlay.css({opacity:a.options.overlay.opacity}),$.each(j,function(a,b){b.show()}),b.fullScreenButton.attr("title",d.text.enterFullscreen),e.data({naturalWidth:e.data("naturalWidthOld"),naturalHeight:e.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null}),$.each(i,function(a,b){b.removeClass("ilightbox-fullscreen")}),"function"==typeof d.callback.onExitFullScreen&&d.callback.onExitFullScreen.call(a,a.ui);else{if(b.isInFullScreen=b.lockKey=b.lockWheel=b.lockSwipe=!0,b.overlay.css({opacity:1}),$.each(j,function(a,b){b.hide()}),b.fullScreenButton.attr("title",d.text.exitFullscreen),-1!=d.fullStretchTypes.indexOf(f.type))e.data({naturalWidthOld:e.data("naturalWidth"),naturalHeightOld:e.data("naturalHeight"),naturalWidth:g,naturalHeight:h});else{var c=f.options.fullViewPort||d.fullViewPort||"",k=g,l=h,m=e.data("naturalWidth"),n=e.data("naturalHeight");if("fill"==c.toLowerCase())(l=k/m*n)k||n>l,o=a.getNewDimenstions(k,l,m,n,p);k=o.width,l=o.height}e.data({naturalWidthOld:e.data("naturalWidth"),naturalHeightOld:e.data("naturalHeight"),naturalWidth:k,naturalHeight:l})}$.each(i,function(a,b){b.addClass("ilightbox-fullscreen")}),"function"==typeof d.callback.onEnterFullScreen&&d.callback.onEnterFullScreen.call(a,a.ui)}}else b.isInFullScreen?b.isInFullScreen=!1:b.isInFullScreen=!0;a.repositionPhoto(!0)},closeAction:function(){var a=this,b=a.vars,c=a.options;$win.unbind(".iLightBox"),$doc.off(".iLightBox"),$doc.off(clickEvent,".ilightbox-overlay"),$doc.off(clickEvent,".ilightbox-next, .ilightbox-next-button"),$doc.off(clickEvent,".ilightbox-prev, .ilightbox-prev-button"),$doc.off(clickEvent,".ilightbox-thumbnail"),$doc.off(clickEvent,".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause"),b.isInFullScreen&&fullScreenApi.cancelFullScreen(document.documentElement),$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox"),c.hide.effect?b.overlay.stop().fadeOut(c.hide.speed,function(){b.overlay.remove(),b.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}):(b.overlay.remove(),b.BODY.removeClass("ilightbox-noscroll").off(".iLightBox"));var d=[b.toolbar,b.holder,b.nextPhoto,b.prevPhoto,b.nextButton,b.prevButton,b.loader,b.thumbnails];$.each(d,function(a,b){b.removeAttr("style").remove()}),b.prevButton.removeClass("disabled"),b.nextButton.removeClass("disabled"),b.dontGenerateThumbs=b.isInFullScreen=!1,window.iLightBox=null,c.linkId&&(b.hashLock=!0,removeHash(),setTimeout(function(){b.hashLock=!1},55)),"function"==typeof c.callback.onHide&&c.callback.onHide.call(a,a.ui)},repositionPhoto:function(){var a=this,b=a.vars,c=a.options,d=c.path.toLowerCase(),e=getViewport(),f=e.width,g=e.height,h=b.isInFullScreen&&c.fullAlone||b.isMobile?0:"horizontal"==d?0:b.thumbnails.outerWidth(),i=b.isMobile?b.toolbar.outerHeight():b.isInFullScreen&&c.fullAlone?0:"horizontal"==d?b.thumbnails.outerHeight():0,j=b.isInFullScreen&&c.fullAlone?f:f-c.styles.pageOffsetX,k=b.isInFullScreen&&c.fullAlone?g:g-c.styles.pageOffsetY,l="horizontal"==d?parseInt(a.items[b.next]||a.items[b.prev]?2*(c.styles.nextOffsetX+c.styles.prevOffsetX):j/10<=30?30:j/10):parseInt(j/10<=30?30:j/10)+h,m="horizontal"==d?parseInt(k/10<=30?30:k/10)+i:parseInt(a.items[b.next]||a.items[b.prev]?2*(c.styles.nextOffsetX+c.styles.prevOffsetX):k/10<=30?30:k/10),n={type:"current",width:j,height:k,item:a.items[b.current],offsetW:l,offsetH:m,thumbsOffsetW:h,thumbsOffsetH:i,animate:arguments.length,holder:b.holder};a.repositionEl(n),a.items[b.next]&&(n=$.extend(n,{type:"next",item:a.items[b.next],offsetX:c.styles.nextOffsetX,offsetY:c.styles.nextOffsetY,holder:b.nextPhoto}),a.repositionEl(n)),a.items[b.prev]&&(n=$.extend(n,{type:"prev",item:a.items[b.prev],offsetX:c.styles.prevOffsetX,offsetY:c.styles.prevOffsetY,holder:b.prevPhoto}),a.repositionEl(n));var o="horizontal"==d?{left:parseInt(j/2-b.loader.outerWidth()/2)}:{top:parseInt(k/2-b.loader.outerHeight()/2)};b.loader.css(o)},repositionEl:function(a){var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f="current"==a.type&&c.isInFullScreen&&d.fullAlone?a.width:a.width-a.offsetW,g="current"==a.type&&c.isInFullScreen&&d.fullAlone?a.height:a.height-a.offsetH,h=a.item,i=a.item.options,j=a.holder,k=a.offsetX||0,l=a.offsetY||0,m=a.thumbsOffsetW,n=a.thumbsOffsetH;"current"==a.type?("number"==typeof i.width&&i.width&&(f=c.isInFullScreen&&d.fullAlone&&(-1!=d.fullStretchTypes.indexOf(h.type)||i.fullViewPort||d.fullViewPort)?f:i.width>f?f:i.width),"number"==typeof i.height&&i.height&&(g=c.isInFullScreen&&d.fullAlone&&(-1!=d.fullStretchTypes.indexOf(h.type)||i.fullViewPort||d.fullViewPort)?g:i.height>g?g:i.height)):("number"==typeof i.width&&i.width&&(f=i.width>f?f:i.width),"number"==typeof i.height&&i.height&&(g=i.height>g?g:i.height)),g=parseInt(g-$(".ilightbox-inner-toolbar",j).outerHeight());var o="string"==typeof i.width&&-1!=i.width.indexOf("%")?percentToValue(parseInt(i.width.replace("%","")),a.width):j.data("naturalWidth"),p="string"==typeof i.height&&-1!=i.height.indexOf("%")?percentToValue(parseInt(i.height.replace("%","")),a.height):j.data("naturalHeight"),q="string"==typeof i.width&&-1!=i.width.indexOf("%")||"string"==typeof i.height&&-1!=i.height.indexOf("%")?{width:o,height:p}:b.getNewDimenstions(f,g,o,p),r=$.extend({},q,{});"prev"==a.type||"next"==a.type?(o=parseInt(q.width*("next"==a.type?d.styles.nextScale:d.styles.prevScale)),p=parseInt(q.height*("next"==a.type?d.styles.nextScale:d.styles.prevScale))):(o=q.width,p=q.height);var s=parseInt((getPixel(j,"padding-left")+getPixel(j,"padding-right")+getPixel(j,"border-left-width")+getPixel(j,"border-right-width"))/2),t=parseInt((getPixel(j,"padding-top")+getPixel(j,"padding-bottom")+getPixel(j,"border-top-width")+getPixel(j,"border-bottom-width")+($(".ilightbox-inner-toolbar",j).outerHeight()||0))/2);switch(a.type){case"current":var u=parseInt(a.height/2-p/2-t-n/2),v=parseInt(a.width/2-o/2-s-m/2);break;case"next":var u="horizontal"==e?parseInt(a.height/2-l-p/2-t-n/2):parseInt(a.height-k-t-n/2),v="horizontal"==e?parseInt(a.width-k-s-m/2):parseInt(a.width/2-o/2-s-l-m/2);break;case"prev":var u="horizontal"==e?parseInt(a.height/2-l-p/2-t-n/2):parseInt(k-t-p-n/2),v="horizontal"==e?parseInt(k-s-o-m/2):parseInt(a.width/2-l-o/2-s-m/2)}j.data("offset",{top:u,left:v,newDims:r,diff:{W:s,H:t},thumbsOffset:{W:m,H:n},object:a}),a.animate>0&&d.effects.reposition?(j.css(transform,gpuAcceleration).stop().animate({top:u,left:v},d.effects.repositionSpeed,"easeOutCirc",function(){j.css(transform,"")}),$("div.ilightbox-container",j).stop().animate({width:o,height:p},d.effects.repositionSpeed,"easeOutCirc"),$("div.ilightbox-inner-toolbar",j).stop().animate({width:o},d.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})):(j.css({top:u,left:v}),$("div.ilightbox-container",j).css({width:o,height:p}),$("div.ilightbox-inner-toolbar",j).css({width:o}))},resume:function(a){var b=this,c=b.vars,d=b.options;!d.slideshow.pauseTime||d.controls.slideshow&&c.total<=1||af.options.maxScale?factor=f.options.maxScale:factor=0,html5H264:!(!b.canPlayType||!b.canPlayType("video/mp4").replace(/no/,"")),html5WebM:!(!b.canPlayType||!b.canPlayType("video/webm").replace(/no/,"")),html5Vorbis:!(!b.canPlayType||!b.canPlayType("video/ogg").replace(/no/,"")),html5QuickTime:!(!b.canPlayType||!b.canPlayType("video/quicktime").replace(/no/,""))}},addContent:function(a,b){var c,d=this;switch(b.type){case"video":var e=!1,f=b.videoType,g=b.options.html5video;("video/mp4"==f||"mp4"==b.ext||"m4v"==b.ext||g.h264)&&d.plugins.html5H264?(b.ext="mp4",b.URL=g.h264||b.URL):g.webm&&d.plugins.html5WebM?(b.ext="webm",b.URL=g.webm||b.URL):g.ogg&&d.plugins.html5Vorbis&&(b.ext="ogv",b.URL=g.ogg||b.URL),!d.plugins.html5H264||"video/mp4"!=f&&"mp4"!=b.ext&&"m4v"!=b.ext?!d.plugins.html5WebM||"video/webm"!=f&&"webm"!=b.ext?!d.plugins.html5Vorbis||"video/ogg"!=f&&"ogv"!=b.ext?!d.plugins.html5QuickTime||"video/quicktime"!=f&&"mov"!=b.ext&&"qt"!=b.ext||(e=!0,f="video/quicktime"):(e=!0,f="video/ogg"):(e=!0,f="video/webm"):(e=!0,f="video/mp4"),e?c=$("