/* jquery-lightbox: (http://www.nawozydlaogrodu.pl/wp-content/themes/Avada/includes/lib/assets/min/js/library/jquery.ilightbox.js) */ !function($,window,undefined){var extensions={flash:["swf"],image:["bmp","gif","jpeg","jpg","png","tiff","tif","jfif","jpe","webp"],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(e,t,o,i){var n=this;if(n.options=t,n.selector=e.selector||e,n.context=e.context,n.instant=i,o.length<1?n.attachItems():n.items=o,n.vars={total:n.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},n.vars.hideableElements=n.vars.nextButton.add(n.vars.prevButton),n.normalizeItems(),n.availPlugins(),n.options.startFrom=n.options.startFrom>0&&n.options.startFrom>=n.vars.total?n.vars.total-1:n.options.startFrom,n.options.startFrom=n.options.randomStart?floor(random()*n.vars.total):n.options.startFrom,n.vars.start=n.options.startFrom,i?n.instantCall():n.patchItemsEvents(),n.options.linkId&&(n.hashChangeHandler(),$win.iLightBoxHashChange(function(){n.hashChangeHandler()})),supportTouch){var a=/(click|mouseenter|mouseleave|mouseover|mouseout)/gi;n.options.caption.show=n.options.caption.show.replace(a,"itap"),n.options.caption.hide=n.options.caption.hide.replace(a,"itap"),n.options.social.show=n.options.social.show.replace(a,"itap"),n.options.social.hide=n.options.social.hide.replace(a,"itap")}n.options.controls.arrows&&$.extend(n.options.styles,{nextOffsetX:0,prevOffsetX:0,nextOpacity:0,prevOpacity:0})};function getPixel(e,t){return parseInt(e.css(t),10)||0}function within(e,t,o){return eo?o:e}function getViewport(){var e=window,t="inner";return"innerWidth"in window||(t="client",e=document.documentElement||document.body),{width:e[t+"Width"],height:e[t+"Height"]}}function removeHash(){history&&history.pushState&&history.pushState("",document.title,window.location.pathname+window.location.search)}function doAjax(e,t){e="//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),o=new Array;return t.each(function(){var e="";if("none"!=$(this).css("background-image")?e=$(this).css("background-image"):void 0!==$(this).attr("src")&&"img"==this.nodeName.toLowerCase()&&(e=$(this).attr("src")),-1==e.indexOf("gradient"))for(var t=(e=(e=(e=(e=e.replace(/url\(\"/g,"")).replace(/url\(/g,"")).replace(/\"\)/g,"")).replace(/\)/g,"")).split(","),i=0;i0&&-1==$.inArray(t[i],o)){var n="";browser.msie&&browser.version<9&&(n="?"+floor(3e3*random())),o.push(t[i]+n)}}),o}function getExtension(e){var t=e.split(".").pop().toLowerCase(),o=-1!==t.indexOf("?")?"?"+t.split("?").pop():"";return t.replace(o,"")}function getTypeByExtension(e){var t=getExtension(e);return-1!==extensions.image.indexOf(t)?"image":-1!==extensions.flash.indexOf(t)?"flash":-1!==extensions.video.indexOf(t)?"video":"iframe"}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){var o,i;return t=parseURI(t||""),e=parseURI(e||""),t&&e?(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+(o=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,i=[],o.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?i.pop():i.push(e)}),i.join("").replace(/^\//,"/"===o.charAt(0)?"/":""))+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash:null}function version_compare(e,t,o){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var i,n=0,a=0,r={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return(e=(e=(""+e).replace(/[_\-+]/g,".")).replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".")).length?e.split("."):[-8]},l=function(e){return e?isNaN(e)?r[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),i=max(e.length,t.length),n=0;nt[n]){a=1;break}}if(!o)return a;switch(o){case">":case"gt":return a>0;case">=":case"ge":return a>=0;case"<=":case"le":return a<=0;case"==":case"=":case"eq":return 0===a;case"<>":case"!=":case"ne":return 0!==a;case"":case"<":case"lt":return a<0;default:return null}}function getScrollXY(){var e=0,t=0;return"number"==typeof window.pageYOffset?(t=window.pageYOffset,e=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(t=document.body.scrollTop,e=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(t=document.documentElement.scrollTop,e=document.documentElement.scrollLeft),{x:e,y:t}}iLightBox.prototype={showLoader:function(){var e=this;e.vars.loadRequests+=1,"horizontal"==e.options.path.toLowerCase()?e.vars.loader.addClass("ilightbox-show").stop().animate({top:"-30px"},e.options.show.speed,"easeOutCirc"):e.vars.loader.addClass("ilightbox-show").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,"horizontal"==e.options.path.toLowerCase()?e.vars.loadRequests<=0&&e.vars.loader.removeClass("ilightbox-show").stop().animate({top:"-192px"},e.options.show.speed,"easeInCirc"):e.vars.loadRequests<=0&&e.vars.loader.removeClass("ilightbox-show").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(!0):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}),iL.instant||itemsObject.push(t)}),iL.items=items,iL.itemsObject=itemsObject,iL.vars&&(iL.vars.total=items.length)},normalizeItems:function(){var e=this,t=new Array;$.each(e.items,function(o,i){"string"==typeof i&&(i={url:i});var n=i.url||i.URL||null,a=i.options||{},r=i.caption||null,s=i.title||null,l=i.type?i.type.toLowerCase():getTypeByExtension(n),c="object"!=typeof n?getExtension(n):"";if(a.thumbnail=a.thumbnail||("image"==l?n:null),a.videoType=a.videoType||null,a.skin=a.skin||e.options.skin,a.width=a.width||null,a.height=a.height||null,a.mousewheel=void 0===a.mousewheel||a.mousewheel,a.swipe=void 0===a.swipe||a.swipe,a.social=void 0!==a.social?a.social:e.options.social.buttons&&$.extend({},{},e.options.social.buttons),"video"==l&&(a.html5video=void 0!==a.html5video?a.html5video:{},a.html5video.webm=a.html5video.webm||a.html5video.WEBM||null,a.html5video.controls=void 0!==a.html5video.controls?a.html5video.controls:"controls",a.html5video.preload=a.html5video.preload||"metadata",a.html5video.autoplay=void 0!==a.html5video.autoplay&&a.html5video.autoplay),"iframe"===l)if(-1!==n.indexOf("youtube.com")){var u=n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);u&&11===u[7].length&&(a.thumbnail="//img.youtube.com/vi/"+u[7]+"/mqdefault.jpg")}else if(-1!==n.indexOf("vimeo.com")&&-1===n.indexOf("preview=0")){var h=n.split(/[?#]/)[0];h.replace(/[^\d]/g,"");$.getJSON("https://vimeo.com/api/oembed.json?url="+h,{format:"json"},function(e){a.thumbnail=e.thumbnail_url})}a.width&&a.height||"video"!==l&&"iframe"!==l&&"flash"!==l||(a.width=parseInt(fusionLightboxVideoVars.lightbox_video_width),a.height=parseInt(fusionLightboxVideoVars.lightbox_video_height)),delete i.url,i.index=o,i.URL=n,i.caption=r,i.title=s,i.type=l,i.options=a,i.ext=c,t.push(i)}),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,o=e.options,i=getViewport(),n=o.path.toLowerCase(),a=t.total>0&&e.items.filter(function(e,t,i){return-1===["image","flash","video"].indexOf(e.type)&&void 0===e.recognized&&(o.smartRecognition||e.options.smartRecognition)}),r=a.length>0;o.mobileOptimizer&&!o.innerToolbar&&(t.isMobile=i.width<=t.mobileMaxWidth),t.overlay.addClass(o.skin).hide().css("opacity",o.overlay.opacity),o.linkId&&t.overlay[0].setAttribute("linkid",o.linkId),o.controls.toolbar&&(t.toolbar.addClass(o.skin).append(t.closeButton),o.controls.fullscreen&&t.toolbar.append(t.fullScreenButton),o.controls.slideshow&&t.toolbar.append(t.innerPlayButton),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),o.innerToolbar||t.BODY.append(t.toolbar),o.controls.arrows&&t.BODY.append(t.nextButton).append(t.prevButton),o.controls.thumbnail&&t.total>1&&(t.BODY.append(t.thumbnails),t.thumbnails.addClass(o.skin).addClass("ilightbox-"+n),$("div.ilightbox-thumbnails-grid",t.thumbnails).empty(),t.thumbs=!0);var s="horizontal"==o.path.toLowerCase()?{left:parseInt(i.width/2-t.loader.outerWidth()/2)}:{top:parseInt(i.height/2-t.loader.outerHeight()/2)};t.loader.addClass(o.skin).css(s),t.nextButton.add(t.prevButton).addClass(o.skin),"horizontal"==n&&t.loader.add(t.nextButton).add(t.prevButton).addClass("horizontal"),t.BODY[t.isMobile?"addClass":"removeClass"]("isMobile"),o.infinite||(t.prevButton.add(t.prevButton).add(t.innerPrevButton).add(t.innerNextButton).removeClass("disabled"),0==t.current&&t.prevButton.add(t.innerPrevButton).addClass("disabled"),t.current>=t.total-1&&t.nextButton.add(t.innerNextButton).addClass("disabled")),o.show.effect?(t.overlay.stop().fadeIn(o.show.speed),t.toolbar.stop().fadeIn(o.show.speed)):(t.overlay.show(),t.toolbar.show());var l=a.length;r?(e.showLoader(),$.each(a,function(i,n){e.ogpRecognition(this,function(i){var n=-1,a=(e.items.filter(function(e,t,o){return e.URL==i.url&&(n=t),e.URL==i.url}),e.items[n]);i&&$.extend(!0,a,{URL:i.source,type:i.type,recognized:!0,options:{html5video:i.html5video,width:"image"==i.type?0:i.width||a.width,height:"image"==i.type?0:i.height||a.height,thumbnail:a.options.thumbnail||i.thumbnail}}),0==--l&&(e.hideLoader(),t.dontGenerateThumbs=!1,e.generateThumbnails(),o.show.effect?setTimeout(function(){e.generateBoxes()},o.show.speed):e.generateBoxes())})})):o.show.effect?setTimeout(function(){e.generateBoxes()},o.show.speed):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(!0):e.repositionPhoto()},setOption:function(t){e.setOption(t)},destroy:function(){e.closeAction(),e.dispatchItemsEvents()}},o.linkId&&(t.hashLock=!0,window.location.hash=o.linkId+"/"+t.current,setTimeout(function(){t.hashLock=!1},55)),o.slideshow.startPaused||(e.resume(),t.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")),"function"==typeof e.options.callback.onOpen&&e.options.callback.onOpen.call(e)},loadContent:function(e,t,o){var i,n,a=this;switch(a.createUI(),e.speed=o||a.options.effects.loadedFadeSpeed,"current"==t&&(e.options.mousewheel?a.vars.lockWheel=!1:a.vars.lockWheel=!0,e.options.swipe?a.vars.lockSwipe=!1:a.vars.lockSwipe=!0),t){case"current":i=a.vars.holder,n=a.vars.current;break;case"next":i=a.vars.nextPhoto,n=a.vars.next;break;case"prev":i=a.vars.prevPhoto,n=a.vars.prev}if(i.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")).addClass(e.options.skin),$("div.ilightbox-inner-toolbar",i).remove(),e.title||a.options.innerToolbar){var r=a.vars.innerToolbar.clone();if(e.title&&a.options.show.title){var s=a.vars.title.clone();s.empty().html(e.title),r.append(s)}a.options.innerToolbar&&r.append(a.vars.total>1?a.vars.toolbar.clone():a.vars.toolbar),i.prepend(r)}a.loadSwitcher(e,i,n,t)},loadSwitcher:function(e,t,o,i){var n=this,a=n.options,r={element:t,position:o};switch(e.type){case"image":"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),n.loadImage(e.URL,function(s){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r);var l=s?s.width:400,c=s?s.height:200;t.data({naturalWidth:l,naturalHeight:c}),$("div.ilightbox-container",t).empty().append(s?'':''+a.errors.loadImage+""),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),n.configureHolder(e,i,t)});break;case"video":t.data({naturalWidth:e.options.width,naturalHeight:e.options.height}),n.addContent(t,e),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r),n.configureHolder(e,i,t);break;case"iframe":for(var s=e.URL.substring(e.URL.indexOf("?")+1).split("&"),l={},c=0;c').css(m).html(u)),t.show().data({naturalWidth:d||h.outerWidth(),naturalHeight:p||h.outerHeight()}).hide(),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r);var g=findImageInElement(t);n.loadImage(g,function(){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),n.configureHolder(e,i,t)}),a.ajaxSetup.success(s,l,c),"function"==typeof f.success&&f.success(s,l,c)}).fail(function(s,l,c){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),n.hideLoader(),$("div.ilightbox-container",t).empty().append(''+a.errors.loadContents+""),n.configureHolder(e,i,t),a.ajaxSetup.error(s,l,c),"function"==typeof f.error&&f.error(s,l,c)});break;case"html":var m=e.URL;if(container=$("div.ilightbox-container",t),m[0].nodeName)h=m.clone();else{var g=$(m);h=g.selector?$("
"+g+"
"):g}var v=n.items[o].options.width||parseInt(h.attr("width")),b=n.items[o].options.height||parseInt(h.attr("height"));n.addContent(t,e),h.appendTo(document.documentElement).hide(),"function"==typeof a.callback.onRender&&a.callback.onRender.call(n,n.ui,o),"function"==typeof e.options.onRender&&e.options.onRender.call(n,r);p=findImageInElement(t);"function"==typeof a.callback.onBeforeLoad&&a.callback.onBeforeLoad.call(n,n.ui,o),"function"==typeof e.options.onBeforeLoad&&e.options.onBeforeLoad.call(n,r),n.loadImage(p,function(){"function"==typeof a.callback.onAfterLoad&&a.callback.onAfterLoad.call(n,n.ui,o),"function"==typeof e.options.onAfterLoad&&e.options.onAfterLoad.call(n,r),t.show().data({naturalWidth:v||container.outerWidth(),naturalHeight:b||container.outerHeight()}).hide(),h.remove(),n.configureHolder(e,i,t)})}},configureHolder:function(e,t,o){var i=this,n=i.vars,a=i.options;if("current"!=t&&("next"==t?o.addClass("ilightbox-next"):o.addClass("ilightbox-prev")),"current"==t)var r=n.current;else if("next"==t){var s=a.styles.nextOpacity;r=n.next}else s=a.styles.prevOpacity,r=n.prev;var l={element:o,position:r};i.items[r].options.width=i.items[r].options.width||0,i.items[r].options.height=i.items[r].options.height||0,"current"==t?a.show.effect?o.css(transform,gpuAcceleration).fadeIn(e.speed,function(){if(o.css(transform,""),e.caption){i.setCaption(e,o);var t=$("div.ilightbox-caption",o),n=parseInt(t.outerHeight()/o.outerHeight()*100);a.caption.start&n<=50&&t.fadeIn(a.effects.fadeSpeed)}var s=e.options.social;s&&(i.setSocial(s,e.URL,o),a.social.start&&$("div.ilightbox-social",o).fadeIn(a.effects.fadeSpeed)),i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)}):(o.show(),i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)):a.show.effect?o.fadeTo(e.speed,s,function(){"next"==t?n.nextLock=!1:n.prevLock=!1,i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)}):(o.css({opacity:s}).show(),"next"==t?n.nextLock=!1:n.prevLock=!1,i.generateThumbnails(),"function"==typeof a.callback.onShow&&a.callback.onShow.call(i,i.ui,r),"function"==typeof e.options.onShow&&e.options.onShow.call(i,l)),setTimeout(function(){i.repositionPhoto()},0)},generateBoxes:function(){var e=this,t=e.vars,o=e.options;o.infinite&&t.total>=3?(t.current==t.total-1&&(t.next=0),0==t.current&&(t.prev=t.total-1)):o.infinite=!1,e.loadContent(e.items[t.current],"current",o.show.speed),e.items[t.next]&&e.loadContent(e.items[t.next],"next",o.show.speed),e.items[t.prev]&&e.loadContent(e.items[t.prev],"prev",o.show.speed)},generateThumbnails:function(){var e=this,t=e.vars,o=e.options,i=null;if(t.thumbs&&!e.vars.dontGenerateThumbs){var n=t.thumbnails,a=$("div.ilightbox-thumbnails-container",n),r=$("div.ilightbox-thumbnails-grid",a),s=0;r.removeAttr("style").empty(),$.each(e.items,function(l,c){var u=t.current==l?"ilightbox-active":"",h=t.current==l?o.thumbnails.activeOpacity:o.thumbnails.normalOpacity,d=c.options.thumbnail,p=$('
'),f=$('
');p.css({opacity:0}).addClass(u),"video"!=c.type&&"flash"!=c.type||void 0!==c.options.icon?c.options.icon&&(f.addClass("ilightbox-thumbnail-"+c.options.icon),p.append(f)):(f.addClass("ilightbox-thumbnail-video"),p.append(f)),d&&e.loadImage(d,function(t){s++,t?p.data({naturalWidth:t.width,naturalHeight:t.height}).append(''):p.data({naturalWidth:o.thumbnails.maxWidth,naturalHeight:o.thumbnails.maxHeight}),clearTimeout(i),i=setTimeout(function(){e.positionThumbnails(n,a,r)},20),setTimeout(function(){p.fadeTo(o.effects.loadedFadeSpeed,h)},20*s)}),r.append(p)}),e.vars.dontGenerateThumbs=!0}},positionThumbnails:function(e,t,o){var i=this,n=i.vars,a=i.options,r=getViewport(),s=a.path.toLowerCase();e||(e=n.thumbnails),t||(t=$("div.ilightbox-thumbnails-container",e)),o||(o=$("div.ilightbox-thumbnails-grid",t));var l=$(".ilightbox-thumbnail",o),c="horizontal"==s?r.width-a.styles.pageOffsetX:l.eq(0).outerWidth()-a.styles.pageOffsetX,u="horizontal"==s?l.eq(0).outerHeight()-a.styles.pageOffsetY:r.height-a.styles.pageOffsetY,h="horizontal"==s?0:c,d="horizontal"==s?u:0,p=$(".ilightbox-active",o),f={};arguments.length<3&&(l.css({opacity:a.thumbnails.normalOpacity}),p.css({opacity:a.thumbnails.activeOpacity})),l.each(function(e){var t=$(this),o=t.data(),n="horizontal"==s?0:a.thumbnails.maxWidth;height="horizontal"==s?a.thumbnails.maxHeight:0,dims=i.getNewDimenstions(n,height,o.naturalWidth,o.naturalHeight,!0),t.css({width:dims.width,height:dims.height}),"horizontal"==s&&t.css({float:"left"}),"horizontal"==s?h+=t.outerWidth(!0):d+=t.outerHeight()}),f={width:h,height:d},o.css(f),f={};var m=o.offset(),g=p.length?p.offset():{top:parseInt(u/2),left:parseInt(c/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(),"horizontal"==s?(f.top=0,f.left=parseInt(c/2-g.left-p.outerWidth()/2)):(f.top=parseInt(u/2-g.top-p.outerHeight()/2),f.left=0),arguments.length<3?o.stop().animate(f,a.effects.repositionSpeed,"easeOutCirc"):o.css(f)},loadImage:function(e,t){Array.isArray(e)||(e=[e]);var o=this,i=e.length;i>0?(o.showLoader(),$.each(e,function(n,a){var r=new Image;r.onload=function(){0==(i-=1)&&(o.hideLoader(),t(r))},r.onerror=r.onabort=function(){0==(i-=1)&&(o.hideLoader(),t(!1))},r.src=e[n]})):t(!1)},patchItemsEvents:function(){var e=this,t=e.vars,o=supportTouch?"click.iL itap.iL":"click.iL",i=supportTouch?"click.iL itap.iL":"itap.iL";if(e.context&&e.selector){var n=$(e.selector,e.context);$(e.context).on(o,e.selector,function(){var o=$(this),i=n.index(o);return 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(),!1}).on(i,e.selector,function(){return!1})}else $.each(e.itemsObject,function(n,a){a.on(o,function(){return t.current=n,t.next=e.items[n+1]?n+1:null,t.prev=e.items[n-1]?n-1:null,e.addContents(),e.patchEvents(),!1}).on(i,function(){return!1})})},dispatchItemsEvents:function(){var e=this;e.vars,e.options;e.context&&e.selector?$(e.context).off(".iL",e.selector):$.each(e.itemsObject,function(e,t){t.off(".iL")})},refresh:function(){this.dispatchItemsEvents(),this.attachItems(),this.normalizeItems(),this.patchItemsEvents()},patchEvents:function(){var e=this,t=e.vars,o=e.options,i=o.path.toLowerCase(),n=$(".ilightbox-holder"),a=fullScreenApi.fullScreenEventName+".iLightBox",r=verticalDistanceThreshold=100,s=[t.nextButton[0],t.prevButton[0],t.nextButton[0].firstChild,t.prevButton[0].firstChild];$win.on("resize.iLightBox",function(){var i=getViewport();o.mobileOptimizer&&!o.innerToolbar&&(t.isMobile=i.width<=t.mobileMaxWidth),t.BODY[t.isMobile?"addClass":"removeClass"]("isMobile"),t.nextLock||t.prevLock||e.repositionPhoto(null),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)),t.thumbs&&e.positionThumbnails()}).on("keydown.iLightBox",function(i){if(o.controls.keyboard)switch(i.keyCode){case 13:i.shiftKey&&o.keyboard.shift_enter&&e.fullScreenAction();break;case 27:o.keyboard.esc&&e.closeAction();break;case 37:o.keyboard.left&&!t.lockKey&&e.moveTo("prev");break;case 38:o.keyboard.up&&!t.lockKey&&e.moveTo("prev");break;case 39:o.keyboard.right&&!t.lockKey&&e.moveTo("next");break;case 40:o.keyboard.down&&!t.lockKey&&e.moveTo("next")}}),fullScreenApi.supportsFullScreen&&$win.on(a,function(){e.doFullscreen()});var l=[o.caption.show+".iLightBox",o.caption.hide+".iLightBox",o.social.show+".iLightBox",o.social.hide+".iLightBox"].filter(function(e,t,o){return o.lastIndexOf(e)===t}),c="";$.each(l,function(e,t){0!=e&&(c+=" "),c+=t}),$doc.on(clickEvent,".ilightbox-overlay",function(){o.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 o=$(this),i=$(".ilightbox-thumbnail",t.thumbnails).index(o);i!=t.current&&e.goTo(i)}).on(c,".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(e){var i=$("div.ilightbox-caption",t.holder),n=$("div.ilightbox-social",t.holder),a=o.effects.fadeSpeed;t.nextLock||t.prevLock?(e.type!=o.caption.show||i.is(":visible")?e.type==o.caption.hide&&i.is(":visible")&&i.fadeOut(a):i.fadeIn(a),e.type!=o.social.show||n.is(":visible")?e.type==o.social.hide&&n.is(":visible")&&n.fadeOut(a):n.fadeIn(a)):(e.type!=o.caption.show||i.is(":visible")?e.type==o.caption.hide&&i.is(":visible")&&i.stop().fadeOut(a):i.stop().fadeIn(a),e.type!=o.social.show||n.is(":visible")?e.type==o.social.hide&&n.is(":visible")&&n.stop().fadeOut(a):n.stop().fadeIn(a))}).on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-wrapper",function(e){"mouseenter"==e.type?t.lockWheel=!0:t.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 t=$(this);t.hasClass("fusion-updated")||(t.hasClass("ilightbox-fullscreen")?e.fullScreenAction():t.hasClass("ilightbox-play")?(e.resume(),t.addClass("ilightbox-pause").removeClass("ilightbox-play")):t.hasClass("ilightbox-pause")?(e.pause(),t.addClass("ilightbox-play").removeClass("ilightbox-pause")):e.closeAction(),t.addClass("fusion-updated"),setTimeout(function(){t.removeClass("fusion-updated")},100))}).on(touchMoveEvent,".ilightbox-overlay, .ilightbox-thumbnails-container",function(e){e.preventDefault()}),o.controls.arrows&&!supportTouch&&$doc.on("mousemove.iLightBox",function(e){t.isMobile||(t.mouseID||t.hideableElements.show(),t.mouseID=clearTimeout(t.mouseID),-1===s.indexOf(e.target)&&(t.mouseID=setTimeout(function(){t.hideableElements.hide(),t.mouseID=clearTimeout(t.mouseID)},3e3)))}),o.controls.slideshow&&o.slideshow.pauseOnHover&&$doc.on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(o){"mouseenter"==o.type&&t.cycleID?e.pause():"mouseleave"==o.type&&t.isPaused&&e.resume()});var u=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails");o.controls.mousewheel&&u.on("mousewheel.iLightBox",function(o,i){t.lockWheel||(o.preventDefault(),i<0?e.moveTo("next"):i>0&&e.moveTo("prev"))}),o.controls.swipe&&n.on(touchStartEvent,function(a){if(!(t.nextLock||t.prevLock||1==t.total||t.lockSwipe)){t.BODY.addClass("ilightbox-closedhand");var s,l=a.originalEvent.touches?a.originalEvent.touches[0]:a,c=$doc.scrollTop(),u=$doc.scrollLeft(),h=[n.eq(0).offset(),n.eq(1).offset(),n.eq(2).offset()],d=[{top:h[0].top-c,left:h[0].left-u},{top:h[1].top-c,left:h[1].left-u},{top:h[2].top-c,left:h[2].left-u}],p={time:(new Date).getTime(),coords:[l.pageX-u,l.pageY-c]};n.on(touchMoveEvent,m),$doc.one(touchStopEvent,function(a){n.off(touchMoveEvent,m),t.BODY.removeClass("ilightbox-closedhand"),p&&s&&("horizontal"==i&&s.time-p.time<1e3&&abs(p.coords[0]-s.coords[0])>r&&abs(p.coords[1]-s.coords[1])s.coords[0]?t.current!=t.total-1||o.infinite?(t.isSwipe=!0,e.moveTo("next")):g():0!=t.current||o.infinite?(t.isSwipe=!0,e.moveTo("prev")):g():"vertical"==i&&s.time-p.time<1e3&&abs(p.coords[1]-s.coords[1])>r&&abs(p.coords[0]-s.coords[0])s.coords[1]?t.current!=t.total-1||o.infinite?(t.isSwipe=!0,e.moveTo("next")):g():0!=t.current||o.infinite?(t.isSwipe=!0,e.moveTo("prev")):g():g()),p=s=undefined})}function f(e){var t=$(this),o=d[e],n=[p.coords[0]-s.coords[0],p.coords[1]-s.coords[1]];t[0].style["horizontal"==i?"left":"top"]=("horizontal"==i?o.left-n[0]:o.top-n[1])+"px"}function m(e){if(p){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;s={time:(new Date).getTime(),coords:[t.pageX-u,t.pageY-c]},n.each(f),e.preventDefault()}}function g(){n.each(function(){var e=$(this),t=e.data("offset")||{top:e.offset().top-c,left:e.offset().left-u},o=t.top,i=t.left;e.css(transform,gpuAcceleration).stop().animate({top:o,left:i},500,"easeOutCirc",function(){e.css(transform,"")})})}})},goTo:function(e){var t=this,o=t.vars,i=t.options,n=e-o.current;if(i.infinite&&(e==o.total-1&&0==o.current&&(n=-1),o.current==o.total-1&&0==e&&(n=1)),1==n)t.moveTo("next");else if(-1==n)t.moveTo("prev");else{if(o.nextLock||o.prevLock)return!1;"function"==typeof i.callback.onBeforeChange&&i.callback.onBeforeChange.call(t,t.ui),i.linkId&&(o.hashLock=!0,window.location.hash=i.linkId+"/"+e),t.items[e]&&(t.items[e].options.mousewheel?t.vars.lockWheel=!1:o.lockWheel=!0,t.items[e].options.swipe?o.lockSwipe=!1:o.lockSwipe=!0),$.each([o.holder,o.nextPhoto,o.prevPhoto],function(e,t){t.css(transform,gpuAcceleration).fadeOut(i.effects.loadedFadeSpeed)}),o.current=e,o.next=e+1,o.prev=e-1,t.createUI(),setTimeout(function(){t.generateBoxes()},i.effects.loadedFadeSpeed+50),$(".ilightbox-thumbnail",o.thumbnails).removeClass("ilightbox-active").eq(e).addClass("ilightbox-active"),t.positionThumbnails(),i.linkId&&setTimeout(function(){o.hashLock=!1},55),i.infinite||(o.nextButton.add(o.prevButton).add(o.innerPrevButton).add(o.innerNextButton).removeClass("disabled"),0==o.current&&o.prevButton.add(o.innerPrevButton).addClass("disabled"),o.current>=o.total-1&&o.nextButton.add(o.innerNextButton).addClass("disabled")),t.resetCycle(),"function"==typeof i.callback.onAfterChange&&i.callback.onAfterChange.call(t,t.ui)}},moveTo:function(e){var t=this,o=t.vars,i=t.options,n=i.path.toLowerCase(),a=getViewport(),r=i.effects.switchSpeed,s=t.vars.holder,l=s.find("iframe").length?s.find("iframe").attr("src"):"";if(l&&-1!==l.indexOf("vimeo.com")&&s.find("iframe").attr("src",l),o.nextLock||o.prevLock)return!1;var c="next"==e?o.next:o.prev;if(i.linkId&&c&&(o.hashLock=!0,window.location.hash=i.linkId+"/"+c),"next"==e){if(!t.items[c])return!1;var u=o.nextPhoto,h=o.holder,d=o.prevPhoto,p="ilightbox-prev",f="ilightbox-next"}else if("prev"==e){if(!t.items[c])return!1;u=o.prevPhoto,h=o.holder,d=o.nextPhoto,p="ilightbox-next",f="ilightbox-prev"}"function"==typeof i.callback.onBeforeChange&&i.callback.onBeforeChange.call(t,t.ui),"next"==e?o.nextLock=!0:o.prevLock=!0;var m=$("div.ilightbox-caption",h),g=$("div.ilightbox-social",h);if(m.length&&m.stop().fadeOut(r,function(){$(this).remove()}),g.length&&g.stop().fadeOut(r,function(){$(this).remove()}),t.items[c].caption){t.setCaption(t.items[c],u);var v=$("div.ilightbox-caption",u),b=parseInt(v.outerHeight()/u.outerHeight()*100);i.caption.start&&b<=50&&v.fadeIn(r)}var x=t.items[c].options.social;x&&(t.setSocial(x,t.items[c].URL,u),i.social.start&&$("div.ilightbox-social",u).fadeIn(i.effects.fadeSpeed)),$.each([u,h,d],function(e,t){t.removeClass("ilightbox-next ilightbox-prev")});var w=u.data("offset"),y=a.width-i.styles.pageOffsetX,k=a.height-i.styles.pageOffsetY,S=w.newDims.width,L=w.newDims.height,T=w.thumbsOffset,A=w.diff,I=parseInt(k/2-L/2-A.H-T.H/2),C=parseInt(y/2-S/2-A.W-T.W/2);u.css(transform,gpuAcceleration).animate({top:I,left:C,opacity:1},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){u.css(transform,"")}),$("div.ilightbox-container",u).animate({width:S,height:L},r,o.isSwipe?"easeOutCirc":"easeInOutCirc");var O=h.data("offset"),B=O.object;A=O.diff,S=O.newDims.width,L=O.newDims.height,S=parseInt(S*i.styles["next"==e?"prevScale":"nextScale"]),L=parseInt(L*i.styles["next"==e?"prevScale":"nextScale"]),I="horizontal"==n?parseInt(k/2-B.offsetY-L/2-A.H-T.H/2):parseInt(k-B.offsetX-A.H-T.H/2),"prev"==e?C="horizontal"==n?parseInt(y-B.offsetX-A.W-T.W/2):parseInt(y/2-S/2-A.W-B.offsetY-T.W/2):(I="horizontal"==n?I:parseInt(B.offsetX-A.H-L-T.H/2),C="horizontal"==n?parseInt(B.offsetX-A.W-S-T.W/2):parseInt(y/2-B.offsetY-S/2-A.W-T.W/2)),$("div.ilightbox-container",h).animate({width:S,height:L},r,o.isSwipe?"easeOutCirc":"easeInOutCirc"),h.addClass(p).css(transform,gpuAcceleration).animate({top:I,left:C,opacity:i.styles.prevOpacity},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){h.css(transform,""),$(".ilightbox-thumbnail",o.thumbnails).removeClass("ilightbox-active").eq(c).addClass("ilightbox-active"),t.positionThumbnails(),t.items[c]&&(t.items[c].options.mousewheel?o.lockWheel=!1:o.lockWheel=!0,t.items[c].options.swipe?o.lockSwipe=!1:o.lockSwipe=!0),o.isSwipe=!1,"next"==e?(o.nextPhoto=d,o.prevPhoto=h,o.holder=u,o.nextPhoto.hide(),o.next=o.next+1,o.prev=o.current,o.current=o.current+1,i.infinite&&(o.current>o.total-1&&(o.current=0),o.current==o.total-1&&(o.next=0),0==o.current&&(o.prev=o.total-1)),t.createUI(),t.items[o.next]?t.loadContent(t.items[o.next],"next"):o.nextLock=!1):(o.prevPhoto=d,o.nextPhoto=h,o.holder=u,o.prevPhoto.hide(),o.next=o.current,o.current=o.prev,o.prev=o.current-1,i.infinite&&(o.current==o.total-1&&(o.next=0),0==o.current&&(o.prev=o.total-1)),t.createUI(),t.items[o.prev]?t.loadContent(t.items[o.prev],"prev"):o.prevLock=!1),i.linkId&&setTimeout(function(){o.hashLock=!1},55),i.infinite||(o.nextButton.add(o.prevButton).add(o.innerPrevButton).add(o.innerNextButton).removeClass("disabled"),0==o.current&&o.prevButton.add(o.innerPrevButton).addClass("disabled"),o.current>=o.total-1&&o.nextButton.add(o.innerNextButton).addClass("disabled")),t.repositionPhoto(),t.resetCycle(),"function"==typeof i.callback.onAfterChange&&i.callback.onAfterChange.call(t,t.ui)}),I="horizontal"==n?getPixel(d,"top"):"next"==e?parseInt(-k/2-d.outerHeight()):parseInt(2*I),C="horizontal"==n?"next"==e?parseInt(-y/2-d.outerWidth()):parseInt(2*C):getPixel(d,"left"),d.css(transform,gpuAcceleration).animate({top:I,left:C,opacity:i.styles.nextOpacity},r,o.isSwipe?"easeOutCirc":"easeInOutCirc",function(){d.css(transform,"")}).addClass(f)},setCaption:function(e,t){var o=$('
');e.caption&&(o.html(e.caption),$("div.ilightbox-container",t).append(o))},normalizeSocial:function(e,t){this.vars;var o=this.options,i=window.location.href;return $.each(e,function(n,a){if(!a)return!0;var r,s;switch(n.toLowerCase()){case"facebook":r="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",s="Share on Facebook";break;case"twitter":r="http://twitter.com/home?status={URL}",s="Share on Twitter";break;case"delicious":r="http://delicious.com/post?url={URL}",s="Share on Delicious";break;case"digg":r="http://digg.com/submit?phase=2&url={URL}",s="Share on Digg";break;case"reddit":r="http://reddit.com/submit?url={URL}",s="Share on reddit"}e[n]={URL:a.URL&&absolutizeURI(i,a.URL)||o.linkId&&window.location.href||"string"!=typeof t&&i||t&&absolutizeURI(i,t)||i,source:a.source||r||a.URL&&absolutizeURI(i,a.URL)||t&&absolutizeURI(i,t),text:a.text||s||"Share on "+n,width:void 0===a.width||isNaN(a.width)?640:parseInt(a.width),height:a.height||360}}),e},setSocial:function(e,t,o){var i=$('
'),n="
    ";e=this.normalizeSocial(e,t),$.each(e,function(e,t){e.toLowerCase();var o=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,"+"));n+='
  • '}),n+="
",i.html(n),$("div.ilightbox-container",o).append(i)},fullScreenAction:function(){this.vars;fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen(document.documentElement):fullScreenApi.requestFullScreen(document.documentElement):this.doFullscreen()},doFullscreen:function(){var e=this,t=e.vars,o=getViewport(),i=e.options;if(i.fullAlone){var n=t.holder,a=e.items[t.current],r=o.width,s=o.height,l=[n,t.nextPhoto,t.prevPhoto,t.nextButton,t.prevButton,t.overlay,t.toolbar,t.thumbnails,t.loader],c=[t.loader,t.thumbnails];if(t.isInFullScreen)t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=!1,t.overlay.css({opacity:e.options.overlay.opacity}),$.each(c,function(e,t){t.show()}),t.fullScreenButton.attr("title",i.text.enterFullscreen),n.data({naturalWidth:n.data("naturalWidthOld"),naturalHeight:n.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null}),$.each(l,function(e,t){t.removeClass("ilightbox-fullscreen")}),"function"==typeof i.callback.onExitFullScreen&&i.callback.onExitFullScreen.call(e,e.ui);else{if(t.isInFullScreen=t.lockKey=t.lockWheel=t.lockSwipe=!0,t.overlay.css({opacity:1}),$.each(c,function(e,t){t.hide()}),t.fullScreenButton.attr("title",i.text.exitFullscreen),-1!=i.fullStretchTypes.indexOf(a.type))n.data({naturalWidthOld:n.data("naturalWidth"),naturalHeightOld:n.data("naturalHeight"),naturalWidth:r,naturalHeight:s});else{o=a.options.fullViewPort||i.fullViewPort||"";var u=r,h=s,d=n.data("naturalWidth"),p=n.data("naturalHeight");if("fill"==o.toLowerCase())(h=u/d*p)u||p>h;u=(f=e.getNewDimenstions(u,h,d,p,m)).width,h=f.height}n.data({naturalWidthOld:n.data("naturalWidth"),naturalHeightOld:n.data("naturalHeight"),naturalWidth:u,naturalHeight:h})}$.each(l,function(e,t){t.addClass("ilightbox-fullscreen")}),"function"==typeof i.callback.onEnterFullScreen&&i.callback.onEnterFullScreen.call(e,e.ui)}}else t.isInFullScreen?t.isInFullScreen=!1:t.isInFullScreen=!0;e.repositionPhoto(!0)},closeAction:function(){var e=this.vars,t=this.options;$win.off(".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"),e.isInFullScreen&&fullScreenApi.cancelFullScreen(document.documentElement),$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox"),t.hide.effect?e.overlay.stop().fadeOut(t.hide.speed,function(){e.overlay.remove(),e.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}):(e.overlay.remove(),e.BODY.removeClass("ilightbox-noscroll").off(".iLightBox"));var o=[e.toolbar,e.holder,e.nextPhoto,e.prevPhoto,e.nextButton,e.prevButton,e.loader,e.thumbnails];$.each(o,function(e,t){t.removeAttr("style").remove()}),e.prevButton.removeClass("disabled"),e.nextButton.removeClass("disabled"),e.dontGenerateThumbs=e.isInFullScreen=!1,window.iLightBox=null,t.linkId&&(e.hashLock=!0,removeHash(),setTimeout(function(){e.hashLock=!1},55)),"function"==typeof t.callback.onHide&&t.callback.onHide.call(this,this.ui)},repositionPhoto:function(){var e=this,t=e.vars,o=e.options,i=o.path.toLowerCase(),n=getViewport(),a=n.width,r=n.height,s=t.isInFullScreen&&o.fullAlone||t.isMobile?0:"horizontal"==i?0:t.thumbnails.outerWidth(),l=t.isMobile?t.toolbar.outerHeight():t.isInFullScreen&&o.fullAlone?0:"horizontal"==i?t.thumbnails.outerHeight():0,c=t.isInFullScreen&&o.fullAlone?a:a-o.styles.pageOffsetX,u=t.isInFullScreen&&o.fullAlone?r:r-o.styles.pageOffsetY,h="horizontal"==i?parseInt(e.items[t.next]||e.items[t.prev]?2*(o.styles.nextOffsetX+o.styles.prevOffsetX):c/10<=30?30:c/10):parseInt(c/10<=30?30:c/10)+s,d="horizontal"==i?parseInt(u/10<=30?30:u/10)+l:parseInt(e.items[t.next]||e.items[t.prev]?2*(o.styles.nextOffsetX+o.styles.prevOffsetX):u/10<=30?30:u/10),p={type:"current",width:c,height:u,item:e.items[t.current],offsetW:h,offsetH:d,thumbsOffsetW:s,thumbsOffsetH:l,animate:arguments.length,holder:t.holder};e.repositionEl(p),e.items[t.next]&&(p=$.extend(p,{type:"next",item:e.items[t.next],offsetX:o.styles.nextOffsetX,offsetY:o.styles.nextOffsetY,holder:t.nextPhoto}),e.repositionEl(p)),e.items[t.prev]&&(p=$.extend(p,{type:"prev",item:e.items[t.prev],offsetX:o.styles.prevOffsetX,offsetY:o.styles.prevOffsetY,holder:t.prevPhoto}),e.repositionEl(p));var f="horizontal"==i?{left:parseInt(c/2-t.loader.outerWidth()/2)}:{top:parseInt(u/2-t.loader.outerHeight()/2)};t.loader.css(f)},repositionEl:function(e){var t=this.vars,o=this.options,i=o.path.toLowerCase(),n="current"==e.type&&t.isInFullScreen&&o.fullAlone?e.width:e.width-e.offsetW,a="current"==e.type&&t.isInFullScreen&&o.fullAlone?e.height:e.height-e.offsetH,r=e.item,s=e.item.options,l=e.holder,c=e.offsetX||0,u=e.offsetY||0,h=e.thumbsOffsetW,d=e.thumbsOffsetH;"current"==e.type?("number"==typeof s.width&&s.width&&(n=t.isInFullScreen&&o.fullAlone&&(-1!=o.fullStretchTypes.indexOf(r.type)||s.fullViewPort||o.fullViewPort)?n:s.width>n?n:s.width),"number"==typeof s.height&&s.height&&(a=t.isInFullScreen&&o.fullAlone&&(-1!=o.fullStretchTypes.indexOf(r.type)||s.fullViewPort||o.fullViewPort)?a:s.height>a?a:s.height)):("number"==typeof s.width&&s.width&&(n=s.width>n?n:s.width),"number"==typeof s.height&&s.height&&(a=s.height>a?a:s.height)),$(".ilightbox-inner-toolbar",l).length&&(a=parseInt(a-$(".ilightbox-inner-toolbar",l).outerHeight()));var p="string"==typeof s.width&&-1!=s.width.indexOf("%")?percentToValue(parseInt(s.width.replace("%","")),e.width):l.data("naturalWidth"),f="string"==typeof s.height&&-1!=s.height.indexOf("%")?percentToValue(parseInt(s.height.replace("%","")),e.height):l.data("naturalHeight"),m="string"==typeof s.width&&-1!=s.width.indexOf("%")||"string"==typeof s.height&&-1!=s.height.indexOf("%")?{width:p,height:f}:this.getNewDimenstions(n,a,p,f),g=$.extend({},m,{});"prev"==e.type||"next"==e.type?(p=parseInt(m.width*("next"==e.type?o.styles.nextScale:o.styles.prevScale)),f=parseInt(m.height*("next"==e.type?o.styles.nextScale:o.styles.prevScale))):(p=m.width,f=m.height);var v=parseInt((getPixel(l,"padding-left")+getPixel(l,"padding-right")+getPixel(l,"border-left-width")+getPixel(l,"border-right-width"))/2),b=parseInt((getPixel(l,"padding-top")+getPixel(l,"padding-bottom")+getPixel(l,"border-top-width")+getPixel(l,"border-bottom-width")+($(".ilightbox-inner-toolbar",l).outerHeight()||0))/2);switch(e.type){case"current":var x=parseInt(e.height/2-f/2-b-d/2),w=parseInt(e.width/2-p/2-v-h/2);break;case"next":x="horizontal"==i?parseInt(e.height/2-u-f/2-b-d/2):parseInt(e.height-c-b-d/2),w="horizontal"==i?parseInt(e.width-c-v-h/2):parseInt(e.width/2-p/2-v-u-h/2);break;case"prev":x="horizontal"==i?parseInt(e.height/2-u-f/2-b-d/2):parseInt(c-b-f-d/2),w="horizontal"==i?parseInt(c-v-p-h/2):parseInt(e.width/2-u-p/2-v-h/2)}l.data("offset",{top:x,left:w,newDims:g,diff:{W:v,H:b},thumbsOffset:{W:h,H:d},object:e}),e.animate>0&&o.effects.reposition?(l.css(transform,gpuAcceleration).stop().animate({top:x,left:w},o.effects.repositionSpeed,"easeOutCirc",function(){l.css(transform,"")}),$("div.ilightbox-container",l).stop().animate({width:p,height:f},o.effects.repositionSpeed,"easeOutCirc"),$("div.ilightbox-inner-toolbar",l).stop().animate({width:p},o.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})):(l.css({top:x,left:w}),$("div.ilightbox-container",l).css({width:p,height:f}),$("div.ilightbox-inner-toolbar",l).css({width:p}))},resume:function(e){var t=this,o=t.vars,i=t.options;!i.slideshow.pauseTime||i.controls.slideshow&&o.total<=1||ea.options.maxScale?factor=a.options.maxScale:factor=0,html5H264:!(!e.canPlayType||!e.canPlayType("video/mp4").replace(/no/,"")),html5WebM:!(!e.canPlayType||!e.canPlayType("video/webm").replace(/no/,"")),html5Vorbis:!(!e.canPlayType||!e.canPlayType("video/ogg").replace(/no/,"")),html5QuickTime:!(!e.canPlayType||!e.canPlayType("video/quicktime").replace(/no/,""))}},addContent:function(e,t){var o=this;switch(t.type){case"video":var i=!1,n=t.videoType,a=t.options.html5video;("video/mp4"==n||"mp4"==t.ext||"m4v"==t.ext||a.h264)&&o.plugins.html5H264?(t.ext="mp4",t.URL=a.h264||t.URL):a.webm&&o.plugins.html5WebM?(t.ext="webm",t.URL=a.webm||t.URL):a.ogg&&o.plugins.html5Vorbis&&(t.ext="ogv",t.URL=a.ogg||t.URL),!o.plugins.html5H264||"video/mp4"!=n&&"mp4"!=t.ext&&"m4v"!=t.ext?!o.plugins.html5WebM||"video/webm"!=n&&"webm"!=t.ext?!o.plugins.html5Vorbis||"video/ogg"!=n&&"ogv"!=t.ext?!o.plugins.html5QuickTime||"video/quicktime"!=n&&"mov"!=t.ext&&"qt"!=t.ext||(i=!0,n="video/quicktime"):(i=!0,n="video/ogg"):(i=!0,n="video/webm"):(i=!0,n="video/mp4"),i?g=$("