// source --> https://www.loveignoz.com/wp-content/themes/econature/js/jsLibraries.min.js?ver=1.0.0 /** * @package WordPress * @subpackage EcoNature * @version 1.0.0 */ /* Modernizr 2.8.3 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load */ ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.flexboxlegacy=function(){return J("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, 0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); // source --> https://www.loveignoz.com/wp-content/themes/econature/js/jquery.iLightBox.min.js?ver=2.2.0 /** * @package WordPress * @subpackage EcoNature * @version 1.1.0 */ /** * jQuery iLightBox - Revolutionary Lightbox Plugin * http://www.ilightbox.net/ * * @version: 2.2.0 - September 23, 2014 * * @author: Hemn Chawroka * http://www.iprodev.com/ * */ (function($,window,undefined){function getPixel(e,t){return parseInt(e.css(t),10)||0}function within(e,t,n){return en?n:e}function getViewport(){var e=window,t="inner";if(!("innerWidth"in window)){t="client";e=document.documentElement||document.body}return{width:e[t+"Width"],height:e[t+"Height"]}}function removeHash(){var e=getScrollXY();window.location.hash="";window.scrollTo(e.x,e.y)}function doAjax(e,t){var e="http://ilightbox.net/getSource/jsonp.php?url="+encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");$.ajax({url:e,dataType:"jsonp"});iLCallback=function(e){t.call(this,e)}}function findImageInElement(e){var t=$("*",e),n=new Array;t.each(function(){var e="",t=this;if($(t).css("background-image")!="none"){e=$(t).css("background-image")}else if(typeof $(t).attr("src")!="undefined"&&t.nodeName.toLowerCase()=="img"){e=$(t).attr("src")}if(e.indexOf("gradient")==-1){e=e.replace(/url\(\"/g,"");e=e.replace(/url\(/g,"");e=e.replace(/\"\)/g,"");e=e.replace(/\)/g,"");var r=e.split(",");for(var i=0;i0&&$.inArray(r[i],n)==-1){var s="";if(browser.msie&&browser.version<9){s="?"+floor(random()*3e3)}n.push(r[i]+s)}}}});return n}function getExtension(e){var t=e.split(".").pop().toLowerCase(),n=t.indexOf("?")!==-1?t.split("?").pop():"";return t.replace(n,"")}function getTypeByExtension(e){var t,n=getExtension(e);if(extensions.image.indexOf(n)!==-1)t="image";else if(extensions.flash.indexOf(n)!==-1)t="flash";else if(extensions.video.indexOf(n)!==-1)t="video";else t="iframe";return t}function percentToValue(e,t){return parseInt(t/100*e)}function parseURI(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function absolutizeURI(e,t){function r(e){var t=[];e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){if(e==="/.."){t.pop()}else{t.push(e)}});return t.join("").replace(/^\//,e.charAt(0)==="/"?"/":"")}var n=this;t=parseURI(t||"");e=parseURI(e||"");return!t||!e?null:(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+r(t.protocol||t.authority||t.pathname.charAt(0)==="/"?t.pathname:t.pathname?(e.authority&&!e.pathname?"/":"")+e.pathname.slice(0,e.pathname.lastIndexOf("/")+1)+t.pathname:e.pathname)+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash}function version_compare(e,t,n){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var r=0,i=0,s=0,o={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},u=function(e){e=(""+e).replace(/[_\-+]/g,".");e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return!e.length?[-8]:e.split(".")},a=function(e){return!e?0:isNaN(e)?o[e]||-7:parseInt(e,10)};e=u(e);t=u(t);i=max(e.length,t.length);for(r=0;rt[r]){s=1;break}}if(!n){return s}switch(n){case">":case"gt":return s>0;case">=":case"ge":return s>=0;case"<=":case"le":return s<=0;case"==":case"=":case"eq":return s===0;case"<>":case"!=":case"ne":return s!==0;case"":case"<":case"lt":return s<0;default:return null}}function getScrollXY(){var e=0,t=0;if(typeof window.pageYOffset=="number"){t=window.pageYOffset;e=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){t=document.body.scrollTop;e=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){t=document.documentElement.scrollTop;e=document.documentElement.scrollLeft}return{x:e,y:t}}function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(e,t){t=t.replace("%%",e);alert(t)}function _QTAddAttribute(e,t,n){var r;r=gTagAttrs[e+t];null==r&&(r=gTagAttrs[t]);return null!=r?(0==t.indexOf(e)&&null==n&&(n=t.substring(e.length)),null==n&&(n=t),n+'="'+r+'" '):""}function _QTAddObjectAttr(e,t){if(0==e.indexOf("emb#"))return"";0==e.indexOf("obj#")&&null==t&&(t=e.substring(4));return _QTAddAttribute("obj#",e,t)}function _QTAddEmbedAttr(e,t){if(0==e.indexOf("obj#"))return"";0==e.indexOf("emb#")&&null==t&&(t=e.substring(4));return _QTAddAttribute("emb#",e,t)}function _QTAddObjectParam(e,t){var n,r="",i=t?" />":">";-1==e.indexOf("emb#")&&(n=gTagAttrs["obj#"+e],null==n&&(n=gTagAttrs[e]),0==e.indexOf("obj#")&&(e=e.substring(4)),null!=n&&(r=' n.length||0!=n.length%2)return _QTComplain(e,gArgCountErr),"";gTagAttrs=[];gTagAttrs.src=n[0];gTagAttrs.width=n[1];gTagAttrs.height=n[2];gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/";e=n[3];if(null==e||""==e)e="6,0,2,0";gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+e;for(var r,i=4;i\n"+_QTAddObjectParam("src",t);i=" \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="",supportTouch=!!("ontouchstart"in window)&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),clickEvent=supportTouch?"itap.iLightBox":"click.iLightBox",touchStartEvent=supportTouch?"touchstart.iLightBox":"mousedown.iLightBox",touchStopEvent=supportTouch?"touchend.iLightBox":"mouseup.iLightBox",touchMoveEvent=supportTouch?"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(e,t,n,r){var i=this;i.options=t,i.selector=e.selector||e,i.context=e.context,i.instant=r;if(n.length<1)i.attachItems();else i.items=n;i.vars={total:i.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:false,nextLock:false,prevLock:false,hashLock:false,isMobile:false,mobileMaxWidth:980,isInFullScreen:false,isSwipe:false,mouseID:0,cycleID:0,isPaused:0};i.vars.hideableElements=i.vars.nextButton.add(i.vars.prevButton);i.normalizeItems();i.availPlugins();i.options.startFrom=i.options.startFrom>0&&i.options.startFrom>=i.vars.total?i.vars.total-1:i.options.startFrom;i.options.startFrom=i.options.randomStart?floor(random()*i.vars.total):i.options.startFrom;i.vars.start=i.options.startFrom;if(r)i.instantCall();else i.patchItemsEvents();if(i.options.linkId){i.hashChangeHandler();$win.iLightBoxHashChange(function(){i.hashChangeHandler()})}if(supportTouch){var s=/(click|mouseenter|mouseleave|mouseover|mouseout)/ig,o="itap";i.options.caption.show=i.options.caption.show.replace(s,o),i.options.caption.hide=i.options.caption.hide.replace(s,o),i.options.social.show=i.options.social.show.replace(s,o),i.options.social.hide=i.options.social.hide.replace(s,o)}if(i.options.controls.arrows){$.extend(i.options.styles,{nextOffsetX:0,prevOffsetX:0,nextOpacity:0,prevOpacity:0})}};iLightBox.prototype={showLoader:function(){var e=this;e.vars.loadRequests+=1;if(e.options.path.toLowerCase()=="horizontal")e.vars.loader.stop().animate({top:"-30px"},e.options.show.speed,"easeOutCirc");else e.vars.loader.stop().animate({left:"-30px"},e.options.show.speed,"easeOutCirc")},hideLoader:function(){var e=this;e.vars.loadRequests-=1;e.vars.loadRequests=e.vars.loadRequests<0?0:e.vars.loadRequests;if(e.options.path.toLowerCase()=="horizontal"){if(e.vars.loadRequests<=0)e.vars.loader.stop().animate({top:"-192px"},e.options.show.speed,"easeInCirc")}else{if(e.vars.loadRequests<=0)e.vars.loader.stop().animate({left:"-192px"},e.options.show.speed,"easeInCirc")}},createUI:function(){var e=this;e.ui={currentElement:e.vars.holder,nextElement:e.vars.nextPhoto,prevElement:e.vars.prevPhoto,currentItem:e.vars.current,nextItem:e.vars.next,prevItem:e.vars.prev,hide:function(){e.closeAction()},refresh:function(){arguments.length>0?e.repositionPhoto(true):e.repositionPhoto()},fullscreen:function(){e.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});if(!iL.instant)itemsObject.push(t)});iL.items=items,iL.itemsObject=itemsObject},normalizeItems:function(){var e=this,t=new Array;$.each(e.items,function(n,r){if(typeof r=="string")r={url:r};var i=r.url||r.URL||null,s=r.options||{},o=r.caption||null,u=r.title||null,a=r.type?r.type.toLowerCase():getTypeByExtension(i),f=typeof i!="object"?getExtension(i):"";s.thumbnail=s.thumbnail||(a=="image"?i:null),s.videoType=s.videoType||null,s.skin=s.skin||e.options.skin,s.width=s.width||null,s.height=s.height||null,s.mousewheel=typeof s.mousewheel!="undefined"?s.mousewheel:true,s.swipe=typeof s.swipe!="undefined"?s.swipe:true,s.social=typeof s.social!="undefined"?s.social:e.options.social.buttons&&$.extend({},{},e.options.social.buttons);if(a=="video"){s.html5video=typeof s.html5video!="undefined"?s.html5video:{};s.html5video.webm=s.html5video.webm||s.html5video.WEBM||null;s.html5video.controls=typeof s.html5video.controls!="undefined"?s.html5video.controls:"controls";s.html5video.preload=s.html5video.preload||"metadata";s.html5video.autoplay=typeof s.html5video.autoplay!="undefined"?s.html5video.autoplay:false}if(!s.width||!s.height){if(a=="video")s.width=1280,s.height=720;else if(a=="iframe")s.width="100%",s.height="90%";else if(a=="flash")s.width=1280,s.height=720}delete r.url;r.index=n;r.URL=i;r.caption=o;r.title=u;r.type=a;r.options=s;r.ext=f;t.push(r)});e.items=t},instantCall:function(){var e=this,t=e.vars.start;e.vars.current=t;e.vars.next=e.items[t+1]?t+1:null;e.vars.prev=e.items[t-1]?t-1:null;e.addContents();e.patchEvents()},addContents:function(){var e=this,t=e.vars,n=e.options,r=getViewport(),i=n.path.toLowerCase(),s=t.total>0&&e.items.filter(function(e,t,r){return["image","flash","video"].indexOf(e.type)===-1&&typeof e.recognized==="undefined"&&(n.smartRecognition||e.options.smartRecognition)}),o=s.length>0;if(n.mobileOptimizer&&!n.innerToolbar)t.isMobile=r.width<=t.mobileMaxWidth;t.overlay.addClass(n.skin).hide().css("opacity",n.overlay.opacity);if(n.linkId)t.overlay[0].setAttribute("linkid",n.linkId);if(n.controls.toolbar){t.toolbar.addClass(n.skin).append(t.closeButton);if(n.controls.fullscreen)t.toolbar.append(t.fullScreenButton);if(n.controls.slideshow)t.toolbar.append(t.innerPlayButton);if(t.total>1)t.toolbar.append(t.innerPrevButton).append(t.innerNextButton)}t.BODY.addClass("ilightbox-noscroll").append(t.overlay).append(t.loader).append(t.holder).append(t.nextPhoto).append(t.prevPhoto);if(!n.innerToolbar)t.BODY.append(t.toolbar);if(n.controls.arrows)t.BODY.append(t.nextButton).append(t.prevButton);if(n.controls.thumbnail&&t.total>1){t.BODY.append(t.thumbnails);t.thumbnails.addClass(n.skin).addClass("ilightbox-"+i);$("div.ilightbox-thumbnails-grid",t.thumbnails).empty();t.thumbs=true}var u=n.path.toLowerCase()=="horizontal"?{left:parseInt(r.width/2-t.loader.outerWidth()/2)}:{top:parseInt(r.height/2-t.loader.outerHeight()/2)};t.loader.addClass(n.skin).css(u);t.nextButton.add(t.prevButton).addClass(n.skin);if(i=="horizontal")t.loader.add(t.nextButton).add(t.prevButton).addClass("horizontal");t.BODY[t.isMobile?"addClass":"removeClass"]("isMobile");if(!n.infinite){t.prevButton.add(t.prevButton).add(t.innerPrevButton).add(t.innerNextButton).removeClass("disabled");if(t.current==0)t.prevButton.add(t.innerPrevButton).addClass("disabled");if(t.current>=t.total-1)t.nextButton.add(t.innerNextButton).addClass("disabled")}if(n.show.effect){t.overlay.stop().fadeIn(n.show.speed);t.toolbar.stop().fadeIn(n.show.speed)}else{t.overlay.show();t.toolbar.show()}var a=s.length;if(o){e.showLoader();$.each(s,function(r,i){var s=function(r){var i=-1,s=e.items.filter(function(e,t,n){if(e.URL==r.url)i=t;return e.URL==r.url}),o=e.items[i];if(r)$.extend(true,o,{URL:r.source,type:r.type,recognized:true,options:{html5video:r.html5video,width:r.type=="image"?0:r.width||o.width,height:r.type=="image"?0:r.height||o.height,thumbnail:o.options.thumbnail||r.thumbnail}});a--;if(a==0){e.hideLoader();t.dontGenerateThumbs=false;e.generateThumbnails();if(n.show.effect)setTimeout(function(){e.generateBoxes()},n.show.speed);else e.generateBoxes()}};e.ogpRecognition(this,s)})}else{if(n.show.effect)setTimeout(function(){e.generateBoxes()},n.show.speed);else e.generateBoxes()}e.createUI();window.iLightBox={close:function(){e.closeAction()},fullscreen:function(){e.fullScreenAction()},moveNext:function(){e.moveTo("next")},movePrev:function(){e.moveTo("prev")},goTo:function(t){e.goTo(t)},refresh:function(){e.refresh()},reposition:function(){arguments.length>0?e.repositionPhoto(true):e.repositionPhoto()},setOption:function(t){e.setOption(t)},destroy:function(){e.closeAction();e.dispatchItemsEvents()}};if(n.linkId){t.hashLock=true;window.location.hash=n.linkId+"/"+t.current;setTimeout(function(){t.hashLock=false},55)}if(!n.slideshow.startPaused){e.resume();t.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")}if(typeof e.options.callback.onOpen=="function")e.options.callback.onOpen.call(e)},loadContent:function(e,t,n){var r=this,i,s;r.createUI();e.speed=n||r.options.effects.loadedFadeSpeed;if(t=="current"){if(!e.options.mousewheel)r.vars.lockWheel=true;else r.vars.lockWheel=false;if(!e.options.swipe)r.vars.lockSwipe=true;else r.vars.lockSwipe=false}switch(t){case"current":i=r.vars.holder,s=r.vars.current;break;case"next":i=r.vars.nextPhoto,s=r.vars.next;break;case"prev":i=r.vars.prevPhoto,s=r.vars.prev;break}i.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")).addClass(e.options.skin);$("div.ilightbox-inner-toolbar",i).remove();if(e.title||r.options.innerToolbar){var o=r.vars.innerToolbar.clone();if(e.title&&r.options.show.title){var u=r.vars.title.clone();u.empty().html(e.title);o.append(u)}if(r.options.innerToolbar){o.append(r.vars.total>1?r.vars.toolbar.clone():r.vars.toolbar)}i.prepend(o)}r.loadSwitcher(e,i,s,t)},loadSwitcher:function(e,t,n,r){var i=this,s=i.options,o={element:t,position:n};switch(e.type){case"image":if(typeof s.callback.onBeforeLoad=="function")s.callback.onBeforeLoad.call(i,i.ui,n);if(typeof e.options.onBeforeLoad=="function")e.options.onBeforeLoad.call(i,o);i.loadImage(e.URL,function(u){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);var a=u?u.width:400,f=u?u.height:200;t.data({naturalWidth:a,naturalHeight:f});$("div.ilightbox-container",t).empty().append(u?'':''+s.errors.loadImage+"");if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);i.configureHolder(e,r,t)});break;case"video":t.data({naturalWidth:e.options.width,naturalHeight:e.options.height});i.addContent(t,e);if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);i.configureHolder(e,r,t);break;case"iframe":i.showLoader();t.data({naturalWidth:e.options.width,naturalHeight:e.options.height});var u=i.addContent(t,e);if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);if(typeof s.callback.onBeforeLoad=="function")s.callback.onBeforeLoad.call(i,i.ui,n);if(typeof e.options.onBeforeLoad=="function")e.options.onBeforeLoad.call(i,o);u.bind("load",function(){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);i.hideLoader();i.configureHolder(e,r,t);u.unbind("load")});break;case"inline":var u=$(e.URL),a=i.addContent(t,e),f=findImageInElement(t);t.data({naturalWidth:i.items[n].options.width||u.outerWidth(),naturalHeight:i.items[n].options.height||u.outerHeight()});a.children().eq(0).show();if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);if(typeof s.callback.onBeforeLoad=="function")s.callback.onBeforeLoad.call(i,i.ui,n);if(typeof e.options.onBeforeLoad=="function")e.options.onBeforeLoad.call(i,o);i.loadImage(f,function(){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);i.configureHolder(e,r,t)});break;case"flash":var u=i.addContent(t,e);t.data({naturalWidth:i.items[n].options.width||u.outerWidth(),naturalHeight:i.items[n].options.height||u.outerHeight()});if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);i.configureHolder(e,r,t);break;case"ajax":var l=e.options.ajax||{};if(typeof s.callback.onBeforeLoad=="function")s.callback.onBeforeLoad.call(i,i.ui,n);if(typeof e.options.onBeforeLoad=="function")e.options.onBeforeLoad.call(i,o);i.showLoader();$.ajax({url:e.URL||s.ajaxSetup.url,data:l.data||null,dataType:l.dataType||"html",type:l.type||s.ajaxSetup.type,cache:l.cache||s.ajaxSetup.cache,crossDomain:l.crossDomain||s.ajaxSetup.crossDomain,global:l.global||s.ajaxSetup.global,ifModified:l.ifModified||s.ajaxSetup.ifModified,username:l.username||s.ajaxSetup.username,password:l.password||s.ajaxSetup.password,beforeSend:l.beforeSend||s.ajaxSetup.beforeSend,complete:l.complete||s.ajaxSetup.complete,success:function(u,a,f){i.hideLoader();var c=$(u),h=$("div.ilightbox-container",t),p=i.items[n].options.width||parseInt(c[0].getAttribute("width")),d=i.items[n].options.height||parseInt(c[0].getAttribute("height")),v=c[0].getAttribute("width")&&c[0].getAttribute("height")?{overflow:"hidden"}:{};h.empty().append($('
').css(v).html(c));t.show().data({naturalWidth:p||h.outerWidth(),naturalHeight:d||h.outerHeight()}).hide();if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);var m=findImageInElement(t);i.loadImage(m,function(){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);i.configureHolder(e,r,t)});s.ajaxSetup.success(u,a,f);if(typeof l.success=="function")l.success(u,a,f)},error:function(u,a,f){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);i.hideLoader();$("div.ilightbox-container",t).empty().append(''+s.errors.loadContents+"");i.configureHolder(e,r,t);s.ajaxSetup.error(u,a,f);if(typeof l.error=="function")l.error(u,a,f)}});break;case"html":var c=e.URL,u;container=$("div.ilightbox-container",t);if(c[0].nodeName)u=c.clone();else{var h=$(c);if(h.selector)u=$("
"+h+"
");else u=h}var p=i.items[n].options.width||parseInt(u.attr("width")),d=i.items[n].options.height||parseInt(u.attr("height"));i.addContent(t,e);u.appendTo(document.documentElement).hide();if(typeof s.callback.onRender=="function")s.callback.onRender.call(i,i.ui,n);if(typeof e.options.onRender=="function")e.options.onRender.call(i,o);var f=findImageInElement(t);if(typeof s.callback.onBeforeLoad=="function")s.callback.onBeforeLoad.call(i,i.ui,n);if(typeof e.options.onBeforeLoad=="function")e.options.onBeforeLoad.call(i,o);i.loadImage(f,function(){if(typeof s.callback.onAfterLoad=="function")s.callback.onAfterLoad.call(i,i.ui,n);if(typeof e.options.onAfterLoad=="function")e.options.onAfterLoad.call(i,o);t.show().data({naturalWidth:p||container.outerWidth(),naturalHeight:d||container.outerHeight()}).hide();u.remove();i.configureHolder(e,r,t)});break}},configureHolder:function(e,t,n){var r=this,i=r.vars,s=r.options;if(t!="current")t=="next"?n.addClass("ilightbox-next"):n.addClass("ilightbox-prev");if(t=="current")var o=i.current;else if(t=="next")var u=s.styles.nextOpacity,o=i.next;else var u=s.styles.prevOpacity,o=i.prev;var a={element:n,position:o};r.items[o].options.width=r.items[o].options.width||0,r.items[o].options.height=r.items[o].options.height||0;if(t=="current"){if(s.show.effect)n.css(transform,gpuAcceleration).fadeIn(e.speed,function(){n.css(transform,"");if(e.caption){r.setCaption(e,n);var t=$("div.ilightbox-caption",n),i=parseInt(t.outerHeight()/n.outerHeight()*100);if(s.caption.start&i<=50)t.fadeIn(s.effects.fadeSpeed)}var u=e.options.social;if(u){r.setSocial(u,e.URL,n);if(s.social.start)$("div.ilightbox-social",n).fadeIn(s.effects.fadeSpeed)}r.generateThumbnails();if(typeof s.callback.onShow=="function")s.callback.onShow.call(r,r.ui,o);if(typeof e.options.onShow=="function")e.options.onShow.call(r,a)});else{n.show();r.generateThumbnails();if(typeof s.callback.onShow=="function")s.callback.onShow.call(r,r.ui,o);if(typeof e.options.onShow=="function")e.options.onShow.call(r,a)}}else{if(s.show.effect)n.fadeTo(e.speed,u,function(){if(t=="next")i.nextLock=false;else i.prevLock=false;r.generateThumbnails();if(typeof s.callback.onShow=="function")s.callback.onShow.call(r,r.ui,o);if(typeof e.options.onShow=="function")e.options.onShow.call(r,a)});else{n.css({opacity:u}).show();if(t=="next")i.nextLock=false;else i.prevLock=false;r.generateThumbnails();if(typeof s.callback.onShow=="function")s.callback.onShow.call(r,r.ui,o);if(typeof e.options.onShow=="function")e.options.onShow.call(r,a)}}setTimeout(function(){r.repositionPhoto()},0)},generateBoxes:function(){var e=this,t=e.vars,n=e.options;if(n.infinite&&t.total>=3){if(t.current==t.total-1)t.next=0;if(t.current==0)t.prev=t.total-1}else n.infinite=false;e.loadContent(e.items[t.current],"current",n.show.speed);if(e.items[t.next])e.loadContent(e.items[t.next],"next",n.show.speed);if(e.items[t.prev])e.loadContent(e.items[t.prev],"prev",n.show.speed)},generateThumbnails:function(){var e=this,t=e.vars,n=e.options,r=null;if(t.thumbs&&!e.vars.dontGenerateThumbs){var i=t.thumbnails,s=$("div.ilightbox-thumbnails-container",i),o=$("div.ilightbox-thumbnails-grid",s),u=0;o.removeAttr("style").empty();$.each(e.items,function(a,f){var l=t.current==a?"ilightbox-active":"",c=t.current==a?n.thumbnails.activeOpacity:n.thumbnails.normalOpacity,h=f.options.thumbnail,p=$('
'),d=$('
');p.css({opacity:0}).addClass(l);if((f.type=="video"||f.type=="flash")&&typeof f.options.icon=="undefined"){d.addClass("ilightbox-thumbnail-video");p.append(d)}else if(f.options.icon){d.addClass("ilightbox-thumbnail-"+f.options.icon);p.append(d)}if(h)e.loadImage(h,function(t){u++;if(t)p.data({naturalWidth:t.width,naturalHeight:t.height}).append('');else p.data({naturalWidth:n.thumbnails.maxWidth,naturalHeight:n.thumbnails.maxHeight});clearTimeout(r);r=setTimeout(function(){e.positionThumbnails(i,s,o)},20);setTimeout(function(){p.fadeTo(n.effects.loadedFadeSpeed,c)},u*20)});o.append(p)});e.vars.dontGenerateThumbs=true}},positionThumbnails:function(e,t,n){var r=this,i=r.vars,s=r.options,o=getViewport(),u=s.path.toLowerCase();if(!e)e=i.thumbnails;if(!t)t=$("div.ilightbox-thumbnails-container",e);if(!n)n=$("div.ilightbox-thumbnails-grid",t);var a=$(".ilightbox-thumbnail",n),f=u=="horizontal"?o.width-s.styles.pageOffsetX:a.eq(0).outerWidth()-s.styles.pageOffsetX,l=u=="horizontal"?a.eq(0).outerHeight()-s.styles.pageOffsetY:o.height-s.styles.pageOffsetY,c=u=="horizontal"?0:f,h=u=="horizontal"?l:0,p=$(".ilightbox-active",n),d={},v={};if(arguments.length<3){a.css({opacity:s.thumbnails.normalOpacity});p.css({opacity:s.thumbnails.activeOpacity})}a.each(function(e){var t=$(this),n=t.data(),i=u=="horizontal"?0:s.thumbnails.maxWidth;height=u=="horizontal"?s.thumbnails.maxHeight:0;dims=r.getNewDimenstions(i,height,n.naturalWidth,n.naturalHeight,true);t.css({width:dims.width,height:dims.height});if(u=="horizontal")t.css({"float":"left"});u=="horizontal"?c+=t.outerWidth():h+=t.outerHeight()});d={width:c,height:h};n.css(d);d={};var m=n.offset(),g=p.length?p.offset():{top:parseInt(l/2),left:parseInt(f/2)};m.top=m.top-$doc.scrollTop(),m.left=m.left-$doc.scrollLeft(),g.top=g.top-m.top-$doc.scrollTop(),g.left=g.left-m.left-$doc.scrollLeft();u=="horizontal"?(d.top=0,d.left=parseInt(f/2-g.left-p.outerWidth()/2)):(d.top=parseInt(l/2-g.top-p.outerHeight()/2),d.left=0);if(arguments.length<3)n.stop().animate(d,s.effects.repositionSpeed,"easeOutCirc");else n.css(d)},loadImage:function(e,t){if(!$.isArray(e))e=[e];var n=this,r=e.length;if(r>0){n.showLoader();$.each(e,function(i,s){var o=new Image;o.onload=function(){r-=1;if(r==0){n.hideLoader();t(o)}};o.onerror=o.onabort=function(){r-=1;if(r==0){n.hideLoader();t(false)}};o.src=e[i]})}else t(false)},patchItemsEvents:function(){var e=this,t=e.vars,n=supportTouch?"itap.iL":"click.iL",r=supportTouch?"click.iL":"itap.iL";if(e.context&&e.selector){var i=$(e.selector,e.context);$(e.context).on(n,e.selector,function(){var n=$(this),r=i.index(n);t.current=r;t.next=e.items[r+1]?r+1:null;t.prev=e.items[r-1]?r-1:null;e.addContents();e.patchEvents();return false}).on(r,e.selector,function(){return false})}else $.each(e.itemsObject,function(i,s){s.on(n,function(){t.current=i;t.next=e.items[i+1]?i+1:null;t.prev=e.items[i-1]?i-1:null;e.addContents();e.patchEvents();return false}).on(r,function(){return false})})},dispatchItemsEvents:function(){var e=this,t=e.vars,n=e.options;if(e.context&&e.selector)$(e.context).off(".iL",e.selector);else $.each(e.itemsObject,function(e,t){t.off(".iL")})},refresh:function(){var e=this;e.dispatchItemsEvents();e.attachItems();e.normalizeItems();e.patchItemsEvents()},patchEvents:function(){function c(e){if(!t.isMobile){if(!t.mouseID){t.hideableElements.show()}t.mouseID=clearTimeout(t.mouseID);if(a.indexOf(e.target)===-1)t.mouseID=setTimeout(function(){t.hideableElements.hide();t.mouseID=clearTimeout(t.mouseID)},3e3)}}var e=this,t=e.vars,n=e.options,r=n.path.toLowerCase(),i=$(".ilightbox-holder"),s=fullScreenApi.fullScreenEventName+".iLightBox",o=1e3,u=verticalDistanceThreshold=100,a=[t.nextButton[0],t.prevButton[0],t.nextButton[0].firstChild,t.prevButton[0].firstChild];$win.bind("resize.iLightBox",function(){var r=getViewport();if(n.mobileOptimizer&&!n.innerToolbar)t.isMobile=r.width<=t.mobileMaxWidth;t.BODY[t.isMobile?"addClass":"removeClass"]("isMobile");e.repositionPhoto(null);if(supportTouch){clearTimeout(t.setTime);t.setTime=setTimeout(function(){var e=getScrollXY().y;window.scrollTo(0,e-30);window.scrollTo(0,e+30);window.scrollTo(0,e)},2e3)}if(t.thumbs)e.positionThumbnails()}).bind("keydown.iLightBox",function(r){if(n.controls.keyboard){switch(r.keyCode){case 13:if(r.shiftKey&&n.keyboard.shift_enter)e.fullScreenAction();break;case 27:if(n.keyboard.esc)e.closeAction();break;case 37:if(n.keyboard.left&&!t.lockKey)e.moveTo("prev");break;case 38:if(n.keyboard.up&&!t.lockKey)e.moveTo("prev");break;case 39:if(n.keyboard.right&&!t.lockKey)e.moveTo("next");break;case 40:if(n.keyboard.down&&!t.lockKey)e.moveTo("next");break}}});if(fullScreenApi.supportsFullScreen)$win.bind(s,function(){e.doFullscreen()});var f=[n.caption.show+".iLightBox",n.caption.hide+".iLightBox",n.social.show+".iLightBox",n.social.hide+".iLightBox"].filter(function(e,t,n){return n.lastIndexOf(e)===t}),l="";$.each(f,function(e,t){if(e!=0)l+=" ";l+=t});$doc.on(clickEvent,".ilightbox-overlay",function(){if(n.overlay.blur)e.closeAction()}).on(clickEvent,".ilightbox-next, .ilightbox-next-button",function(){e.moveTo("next")}).on(clickEvent,".ilightbox-prev, .ilightbox-prev-button",function(){e.moveTo("prev")}).on(clickEvent,".ilightbox-thumbnail",function(){var n=$(this),r=$(".ilightbox-thumbnail",t.thumbnails),i=r.index(n);if(i!=t.current)e.goTo(i)}).on(l,".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(e){var r=$("div.ilightbox-caption",t.holder),i=$("div.ilightbox-social",t.holder),s=n.effects.fadeSpeed;if(t.nextLock||t.prevLock){if(e.type==n.caption.show&&!r.is(":visible"))r.fadeIn(s);else if(e.type==n.caption.hide&&r.is(":visible"))r.fadeOut(s);if(e.type==n.social.show&&!i.is(":visible"))i.fadeIn(s);else if(e.type==n.social.hide&&i.is(":visible"))i.fadeOut(s)}else{if(e.type==n.caption.show&&!r.is(":visible"))r.stop().fadeIn(s);else if(e.type==n.caption.hide&&r.is(":visible"))r.stop().fadeOut(s);if(e.type==n.social.show&&!i.is(":visible"))i.stop().fadeIn(s);else if(e.type==n.social.hide&&i.is(":visible"))i.stop().fadeOut(s)}}).on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-wrapper",function(e){if(e.type=="mouseenter")t.lockWheel=true;else t.lockWheel=false}).on(clickEvent,".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause",function(){var t=$(this);if(t.hasClass("ilightbox-fullscreen"))e.fullScreenAction();else if(t.hasClass("ilightbox-play")){e.resume();t.addClass("ilightbox-pause").removeClass("ilightbox-play")}else if(t.hasClass("ilightbox-pause")){e.pause();t.addClass("ilightbox-play").removeClass("ilightbox-pause")}else e.closeAction()}).on(touchMoveEvent,".ilightbox-overlay, .ilightbox-thumbnails-container",function(e){e.preventDefault()});if(n.controls.arrows&&!supportTouch)$doc.on("mousemove.iLightBox",c);if(n.controls.slideshow&&n.slideshow.pauseOnHover)$doc.on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(n){if(n.type=="mouseenter"&&t.cycleID)e.pause();else if(n.type=="mouseleave"&&t.isPaused)e.resume()});var h=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails");if(n.controls.mousewheel)h.on("mousewheel.iLightBox",function(n,r){if(!t.lockWheel){n.preventDefault();if(r<0)e.moveTo("next");else if(r>0)e.moveTo("prev")}});if(n.controls.swipe)i.on(touchStartEvent,function(s){function v(e){var t=$(this),n=h[e],i=[p.coords[0]-d.coords[0],p.coords[1]-d.coords[1]];t[0].style[r=="horizontal"?"left":"top"]=(r=="horizontal"?n.left-i[0]:n.top-i[1])+"px"}function m(e){if(!p)return;var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;d={time:(new Date).getTime(),coords:[t.pageX-l,t.pageY-f]};i.each(v);e.preventDefault()}function g(){i.each(function(){var e=$(this),t=e.data("offset")||{top:e.offset().top-f,left:e.offset().left-l},n=t.top,r=t.left;e.css(transform,gpuAcceleration).stop().animate({top:n,left:r},500,"easeOutCirc",function(){e.css(transform,"")})})}if(t.nextLock||t.prevLock||t.total==1||t.lockSwipe)return;t.BODY.addClass("ilightbox-closedhand");var a=s.originalEvent.touches?s.originalEvent.touches[0]:s,f=$doc.scrollTop(),l=$doc.scrollLeft(),c=[i.eq(0).offset(),i.eq(1).offset(),i.eq(2).offset()],h=[{top:c[0].top-f,left:c[0].left-l},{top:c[1].top-f,left:c[1].left-l},{top:c[2].top-f,left:c[2].left-l}],p={time:(new Date).getTime(),coords:[a.pageX-l,a.pageY-f]},d;i.bind(touchMoveEvent,m);$doc.one(touchStopEvent,function(s){i.unbind(touchMoveEvent,m);t.BODY.removeClass("ilightbox-closedhand");if(p&&d){if(r=="horizontal"&&d.time-p.timeu&&abs(p.coords[1]-d.coords[1])d.coords[0]){if(t.current==t.total-1&&!n.infinite)g();else{t.isSwipe=true;e.moveTo("next")}}else{if(t.current==0&&!n.infinite)g();else{t.isSwipe=true;e.moveTo("prev")}}}else if(r=="vertical"&&d.time-p.timeu&&abs(p.coords[0]-d.coords[0])d.coords[1]){if(t.current==t.total-1&&!n.infinite)g();else{t.isSwipe=true;e.moveTo("next")}}else{if(t.current==0&&!n.infinite)g();else{t.isSwipe=true;e.moveTo("prev")}}}else g()}p=d=undefined})})},goTo:function(e){var t=this,n=t.vars,r=t.options,i=e-n.current;if(r.infinite){if(e==n.total-1&&n.current==0)i=-1;if(n.current==n.total-1&&e==0)i=1}if(i==1)t.moveTo("next");else if(i==-1)t.moveTo("prev");else{if(n.nextLock||n.prevLock)return false;if(typeof r.callback.onBeforeChange=="function")r.callback.onBeforeChange.call(t,t.ui);if(r.linkId){n.hashLock=true;window.location.hash=r.linkId+"/"+e}if(t.items[e]){if(!t.items[e].options.mousewheel)n.lockWheel=true;else t.vars.lockWheel=false;if(!t.items[e].options.swipe)n.lockSwipe=true;else n.lockSwipe=false}$.each([n.holder,n.nextPhoto,n.prevPhoto],function(e,t){t.css(transform,gpuAcceleration).fadeOut(r.effects.loadedFadeSpeed)});n.current=e;n.next=e+1;n.prev=e-1;t.createUI();setTimeout(function(){t.generateBoxes()},r.effects.loadedFadeSpeed+50);$(".ilightbox-thumbnail",n.thumbnails).removeClass("ilightbox-active").eq(e).addClass("ilightbox-active");t.positionThumbnails();if(r.linkId)setTimeout(function(){n.hashLock=false},55);if(!r.infinite){n.nextButton.add(n.prevButton).add(n.innerPrevButton).add(n.innerNextButton).removeClass("disabled");if(n.current==0){n.prevButton.add(n.innerPrevButton).addClass("disabled")}if(n.current>=n.total-1){n.nextButton.add(n.innerNextButton).addClass("disabled")}}t.resetCycle();if(typeof r.callback.onAfterChange=="function")r.callback.onAfterChange.call(t,t.ui)}},moveTo:function(e){var t=this,n=t.vars,r=t.options,i=r.path.toLowerCase(),s=getViewport(),o=r.effects.switchSpeed;if(n.nextLock||n.prevLock)return false;else{var u=e=="next"?n.next:n.prev;if(r.linkId){n.hashLock=true;window.location.hash=r.linkId+"/"+u}if(e=="next"){if(!t.items[u])return false;var a=n.nextPhoto,f=n.holder,l=n.prevPhoto,c="ilightbox-prev",h="ilightbox-next"}else if(e=="prev"){if(!t.items[u])return false;var a=n.prevPhoto,f=n.holder,l=n.nextPhoto,c="ilightbox-next",h="ilightbox-prev"}if(typeof r.callback.onBeforeChange=="function")r.callback.onBeforeChange.call(t,t.ui);e=="next"?n.nextLock=true:n.prevLock=true;var p=$("div.ilightbox-caption",f),d=$("div.ilightbox-social",f);if(p.length)p.stop().fadeOut(o,function(){$(this).remove()});if(d.length)d.stop().fadeOut(o,function(){$(this).remove()});if(t.items[u].caption){t.setCaption(t.items[u],a);var v=$("div.ilightbox-caption",a),m=parseInt(v.outerHeight()/a.outerHeight()*100);if(r.caption.start&&m<=50)v.fadeIn(o)}var g=t.items[u].options.social;if(g){t.setSocial(g,t.items[u].URL,a);if(r.social.start)$("div.ilightbox-social",a).fadeIn(r.effects.fadeSpeed)}$.each([a,f,l],function(e,t){t.removeClass("ilightbox-next ilightbox-prev")});var y=a.data("offset"),b=s.width-r.styles.pageOffsetX,w=s.height-r.styles.pageOffsetY,E=y.newDims.width,S=y.newDims.height,x=y.thumbsOffset,T=y.diff,N=parseInt(w/2-S/2-T.H-x.H/2),C=parseInt(b/2-E/2-T.W-x.W/2);a.css(transform,gpuAcceleration).animate({top:N,left:C,opacity:1},o,n.isSwipe?"easeOutCirc":"easeInOutCirc",function(){a.css(transform,"")});$("div.ilightbox-container",a).animate({width:E,height:S},o,n.isSwipe?"easeOutCirc":"easeInOutCirc");var k=f.data("offset"),L=k.object;T=k.diff;E=k.newDims.width,S=k.newDims.height;E=parseInt(E*r.styles[e=="next"?"prevScale":"nextScale"]),S=parseInt(S*r.styles[e=="next"?"prevScale":"nextScale"]),N=i=="horizontal"?parseInt(w/2-L.offsetY-S/2-T.H-x.H/2):parseInt(w-L.offsetX-T.H-x.H/2);if(e=="prev")C=i=="horizontal"?parseInt(b-L.offsetX-T.W-x.W/2):parseInt(b/2-E/2-T.W-L.offsetY-x.W/2);else{N=i=="horizontal"?N:parseInt(L.offsetX-T.H-S-x.H/2),C=i=="horizontal"?parseInt(L.offsetX-T.W-E-x.W/2):parseInt(b/2-L.offsetY-E/2-T.W-x.W/2)}$("div.ilightbox-container",f).animate({width:E,height:S},o,n.isSwipe?"easeOutCirc":"easeInOutCirc");f.addClass(c).css(transform,gpuAcceleration).animate({top:N,left:C,opacity:r.styles.prevOpacity},o,n.isSwipe?"easeOutCirc":"easeInOutCirc",function(){f.css(transform,"");$(".ilightbox-thumbnail",n.thumbnails).removeClass("ilightbox-active").eq(u).addClass("ilightbox-active");t.positionThumbnails();if(t.items[u]){if(!t.items[u].options.mousewheel)n.lockWheel=true;else n.lockWheel=false;if(!t.items[u].options.swipe)n.lockSwipe=true;else n.lockSwipe=false}n.isSwipe=false;if(e=="next"){n.nextPhoto=l,n.prevPhoto=f,n.holder=a;n.nextPhoto.hide();n.next=n.next+1,n.prev=n.current,n.current=n.current+1;if(r.infinite){if(n.current>n.total-1)n.current=0;if(n.current==n.total-1)n.next=0;if(n.current==0)n.prev=n.total-1}t.createUI();if(!t.items[n.next])n.nextLock=false;else t.loadContent(t.items[n.next],"next")}else{n.prevPhoto=l;n.nextPhoto=f;n.holder=a;n.prevPhoto.hide();n.next=n.current;n.current=n.prev;n.prev=n.current-1;if(r.infinite){if(n.current==n.total-1)n.next=0;if(n.current==0)n.prev=n.total-1}t.createUI();if(!t.items[n.prev])n.prevLock=false;else t.loadContent(t.items[n.prev],"prev")}if(r.linkId)setTimeout(function(){n.hashLock=false},55);if(!r.infinite){n.nextButton.add(n.prevButton).add(n.innerPrevButton).add(n.innerNextButton).removeClass("disabled");if(n.current==0)n.prevButton.add(n.innerPrevButton).addClass("disabled");if(n.current>=n.total-1)n.nextButton.add(n.innerNextButton).addClass("disabled")}t.repositionPhoto();t.resetCycle();if(typeof r.callback.onAfterChange=="function")r.callback.onAfterChange.call(t,t.ui)});N=i=="horizontal"?getPixel(l,"top"):e=="next"?parseInt(-(w/2)-l.outerHeight()):parseInt(N*2),C=i=="horizontal"?e=="next"?parseInt(-(b/2)-l.outerWidth()):parseInt(C*2):getPixel(l,"left");l.css(transform,gpuAcceleration).animate({top:N,left:C,opacity:r.styles.nextOpacity},o,n.isSwipe?"easeOutCirc":"easeInOutCirc",function(){l.css(transform,"")}).addClass(h)}},setCaption:function(e,t){var n=this,r=$('
');if(e.caption){r.html(e.caption);$("div.ilightbox-container",t).append(r)}},normalizeSocial:function(e,t){var n=this,r=n.vars,i=n.options,s=window.location.href;$.each(e,function(n,r){if(!r)return true;var o=n.toLowerCase(),u,a;switch(o){case"facebook":u="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",a="Share on Facebook";break;case"twitter":u="http://twitter.com/home?status={URL}",a="Share on Twitter";break;case"googleplus":u="https://plus.google.com/share?url={URL}",a="Share on Google+";break;case"delicious":u="http://delicious.com/post?url={URL}",a="Share on Delicious";break;case"digg":u="http://digg.com/submit?phase=2&url={URL}",a="Share on Digg";break;case"reddit":u="http://reddit.com/submit?url={URL}",a="Share on reddit";break}e[n]={URL:r.URL&&absolutizeURI(s,r.URL)||i.linkId&&window.location.href||typeof t!=="string"&&s||t&&absolutizeURI(s,t)||s,source:r.source||u||r.URL&&absolutizeURI(s,r.URL)||t&&absolutizeURI(s,t),text:r.text||a||"Share on "+n,width:typeof r.width!="undefined"&&!isNaN(r.width)?parseInt(r.width):640,height:r.height||360}});return e},setSocial:function(e,t,n){var r=this,i=$('
'),s="
    ";e=r.normalizeSocial(e,t);$.each(e,function(e,t){var n=e.toLowerCase(),r=t.source.replace(/\{URL\}/g,encodeURIComponent(t.URL).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+"));s+='
  • '});s+="
";i.html(s);$("div.ilightbox-container",n).append(i)},fullScreenAction:function(){var e=this,t=e.vars;if(fullScreenApi.supportsFullScreen){if(fullScreenApi.isFullScreen())fullScreenApi.cancelFullScreen(document.documentElement);else fullScreenApi.requestFullScreen(document.documentElement)}else{e.doFullscreen()}},doFullscreen:function(){var e=this,t=e.vars,n=getViewport(),r=e.options;if(r.fullAlone){var i=t.holder,s=e.items[t.current],o=n.width,u=n.height,a=[i,t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.overlay,t.toolbar,t.thumbnails,t.loader],f=[t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.loader,t.thumbnails];if(!t.isInFullScreen){t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=true;t.overlay.css({opacity:1});$.each(f,function(e,t){t.hide()});t.fullScreenButton.attr("title",r.text.exitFullscreen);if(r.fullStretchTypes.indexOf(s.type)!=-1)i.data({naturalWidthOld:i.data("naturalWidth"),naturalHeightOld:i.data("naturalHeight"),naturalWidth:o,naturalHeight:u});else{var n=s.options.fullViewPort||r.fullViewPort||"",l=o,c=u,h=i.data("naturalWidth"),p=i.data("naturalHeight");if(n.toLowerCase()=="fill"){c=l/h*p;if(cl||p>c?true:false,d=e.getNewDimenstions(l,c,h,p,v);l=d.width,c=d.height}i.data({naturalWidthOld:i.data("naturalWidth"),naturalHeightOld:i.data("naturalHeight"),naturalWidth:l,naturalHeight:c})}$.each(a,function(e,t){t.addClass("ilightbox-fullscreen")});if(typeof r.callback.onEnterFullScreen=="function")r.callback.onEnterFullScreen.call(e,e.ui)}else{t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=false;t.overlay.css({opacity:e.options.overlay.opacity});$.each(f,function(e,t){t.show()});t.fullScreenButton.attr("title",r.text.enterFullscreen);i.data({naturalWidth:i.data("naturalWidthOld"),naturalHeight:i.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null});$.each(a,function(e,t){t.removeClass("ilightbox-fullscreen")});if(typeof r.callback.onExitFullScreen=="function")r.callback.onExitFullScreen.call(e,e.ui)}}else{if(!t.isInFullScreen)t.isInFullScreen=true;else t.isInFullScreen=false}e.repositionPhoto(true)},closeAction:function(){var e=this,t=e.vars,n=e.options;$win.unbind(".iLightBox");$doc.off(".iLightBox");if(t.isInFullScreen)fullScreenApi.cancelFullScreen(document.documentElement);$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox");if(n.hide.effect)t.overlay.stop().fadeOut(n.hide.speed,function(){t.overlay.remove();t.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")});else{t.overlay.remove();t.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}var r=[t.toolbar,t.holder,t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.loader,t.thumbnails];$.each(r,function(e,t){t.removeAttr("style").remove()});t.dontGenerateThumbs=t.isInFullScreen=false;window.iLightBox=null;if(n.linkId){t.hashLock=true;removeHash();setTimeout(function(){t.hashLock=false},55)}if(typeof n.callback.onHide=="function")n.callback.onHide.call(e,e.ui)},repositionPhoto:function(){var e=this,t=e.vars,n=e.options,r=n.path.toLowerCase(),i=getViewport(),s=i.width,o=i.height;var u=t.isInFullScreen&&n.fullAlone||t.isMobile?0:r=="horizontal"?0:t.thumbnails.outerWidth(),a=t.isMobile?t.toolbar.outerHeight():t.isInFullScreen&&n.fullAlone?0:r=="horizontal"?t.thumbnails.outerHeight():0,f=t.isInFullScreen&&n.fullAlone?s:s-n.styles.pageOffsetX,l=t.isInFullScreen&&n.fullAlone?o:o-n.styles.pageOffsetY,c=r=="horizontal"?parseInt(e.items[t.next]||e.items[t.prev]?(n.styles.nextOffsetX+n.styles.prevOffsetX)*2:f/10<=30?30:f/10):parseInt(f/10<=30?30:f/10)+u,h=r=="horizontal"?parseInt(l/10<=30?30:l/10)+a:parseInt(e.items[t.next]||e.items[t.prev]?(n.styles.nextOffsetX+n.styles.prevOffsetX)*2:l/10<=30?30:l/10);var p={type:"current",width:f,height:l,item:e.items[t.current],offsetW:c,offsetH:h,thumbsOffsetW:u,thumbsOffsetH:a,animate:arguments.length,holder:t.holder};e.repositionEl(p);if(e.items[t.next]){p=$.extend(p,{type:"next",item:e.items[t.next],offsetX:n.styles.nextOffsetX,offsetY:n.styles.nextOffsetY,holder:t.nextPhoto});e.repositionEl(p)}if(e.items[t.prev]){p=$.extend(p,{type:"prev",item:e.items[t.prev],offsetX:n.styles.prevOffsetX,offsetY:n.styles.prevOffsetY,holder:t.prevPhoto});e.repositionEl(p)}var d=r=="horizontal"?{left:parseInt(f/2-t.loader.outerWidth()/2)}:{top:parseInt(l/2-t.loader.outerHeight()/2)};t.loader.css(d)},repositionEl:function(e){var t=this,n=t.vars,r=t.options,i=r.path.toLowerCase(),s=e.type=="current"?n.isInFullScreen&&r.fullAlone?e.width:e.width-e.offsetW:e.width-e.offsetW,o=e.type=="current"?n.isInFullScreen&&r.fullAlone?e.height:e.height-e.offsetH:e.height-e.offsetH,u=e.item,a=e.item.options,f=e.holder,l=e.offsetX||0,c=e.offsetY||0,h=e.thumbsOffsetW,p=e.thumbsOffsetH;if(e.type=="current"){if(typeof a.width=="number"&&a.width)s=n.isInFullScreen&&r.fullAlone&&(r.fullStretchTypes.indexOf(u.type)!=-1||a.fullViewPort||r.fullViewPort)?s:a.width>s?s:a.width;if(typeof a.height=="number"&&a.height)o=n.isInFullScreen&&r.fullAlone&&(r.fullStretchTypes.indexOf(u.type)!=-1||a.fullViewPort||r.fullViewPort)?o:a.height>o?o:a.height}else{if(typeof a.width=="number"&&a.width)s=a.width>s?s:a.width;if(typeof a.height=="number"&&a.height)o=a.height>o?o:a.height}o=parseInt(o-$(".ilightbox-inner-toolbar",f).outerHeight());var d=typeof a.width=="string"&&a.width.indexOf("%")!=-1?percentToValue(parseInt(a.width.replace("%","")),e.width):f.data("naturalWidth"),v=typeof a.height=="string"&&a.height.indexOf("%")!=-1?percentToValue(parseInt(a.height.replace("%","")),e.height):f.data("naturalHeight");var m=typeof a.width=="string"&&a.width.indexOf("%")!=-1||typeof a.height=="string"&&a.height.indexOf("%")!=-1?{width:d,height:v}:t.getNewDimenstions(s,o,d,v),g=$.extend({},m,{});if(e.type=="prev"||e.type=="next")d=parseInt(m.width*(e.type=="next"?r.styles.nextScale:r.styles.prevScale)),v=parseInt(m.height*(e.type=="next"?r.styles.nextScale:r.styles.prevScale));else d=m.width,v=m.height;var y=parseInt((getPixel(f,"padding-left")+getPixel(f,"padding-right")+getPixel(f,"border-left-width")+getPixel(f,"border-right-width"))/2),b=parseInt((getPixel(f,"padding-top")+getPixel(f,"padding-bottom")+getPixel(f,"border-top-width")+getPixel(f,"border-bottom-width")+$(".ilightbox-inner-toolbar",f).outerHeight())/2);switch(e.type){case"current":var w=parseInt(e.height/2-v/2-b-p/2),E=parseInt(e.width/2-d/2-y-h/2);break;case"next":var w=i=="horizontal"?parseInt(e.height/2-c-v/2-b-p/2):parseInt(e.height-l-b-p/2),E=i=="horizontal"?parseInt(e.width-l-y-h/2):parseInt(e.width/2-d/2-y-c-h/2);break;case"prev":var w=i=="horizontal"?parseInt(e.height/2-c-v/2-b-p/2):parseInt(l-b-v-p/2),E=i=="horizontal"?parseInt(l-y-d-h/2):parseInt(e.width/2-c-d/2-y-h/2);break}f.data("offset",{top:w,left:E,newDims:g,diff:{W:y,H:b},thumbsOffset:{W:h,H:p},object:e});if(e.animate>0&&r.effects.reposition){f.css(transform,gpuAcceleration).stop().animate({top:w,left:E},r.effects.repositionSpeed,"easeOutCirc",function(){f.css(transform,"")});$("div.ilightbox-container",f).stop().animate({width:d,height:v},r.effects.repositionSpeed,"easeOutCirc");$("div.ilightbox-inner-toolbar",f).stop().animate({width:d},r.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})}else{f.css({top:w,left:E});$("div.ilightbox-container",f).css({width:d,height:v});$("div.ilightbox-inner-toolbar",f).css({width:d})}},resume:function(e){var t=this,n=t.vars,r=t.options;if(!r.slideshow.pauseTime||r.controls.slideshow&&n.total<=1||es.options.maxScale)factor=s.options.maxScale;else if(factor=0||parseInt(PluginDetect.getVersion("Flash"))>=0?true:false,quicktime:parseInt(PluginDetect.getVersion("QuickTime"))>=0?true:false,html5H264:!!(t.canPlayType&&t.canPlayType("video/mp4").replace(/no/,"")),html5WebM:!!(t.canPlayType&&t.canPlayType("video/webm").replace(/no/,"")),html5Vorbis:!!(t.canPlayType&&t.canPlayType("video/ogg").replace(/no/,"")),html5QuickTime:!!(t.canPlayType&&t.canPlayType("video/quicktime").replace(/no/,""))}},addContent:function(e,t){var n=this,r;switch(t.type){case"video":var i=false,s=t.videoType,o=t.options.html5video;if((s=="video/mp4"||t.ext=="mp4"||t.ext=="m4v"||o.h264)&&n.plugins.html5H264)t.ext="mp4",t.URL=o.h264||t.URL;else if(o.webm&&n.plugins.html5WebM)t.ext="webm",t.URL=o.webm||t.URL;else if(o.ogg&&n.plugins.html5Vorbis)t.ext="ogv",t.URL=o.ogg||t.URL;if(n.plugins.html5H264&&(s=="video/mp4"||t.ext=="mp4"||t.ext=="m4v"))i=true,s="video/mp4";else if(n.plugins.html5WebM&&(s=="video/webm"||t.ext=="webm"))i=true,s="video/webm";else if(n.plugins.html5Vorbis&&(s=="video/ogg"||t.ext=="ogv"))i=true,s="video/ogg";else if(n.plugins.html5QuickTime&&(s=="video/quicktime"||t.ext=="mov"||t.ext=="qt"))i=true,s="video/quicktime";if(i){r=$("