function wrap_gravity_selects(){jQuery(".gform_wrapper select:not([multiple])").each(function(){var a=jQuery(this);setTimeout(function(){if(!a.siblings(".chosen-container").length){var b=a.css("width");a.wrap('
'),a.parent().width(b),a.css("cssText","width: 100% !important;"),jQuery('
').appendTo(a.parent(".gravity-select-parent")),calc_select_arrow_dimensions()}},150)})}function calc_select_arrow_dimensions(){jQuery(".avada-select-parent .select-arrow, .gravity-select-parent .select-arrow, .wpcf7-select-parent .select-arrow").each(function(){jQuery(this).prev().innerHeight()>0&&jQuery(this).css({height:jQuery(this).prev().innerHeight(),width:jQuery(this).prev().innerHeight(),"line-height":jQuery(this).prev().innerHeight()+"px"})})}function recursive_gform_submission_handler(){jQuery(".gform_wrapper").find("form").attr("target")&&jQuery(".gform_wrapper").find("form").attr("target").indexOf("gform_ajax_frame")>-1&&jQuery(".gform_wrapper").find("form").submit(function(a){setTimeout(function(){wrap_gravity_selects(),calc_select_arrow_dimensions(),recursive_gform_submission_handler()},800)})}function _fusionRefreshScroll(){jQuery;_fusionScrollTop=window.pageYOffset,_fusionScrollLeft=window.pageXOffset}function _fusionParallaxAll(){_fusionRefreshScroll();for(var a=0;a<_fusionImageParallaxImages.length;a++)_fusionImageParallaxImages[a].doParallax()}function _fusionRefreshWindow(){_fusionScrollTop=window.pageYOffset,_fusionWindowHeight=jQuery(window).height(),_fusionScrollLeft=window.pageXOffset,_fusionWindowWidth=jQuery(window).width()}function _fbRowGetAllElementsWithAttribute(a){for(var b=[],c=document.getElementsByTagName("*"),d=0,e=c.length;e>d;d++)c[d].getAttribute(a)&&b.push(c[d]);return b}function _fbRowOnPlayerReady(a){var b=a.target;b.playVideo(),b.isMute&&b.mute();var c=b.getCurrentTime(),d=+new Date/1e3,e=0,f=!0;b.loopInterval=setInterval(function(){"undefined"!=typeof b.loopTimeout&&clearTimeout(b.loopTimeout),c==b.getCurrentTime()?e=c+(+new Date/1e3-d):(e=b.getCurrentTime(),d=+new Date/1e3),c=b.getCurrentTime(),e+(f?.45:.21)>=b.getDuration()&&(b.pauseVideo(),b.seekTo(0),b.playVideo(),f=!1)},150)}function _fbRowOnPlayerStateChange(a){a.data===YT.PlayerState.ENDED?("undefined"!=typeof a.target.loopTimeout&&clearTimeout(a.target.loopTimeout),a.target.seekTo(0)):a.data===YT.PlayerState.PLAYING&&jQuery(a.target.getIframe()).parent().css("visibility","visible")}function resizeVideo(a){var b=a.parent();if(null===b.find("iframe").width())return void setTimeout(function(){resizeVideo(a)},500);var c=a;c.css({width:"auto",height:"auto",left:"auto",top:"auto"}),c.css("position","absolute");var d=(b.find("iframe").width(),b.find("iframe").height(),b.width()),e=b.height(),f=parseInt(b.css("padding-left")),g=parseInt(b.css("padding-right"));jQuery(".width-100").length>=1&&(g>0&&(d+=g),f>0&&(d+=f));var h,i,j,k,l="16:9";if("undefined"!=typeof a.attr("data-video-aspect-ratio")&&-1!==a.attr("data-video-aspect-ratio").indexOf(":")&&(l=a.attr("data-video-aspect-ratio").split(":"),l[0]=parseFloat(l[0]),l[1]=parseFloat(l[1])),i=e,h=l[0]/l[1]*e,j=l[0]/l[1]*e-d,k=d*l[1]/l[0]-e,h>=d&&i>=e?(height=e,width=l[0]/l[1]*e):(width=d,height=d*l[1]/l[0]),jQuery(".width-100").length>=1&&(g>0&&(width+=g),f>0&&(width+=f),height=width*l[1]/l[0]),marginTop=-(height-e)/2,marginLeft=-(width-d)/2,b.find(".fusion-video-cover").length<1){var m=b.find("iframe").parent();m.prepend('
 
')}b.find(".fusion-video-cover").css({"z-index":0,width:width,height:height,position:"absolute"}),b.find("iframe").parent().css({marginLeft:marginLeft,marginTop:marginTop}),b.find("iframe").css({width:width,height:height,"z-index":-1})}function onYouTubeIframeAPIReady(){for(var a=_fbRowGetAllElementsWithAttribute("data-youtube-video-id"),b=0;bb?(e.css("height","auto"),a>$last_window_position?$top?($top=!1,$top_offset=f.offset().top>0?f.offset().top-h:d,e.attr("style","top: "+$top_offset+"px; height: auto;")):!$bottom&&a+b>g+f.offset().top&&c>g+d&&($bottom=!0,e.attr("style","position: fixed; bottom: 0; top: auto; height: auto;")):a<$last_window_position?$bottom?($bottom=!1,$top_offset=f.offset().top>0?f.offset().top-h:d,e.attr("style","top: "+$top_offset+"px; height: auto;")):!$top&&a+d0?f.offset().top-h:d,b>$last_window_height&&c>f.offset().top+h+g&&a+b>f.offset().top+g&&($top_offset+=b-$last_window_height),e.attr("style","top:"+$top_offset+"px; height: auto;"))):($top=!0,e.attr("style","position: fixed;")),$last_window_position=a,void($last_window_height=b))}function insertParam(a,b,c,d){if(replaceDuplicates=!0,a.indexOf("#")>0){var e=a.indexOf("#");urlhash=a.substring(a.indexOf("#"),a.length)}else{urlhash="";var e=a.length}sourceUrl=a.substring(0,e);var f=sourceUrl.split("?"),g="";if(f.length>1)for(var h=f[1].split("&"),i=0;i1?"&"+g.substring(1):""):(""!==g&&"?"!=g&&(g+="&"),g+=b+"="+(c?c:"")),f[0]+g+urlhash}function ytVidId(a){var b=/^(?:https?:)?(\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return a.match(b)?RegExp.$1:!1}function onYouTubePlayerAPIReady(){YT_ready(!0)}+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.2",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("current-menu-item");d.parent(".sub-menu").length&&(d=d.closest("li.fusion-dropdown-menu").addClass("current-menu-item")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".current-menu-item").removeClass("current-menu-item"),a(this.selector).parentsUntil(this.options.target,".current-menu-parent").removeClass("current-menu-parent")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .fusion-panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)}),jQuery("click.bs.collapse.data-api, [data-toggle=collapse]").each(function(){jQuery(this).attr("data-parent");if(0==jQuery(this).parents(".panel-group").length){var a=Math.floor(10*Math.random()+1),b=jQuery(this).parents(".fusion-panel");jQuery(this).attr("data-parent","accordian-"+a),jQuery(b).wrap('
')}})}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop="",this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery);var cssua=function(a,b,c){"use strict";var d=" ua-",e=/\s*([\-\w ]+)[\s\/\:]([\d_]+\b(?:[\-\._\/]\w+)*)/,f=/([\w\-\.]+[\s\/][v]?[\d_]+\b(?:[\-\._\/]\w+)*)/g,g=/\b(?:(blackberry\w*|bb10)|(rim tablet os))(?:\/(\d+\.\d+(?:\.\w+)*))?/,h=/\bsilk-accelerated=true\b/,i=/\bfluidapp\b/,j=/(\bwindows\b|\bmacintosh\b|\blinux\b|\bunix\b)/,k=/(\bandroid\b|\bipad\b|\bipod\b|\bwindows phone\b|\bwpdesktop\b|\bxblwp7\b|\bzunewp7\b|\bwindows ce\b|\bblackberry\w*|\bbb10\b|\brim tablet os\b|\bmeego|\bwebos\b|\bpalm|\bsymbian|\bj2me\b|\bdocomo\b|\bpda\b|\bchtml\b|\bmidp\b|\bcldc\b|\w*?mobile\w*?|\w*?phone\w*?)/,l=/(\bxbox\b|\bplaystation\b|\bnintendo\s+\w+)/,m={parse:function(a,b){var c={};if(b&&(c.standalone=b),a=(""+a).toLowerCase(),!a)return c;for(var d,m,n=a.split(/[()]/),o=0,p=n.length;p>o;o++)if(o%2){var q=n[o].split(";");for(d=0,m=q.length;m>d;d++)if(e.exec(q[d])){var r=RegExp.$1.split(" ").join("_"),s=RegExp.$2;(!c[r]||parseFloat(c[r])d;d++){var u=t[d].split(/[\/\s]+/);u.length&&"mozilla"!==u[0]&&(c[u[0].split(" ").join("_")]=u.slice(1).join("-"))}}if(k.exec(a))c.mobile=RegExp.$1,g.exec(a)&&(delete c[c.mobile],c.blackberry=c.version||RegExp.$3||RegExp.$2||RegExp.$1,RegExp.$1?c.mobile="blackberry":"0.0.1"===c.version&&(c.blackberry="7.1.0.0"));else if(j.exec(a))c.desktop=RegExp.$1;else if(l.exec(a)){c.game=RegExp.$1;var v=c.game.split(" ").join("_");c.version&&!c[v]&&(c[v]=c.version)}return c.intel_mac_os_x?(c.mac_os_x=c.intel_mac_os_x.split("_").join("."),delete c.intel_mac_os_x):c.cpu_iphone_os?(c.ios=c.cpu_iphone_os.split("_").join("."),delete c.cpu_iphone_os):c.cpu_os?(c.ios=c.cpu_os.split("_").join("."),delete c.cpu_os):"iphone"!==c.mobile||c.ios||(c.ios="1"),c.opera&&c.version?(c.opera=c.version,delete c.blackberry):h.exec(a)?c.silk_accelerated=!0:i.exec(a)&&(c.fluidapp=c.version),c.applewebkit?(c.webkit=c.applewebkit,delete c.applewebkit,c.opr&&(c.opera=c.opr,delete c.opr,delete c.chrome),c.safari&&(c.chrome||c.crios||c.opera||c.silk||c.fluidapp||c.phantomjs||c.mobile&&!c.ios?delete c.safari:c.version&&!c.rim_tablet_os?c.safari=c.version:c.safari={419:"2.0.4",417:"2.0.3",416:"2.0.2",412:"2.0",312:"1.3",125:"1.2",85:"1.0"}[parseInt(c.safari,10)]||c.safari)):c.msie||c.trident?(c.opera||(c.ie=c.msie||c.rv),delete c.msie,c.windows_phone_os?(c.windows_phone=c.windows_phone_os,delete c.windows_phone_os):("wpdesktop"===c.mobile||"xblwp7"===c.mobile||"zunewp7"===c.mobile)&&(c.mobile="windows desktop",c.windows_phone=+c.ie<9?"7.0":+c.ie<10?"7.5":"8.0",delete c.windows_nt)):(c.gecko||c.firefox)&&(c.gecko=c.rv),c.rv&&delete c.rv,c.version&&delete c.version,c},format:function(a){function b(a,b){a=a.split(".").join("-");var c=d+a;if("string"==typeof b){b=b.split(" ").join("_").split(".").join("-");for(var e=b.indexOf("-");e>0;)c+=d+a+"-"+b.substring(0,e),e=b.indexOf("-",e+1);c+=d+a+"-"+b}return c}var c="";for(var e in a)e&&a.hasOwnProperty(e)&&(c+=b(e,a[e]));return c},encode:function(a){var b="";for(var c in a)c&&a.hasOwnProperty(c)&&(b&&(b+="&"),b+=encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b}};m.userAgent=m.ua=m.parse(b,c);var n=m.format(m.ua)+" js";return a.className?a.className=a.className.replace(/\bno-js\b/g,"")+n:a.className=n.substr(1),m}(document.documentElement,navigator.userAgent,navigator.standalone);!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap; var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}),document.createElement("canvas").getContext||!function(){function a(){return this.context_||(this.context_=new j(this))}function b(a,b,c){var d=x.call(arguments,2);return function(){return a.apply(b,d.concat(x.call(arguments)))}}function c(a){var b=a.srcElement;switch(a.propertyName){case"width":b.style.width=b.attributes.width.nodeValue+"px",b.getContext().clearRect();break;case"height":b.style.height=b.attributes.height.nodeValue+"px",b.getContext().clearRect()}}function d(a){var b=a.srcElement;b.firstChild&&(b.firstChild.style.width=b.clientWidth+"px",b.firstChild.style.height=b.clientHeight+"px")}function e(){return[[1,0,0],[0,1,0],[0,0,1]]}function f(a,b){for(var c=e(),d=0;3>d;d++)for(var f=0;3>f;f++){for(var g=0,h=0;3>h;h++)g+=a[d][h]*b[h][f];c[d][f]=g}return c}function g(a,b){b.fillStyle=a.fillStyle,b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.lineWidth=a.lineWidth,b.miterLimit=a.miterLimit,b.shadowBlur=a.shadowBlur,b.shadowColor=a.shadowColor,b.shadowOffsetX=a.shadowOffsetX,b.shadowOffsetY=a.shadowOffsetY,b.strokeStyle=a.strokeStyle,b.globalAlpha=a.globalAlpha,b.arcScaleX_=a.arcScaleX_,b.arcScaleY_=a.arcScaleY_,b.lineScale_=a.lineScale_}function h(a){var b,c=1;if(a=String(a),"rgb"==a.substring(0,3)){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),f=a.substring(d+1,e).split(",");b="#";for(var g=0;3>g;g++)b+=z[Number(f[g])];4==f.length&&"a"==a.substr(3,1)&&(c=f[3])}else b=a;return{color:b,alpha:c}}function i(a){switch(a){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function j(a){this.m_=e(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*v,this.globalAlpha=1,this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px",b.style.height=a.clientHeight+"px",b.style.overflow="hidden",b.style.position="absolute",a.appendChild(b),this.element_=b,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function k(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y}),a.currentX_=d.x,a.currentY_=d.y}function l(a){for(var b=0;3>b;b++)for(var c=0;2>c;c++)if(!isFinite(a[b][c])||isNaN(a[b][c]))return!1;return!0}function m(a,b,c){if(l(b)&&(a.m_=b,c)){var d=b[0][0]*b[1][1]-b[0][1]*b[1][0];a.lineScale_=u(t(d))}}function n(a){this.type_=a,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function o(){}var p=Math,q=p.round,r=p.sin,s=p.cos,t=p.abs,u=p.sqrt,v=10,w=v/2,x=Array.prototype.slice,y={init:function(a){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=a||document;c.createElement("canvas"),c.attachEvent("onreadystatechange",b(this.init_,this,c))}},init_:function(a){if(a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),!a.styleSheets.ex_canvas_)var b=null,c="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}";try{b=a.createStyleSheet(),b.owningElement.id="ex_canvas_",b.cssText=c}catch(d){b=document.styleSheets[document.styleSheets.length-1],b.cssText+="\r\n"+c}for(var e=a.getElementsByTagName("canvas"),f=0;fA;A++)for(var B=0;16>B;B++)z[16*A+B]=A.toString(16)+B.toString(16);var C=j.prototype;C.clearRect=function(){this.element_.innerHTML=""},C.beginPath=function(){this.currentPath_=[]},C.moveTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y}),this.currentX_=c.x,this.currentY_=c.y},C.lineTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y}),this.currentX_=c.x,this.currentY_=c.y},C.bezierCurveTo=function(a,b,c,d,e,f){var g=this.getCoords_(e,f),h=this.getCoords_(a,b),i=this.getCoords_(c,d);k(this,h,i,g)},C.quadraticCurveTo=function(a,b,c,d){var e=this.getCoords_(a,b),f=this.getCoords_(c,d),g={x:this.currentX_+2/3*(e.x-this.currentX_),y:this.currentY_+2/3*(e.y-this.currentY_)},h={x:g.x+(f.x-this.currentX_)/3,y:g.y+(f.y-this.currentY_)/3};k(this,g,h,f)},C.arc=function(a,b,c,d,e,f){c*=v;var g=f?"at":"wa",h=a+s(d)*c-w,i=b+r(d)*c-w,j=a+s(e)*c-w,k=b+r(e)*c-w;h!=j||f||(h+=.125);var l=this.getCoords_(a,b),m=this.getCoords_(h,i),n=this.getCoords_(j,k);this.currentPath_.push({type:g,x:l.x,y:l.y,radius:c,xStart:m.x,yStart:m.y,xEnd:n.x,yEnd:n.y})},C.rect=function(a,b,c,d){this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath()},C.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath(),this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath(),this.stroke(),this.currentPath_=e},C.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath(),this.moveTo(a,b),this.lineTo(a+c,b),this.lineTo(a+c,b+d),this.lineTo(a,b+d),this.closePath(),this.fill(),this.currentPath_=e},C.createLinearGradient=function(a,b,c,d){var e=new n("gradient");return e.x0_=a,e.y0_=b,e.x1_=c,e.y1_=d,e},C.createRadialGradient=function(a,b,c,d,e,f){var g=new n("gradientradial");return g.x0_=a,g.y0_=b,g.r0_=c,g.x1_=d,g.y1_=e,g.r1_=f,g},C.drawImage=function(a,b){var c,d,e,f,g,h,i,j,k=a.runtimeStyle.width,l=a.runtimeStyle.height;a.runtimeStyle.width="auto",a.runtimeStyle.height="auto";var m=a.width,n=a.height;if(a.runtimeStyle.width=k,a.runtimeStyle.height=l,3==arguments.length)c=arguments[1],d=arguments[2],g=h=0,i=e=m,j=f=n;else if(5==arguments.length)c=arguments[1],d=arguments[2],e=arguments[3],f=arguments[4],g=h=0,i=m,j=n;else{if(9!=arguments.length)throw Error("Invalid number of arguments");g=arguments[1],h=arguments[2],i=arguments[3],j=arguments[4],c=arguments[5],d=arguments[6],e=arguments[7],f=arguments[8]}var o=this.getCoords_(c,d),r=[],s=10,t=10;if(r.push(" ','",""),this.element_.insertAdjacentHTML("BeforeEnd",r.join(""))},C.stroke=function(a){var b=[],c=h(a?this.fillStyle:this.strokeStyle),d=c.color,e=c.alpha*this.globalAlpha,f=10,g=10;b.push("k.x)&&(k.x=n.x),(null==j.y||n.yk.y)&&(k.y=n.y))}if(b.push(' ">'),a)if("object"==typeof this.fillStyle){var o=this.fillStyle,r=0,s={x:0,y:0},t=0,u=1;if("gradient"==o.type_){var w=o.x0_/this.arcScaleX_,x=o.y0_/this.arcScaleY_,y=o.x1_/this.arcScaleX_,z=o.y1_/this.arcScaleY_,A=this.getCoords_(w,x),B=this.getCoords_(y,z),C=B.x-A.x,D=B.y-A.y;r=180*Math.atan2(C,D)/Math.PI,0>r&&(r+=360),1e-6>r&&(r=0)}else{var A=this.getCoords_(o.x0_,o.y0_),E=k.x-j.x,F=k.y-j.y;s={x:(A.x-j.x)/E,y:(A.y-j.y)/F},E/=this.arcScaleX_*v,F/=this.arcScaleY_*v;var G=p.max(E,F);t=2*o.r0_/G,u=2*o.r1_/G-t}var H=o.colors_;H.sort(function(a,b){return a.offset-b.offset});for(var I=H.length,J=H[0].color,K=H[I-1].color,L=H[0].alpha*this.globalAlpha,M=H[I-1].alpha*this.globalAlpha,N=[],l=0;I>l;l++){var O=H[l];N.push(O.offset*u+t+" "+O.color)}b.push('')}else b.push('');else{var P=this.lineScale_*this.lineWidth;1>P&&(e*=P),b.push("')}b.push(""),this.element_.insertAdjacentHTML("beforeEnd",b.join(""))},C.fill=function(){this.stroke(!0)},C.closePath=function(){this.currentPath_.push({type:"close"})},C.getCoords_=function(a,b){var c=this.m_;return{x:v*(a*c[0][0]+b*c[1][0]+c[2][0])-w,y:v*(a*c[0][1]+b*c[1][1]+c[2][1])-w}},C.save=function(){var a={};g(this,a),this.aStack_.push(a),this.mStack_.push(this.m_),this.m_=f(e(),this.m_)},C.restore=function(){g(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},C.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];m(this,f(c,this.m_),!1)},C.rotate=function(a){var b=s(a),c=r(a),d=[[b,c,0],[-c,b,0],[0,0,1]];m(this,f(d,this.m_),!1)},C.scale=function(a,b){this.arcScaleX_*=a,this.arcScaleY_*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];m(this,f(c,this.m_),!0)},C.transform=function(a,b,c,d,e,g){var h=[[a,b,0],[c,d,0],[e,g,1]];m(this,f(h,this.m_),!0)},C.setTransform=function(a,b,c,d,e,f){var g=[[a,b,0],[c,d,0],[e,f,1]];m(this,g,!0)},C.clip=function(){},C.arcTo=function(){},C.createPattern=function(){return new o},n.prototype.addColorStop=function(a,b){b=h(b),this.colors_.push({offset:a,color:b.color,alpha:b.alpha})},G_vmlCanvasManager=y,CanvasRenderingContext2D=j,CanvasGradient=n,CanvasPattern=o}();var Froogaloop=function(){function a(b){return new a.fn.init(b)}function b(a,b,c){if(!c.contentWindow.postMessage)return!1;var d=c.getAttribute("src").split("?")[0],e=JSON.stringify({method:a,value:b});"//"===d.substr(0,2)&&(d=window.location.protocol+d),c.contentWindow.postMessage(e,d)}function c(a){var b,c;try{b=JSON.parse(a.data),c=b.event||b.method}catch(d){}if("ready"!=c||j||(j=!0),a.origin!=k)return!1;var f=b.value,g=b.data,h=""===h?null:b.player_id,i=e(c,h),l=[];return i?(void 0!==f&&l.push(f),g&&l.push(g),h&&l.push(h),l.length>0?i.apply(null,l):i.call()):!1}function d(a,b,c){c?(i[c]||(i[c]={}),i[c][a]=b):i[a]=b}function e(a,b){return b?i[b][a]:i[a]}function f(a,b){if(b&&i[b]){if(!i[b][a])return!1;i[b][a]=null}else{if(!i[a])return!1;i[a]=null}return!0}function g(a){"//"===a.substr(0,2)&&(a=window.location.protocol+a);for(var b=a.split("/"),c="",d=0,e=b.length;e>d&&3>d;d++)c+=b[d],2>d&&(c+="/");return c}function h(a){return!!(a&&a.constructor&&a.call&&a.apply)}var i={},j=!1,k=(Array.prototype.slice,"");return a.fn=a.prototype={element:null,init:function(a){return"string"==typeof a&&(a=document.getElementById(a)),this.element=a,k=g(this.element.getAttribute("src")),this},api:function(a,c){if(!this.element||!a)return!1;var e=this,f=e.element,g=""!==f.id?f.id:null,i=h(c)?null:c,j=h(c)?c:null;return j&&d(a,j,g),b(a,i,f),e},addEvent:function(a,c){if(!this.element)return!1;var e=this,f=e.element,g=""!==f.id?f.id:null;return d(a,c,g),"ready"!=a?b("addEventListener",a,f):"ready"==a&&j&&c.call(null,g),e},removeEvent:function(a){if(!this.element)return!1;var c=this,d=c.element,e=""!==d.id?d.id:null,g=f(a,e);"ready"!=a&&g&&b("removeEventListener",a,d)}},a.fn.init.prototype=a.fn,window.addEventListener?window.addEventListener("message",c,!1):window.attachEvent("onmessage",c),window.Froogaloop=window.$f=a}();(function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;bc;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a){this.src=a,n[a]=this}var j=a.jQuery,k=a.console,l="undefined"!=typeof k,m=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0,b=this.elements.length;b>a;a++){var c=this.elements[a];"IMG"===c.nodeName&&this.addImage(c);var d=c.nodeType;if(d&&(1===d||9===d||11===d))for(var e=c.querySelectorAll("img"),f=0,g=e.length;g>f;f++){var h=e[f];this.addImage(h)}}},g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.check=function(){function a(a,e){return b.options.debug&&l&&k.log("confirm",a,e),b.progress(a),c++,c===d&&b.complete(),!0}var b=this,c=0,d=this.images.length;if(this.hasAnyBroken=!1,!d)return void this.complete();for(var e=0;d>e;e++){var f=this.images[e];f.on("confirm",a),f.check()}},g.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;var b=this;setTimeout(function(){b.emit("progress",b,a),b.jqDeferred&&b.jqDeferred.notify&&b.jqDeferred.notify(b,a)})},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var b=this;setTimeout(function(){if(b.emit(a,b),b.emit("always",b),b.jqDeferred){var c=b.hasAnyBroken?"reject":"resolve";b.jqDeferred[c](b)}})},j&&(j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))}),h.prototype=new b,h.prototype.check=function(){var a=n[this.img.src]||new i(this.img.src);if(a.isConfirmed)return void this.confirm(a.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var b=this;a.on("confirm",function(a,c){return b.confirm(a.isLoaded,c),!0}),a.check()},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("confirm",this,b)};var n={};return i.prototype=new b,i.prototype.check=function(){if(!this.isChecked){var a=new Image;c.bind(a,"load",this),c.bind(a,"error",this),a.src=this.src,this.isChecked=!0}},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(a){this.confirm(!0,"onload"),this.unbindProxyEvents(a)},i.prototype.onerror=function(a){this.confirm(!1,"onerror"),this.unbindProxyEvents(a)},i.prototype.confirm=function(a,b){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,b)},i.prototype.unbindProxyEvents=function(a){c.unbind(a.target,"load",this),c.unbind(a.target,"error",this)},g}),function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){ return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete s[e],delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):"object"==typeof exports?module.exports=g(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a){function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window),function(a){function b(a,b){function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!==this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size")):a.Masonry=b(a.Outlayer,a.getSize)}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a,c){var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;b(d.prototype,c.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],c):"object"==typeof exports?module.exports=c(require("../layout-mode"),require("masonry-layout")):c(a.Isotope.LayoutMode,a.Masonry)}(window),function(a){function b(a){var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window),function(a){function b(a){var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===k.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=l(b,a);-1!==c&&b.splice(c,1)}function f(a,c,f,i,k){function l(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var m=a.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=i,m.LayoutMode=k,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),a.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var b in k.modes)this._initLayoutMode(b)},m.prototype.reloadItems=function(){this.itemGUID=0,a.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var b=a.prototype._itemize.apply(this,arguments),c=0,d=b.length;d>c;c++){var e=b[c];e.id=this.itemGUID++}return this._updateItemsSortData(b),b},m.prototype._initLayoutMode=function(a){var c=k.modes[a],d=this.options[a]||{};this.options[a]=c.options?b(c.options,d):d,this.modes[a]=new c(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){this.option(a),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._filter=function(a){function b(){l.reveal(e),l.hide(f)}var c=this.options.filter;c=c||"*";for(var d=[],e=[],f=[],g=this._getFilterTest(c),h=0,i=a.length;i>h;h++){var j=a[h];if(!j.isIgnored){var k=g(j);k&&d.push(j),k&&j.isHidden?e.push(j):k||j.isHidden||f.push(j)}}var l=this;return this._isInstant?this._noTransition(b):b(),d},m.prototype._getFilterTest=function(a){return g&&this.options.isJQueryFiltering?function(b){return g(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return f(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=d(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=h(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),i=m.sortDataParsers[c[1]];return a=i?function(a){return a&&i(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&j(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=l(b,this.options.sortAscending);this.filteredItems.sort(c),a!==this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){a.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps();var d=this._filterRevealAdded(b);this.layoutItems(c),this.filteredItems=d.concat(this.filteredItems)}},m.prototype._filterRevealAdded=function(a){var b=this._noTransition(function(){return this._filter(a)});return this.layoutItems(b,!0),this.reveal(b),a},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b);for(this._noTransition(function(){this.hide(f)}),c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(o.call(this,a),b&&b.length)for(var c=0,f=b.length;f>c;c++){var g=b[c];e(g,this.filteredItems)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m}var g=a.jQuery,h=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},i=document.documentElement,j=i.textContent?function(a){return a.textContent}:function(a){return a.innerText},k=Object.prototype.toString,l=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],f):"object"==typeof exports?module.exports=f(require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=f(a.Outlayer,a.getSize,a.matchesSelector,a.Isotope.Item,a.Isotope.LayoutMode)}(window),function(a){a.fn.appear=function(b,c){var d=a.extend({data:void 0,one:!0,accX:0,accY:0},c);return this.each(function(){var c=a(this);if(c.appeared=!1,!b)return void c.trigger("appear",d.data);var e=a(window),f=function(){if(!c.is(":visible"))return void(c.appeared=!1);var a=e.scrollLeft(),b=e.scrollTop(),f=c.offset(),g=f.left,h=f.top,i=d.accX,j=d.accY,k=c.height(),l=e.height(),m=c.width(),n=e.width();h+k+j>=b&&b+l+j>=h&&g+m+i>=a&&a+n+i>=g?c.appeared||c.trigger("appear",d.data):c.appeared=!1},g=function(){if(c.appeared=!0,d.one){e.unbind("scroll",f);var g=a.inArray(f,a.fn.appear.checks);g>=0&&a.fn.appear.checks.splice(g,1)}b.apply(this,arguments)};d.one?c.one("appear",d.data,g):c.bind("appear",d.data,g),e.scroll(f),a.fn.appear.checks.push(f),f()})},a.extend(a.fn.appear,{checks:[],timeout:null,checkAll:function(){var b=a.fn.appear.checks.length;if(b>0)for(;b--;)a.fn.appear.checks[b]()},run:function(){a.fn.appear.timeout&&clearTimeout(a.fn.appear.timeout),a.fn.appear.timeout=setTimeout(a.fn.appear.checkAll,20)}}),a.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(b,c){var d=a.fn[c];d&&(a.fn[c]=function(){var b=d.apply(this,arguments);return a.fn.appear.run(),b})})}(jQuery),function(a){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(b){return!b||void 0!==b.allowPageScroll||void 0===b.swipe&&void 0===b.swipeStatus||(b.allowPageScroll=j),void 0!==b.click&&void 0===b.tap&&(b.tap=b.click),b||(b={}),b=a.extend({},a.fn.swipe.defaults,b),this.each(function(){var d=a(this),e=d.data(B);e||(e=new c(this,b),d.data(B,e))})}function c(b,c){function C(b){if(!(ja()||a(b.target).closest(c.excludedElements,Sa).length>0)){var d,e=b.originalEvent?b.originalEvent:b,f=y?e.touches[0]:e;return Ta=u,y?Ua=e.touches.length:b.preventDefault(),Ja=0,Ka=null,Qa=null,La=0,Ma=0,Na=0,Oa=1,Pa=0,Va=oa(),Ra=ra(),ha(),!y||Ua===c.fingers||c.fingers===s||R()?(la(0,f),Wa=Aa(),2==Ua&&(la(1,e.touches[1]),Ma=Na=ua(Va[0].start,Va[1].start)),(c.swipeStatus||c.pinchStatus)&&(d=J(e,Ta))):d=!1,d===!1?(Ta=x,J(e,Ta),d):(c.hold&&(ab=setTimeout(a.proxy(function(){Sa.trigger("hold",[e.target]),c.hold&&(d=c.hold.call(Sa,e,e.target))},this),c.longTapThreshold)),ka(!0),null)}}function D(a){var b=a.originalEvent?a.originalEvent:a;if(Ta!==w&&Ta!==x&&!ia()){var d,e=y?b.touches[0]:b,f=ma(e);if(Xa=Aa(),y&&(Ua=b.touches.length),c.hold&&clearTimeout(ab),Ta=v,2==Ua&&(0==Ma?(la(1,b.touches[1]),Ma=Na=ua(Va[0].start,Va[1].start)):(ma(b.touches[1]),Na=ua(Va[0].end,Va[1].end),Qa=wa(Va[0].end,Va[1].end)),Oa=va(Ma,Na),Pa=Math.abs(Ma-Na)),Ua===c.fingers||c.fingers===s||!y||R()){if(Ka=za(f.start,f.end),P(a,Ka),Ja=xa(f.start,f.end),La=ta(),pa(Ka,Ja),(c.swipeStatus||c.pinchStatus)&&(d=J(b,Ta)),!c.triggerOnTouchEnd||c.triggerOnTouchLeave){var g=!0;if(c.triggerOnTouchLeave){var h=Ba(this);g=Ca(f.end,h)}!c.triggerOnTouchEnd&&g?Ta=I(v):c.triggerOnTouchLeave&&!g&&(Ta=I(w)),(Ta==x||Ta==w)&&J(b,Ta)}}else Ta=x,J(b,Ta);d===!1&&(Ta=x,J(b,Ta))}}function E(a){var b=a.originalEvent;return y&&b.touches.length>0?(ga(),!0):(ia()&&(Ua=Za),Xa=Aa(),La=ta(),M()||!L()?(Ta=x,J(b,Ta)):c.triggerOnTouchEnd||0==c.triggerOnTouchEnd&&Ta===v?(a.preventDefault(),Ta=w,J(b,Ta)):!c.triggerOnTouchEnd&&Y()?(Ta=w,K(b,Ta,n)):Ta===v&&(Ta=x,J(b,Ta)),ka(!1),null)}function F(){Ua=0,Xa=0,Wa=0,Ma=0,Na=0,Oa=1,ha(),ka(!1)}function G(a){var b=a.originalEvent;c.triggerOnTouchLeave&&(Ta=I(w),J(b,Ta))}function H(){Sa.unbind(Ea,C),Sa.unbind(Ia,F),Sa.unbind(Fa,D),Sa.unbind(Ga,E),Ha&&Sa.unbind(Ha,G),ka(!1)}function I(a){var b=a,d=O(),e=L(),f=M();return!d||f?b=x:!e||a!=v||c.triggerOnTouchEnd&&!c.triggerOnTouchLeave?!e&&a==w&&c.triggerOnTouchLeave&&(b=x):b=w,b}function J(a,b){var c=void 0;return V()||U()?c=K(a,b,l):(S()||R())&&c!==!1&&(c=K(a,b,m)),ea()&&c!==!1?c=K(a,b,o):fa()&&c!==!1?c=K(a,b,p):da()&&c!==!1&&(c=K(a,b,n)),b===x&&F(a),b===w&&(y?0==a.touches.length&&F(a):F(a)),c}function K(b,j,k){var q=void 0;if(k==l){if(Sa.trigger("swipeStatus",[j,Ka||null,Ja||0,La||0,Ua,Va]),c.swipeStatus&&(q=c.swipeStatus.call(Sa,b,j,Ka||null,Ja||0,La||0,Ua,Va),q===!1))return!1;if(j==w&&T()){if(Sa.trigger("swipe",[Ka,Ja,La,Ua,Va]),c.swipe&&(q=c.swipe.call(Sa,b,Ka,Ja,La,Ua,Va),q===!1))return!1;switch(Ka){case d:Sa.trigger("swipeLeft",[Ka,Ja,La,Ua,Va]),c.swipeLeft&&(q=c.swipeLeft.call(Sa,b,Ka,Ja,La,Ua,Va));break;case e:Sa.trigger("swipeRight",[Ka,Ja,La,Ua,Va]),c.swipeRight&&(q=c.swipeRight.call(Sa,b,Ka,Ja,La,Ua,Va));break;case f:Sa.trigger("swipeUp",[Ka,Ja,La,Ua,Va]),c.swipeUp&&(q=c.swipeUp.call(Sa,b,Ka,Ja,La,Ua,Va));break;case g:Sa.trigger("swipeDown",[Ka,Ja,La,Ua,Va]),c.swipeDown&&(q=c.swipeDown.call(Sa,b,Ka,Ja,La,Ua,Va))}}}if(k==m){if(Sa.trigger("pinchStatus",[j,Qa||null,Pa||0,La||0,Ua,Oa,Va]),c.pinchStatus&&(q=c.pinchStatus.call(Sa,b,j,Qa||null,Pa||0,La||0,Ua,Oa,Va),q===!1))return!1;if(j==w&&Q())switch(Qa){case h:Sa.trigger("pinchIn",[Qa||null,Pa||0,La||0,Ua,Oa,Va]), c.pinchIn&&(q=c.pinchIn.call(Sa,b,Qa||null,Pa||0,La||0,Ua,Oa,Va));break;case i:Sa.trigger("pinchOut",[Qa||null,Pa||0,La||0,Ua,Oa,Va]),c.pinchOut&&(q=c.pinchOut.call(Sa,b,Qa||null,Pa||0,La||0,Ua,Oa,Va))}}return k==n?(j===x||j===w)&&(clearTimeout(_a),clearTimeout(ab),Z()&&!aa()?($a=Aa(),_a=setTimeout(a.proxy(function(){$a=null,Sa.trigger("tap",[b.target]),c.tap&&(q=c.tap.call(Sa,b,b.target))},this),c.doubleTapThreshold)):($a=null,Sa.trigger("tap",[b.target]),c.tap&&(q=c.tap.call(Sa,b,b.target)))):k==o?(j===x||j===w)&&(clearTimeout(_a),$a=null,Sa.trigger("doubletap",[b.target]),c.doubleTap&&(q=c.doubleTap.call(Sa,b,b.target))):k==p&&(j===x||j===w)&&(clearTimeout(_a),$a=null,Sa.trigger("longtap",[b.target]),c.longTap&&(q=c.longTap.call(Sa,b,b.target))),q}function L(){var a=!0;return null!==c.threshold&&(a=Ja>=c.threshold),a}function M(){var a=!1;return null!==c.cancelThreshold&&null!==Ka&&(a=qa(Ka)-Ja>=c.cancelThreshold),a}function N(){return null!==c.pinchThreshold?Pa>=c.pinchThreshold:!0}function O(){var a;return a=c.maxTimeThreshold&&La>=c.maxTimeThreshold?!1:!0}function P(a,b){if(c.allowPageScroll===j||R())a.preventDefault();else{var h=c.allowPageScroll===k;switch(b){case d:(c.swipeLeft&&h||!h&&c.allowPageScroll!=q)&&a.preventDefault();break;case e:(c.swipeRight&&h||!h&&c.allowPageScroll!=q)&&a.preventDefault();break;case f:(c.swipeUp&&h||!h&&c.allowPageScroll!=r)&&a.preventDefault();break;case g:(c.swipeDown&&h||!h&&c.allowPageScroll!=r)&&a.preventDefault()}}}function Q(){var a=W(),b=X(),c=N();return a&&b&&c}function R(){return!!(c.pinchStatus||c.pinchIn||c.pinchOut)}function S(){return!(!Q()||!R())}function T(){var a=O(),b=L(),c=W(),d=X(),e=M(),f=!e&&d&&c&&b&&a;return f}function U(){return!!(c.swipe||c.swipeStatus||c.swipeLeft||c.swipeRight||c.swipeUp||c.swipeDown)}function V(){return!(!T()||!U())}function W(){return Ua===c.fingers||c.fingers===s||!y}function X(){return 0!==Va[0].end.x}function Y(){return!!c.tap}function Z(){return!!c.doubleTap}function $(){return!!c.longTap}function _(){if(null==$a)return!1;var a=Aa();return Z()&&a-$a<=c.doubleTapThreshold}function aa(){return _()}function ba(){return(1===Ua||!y)&&(isNaN(Ja)||Jac.longTapThreshold&&t>Ja}function da(){return!(!ba()||!Y())}function ea(){return!(!_()||!Z())}function fa(){return!(!ca()||!$())}function ga(){Ya=Aa(),Za=event.touches.length+1}function ha(){Ya=0,Za=0}function ia(){var a=!1;if(Ya){var b=Aa()-Ya;b<=c.fingerReleaseThreshold&&(a=!0)}return a}function ja(){return!(Sa.data(B+"_intouch")!==!0)}function ka(a){a===!0?(Sa.bind(Fa,D),Sa.bind(Ga,E),Ha&&Sa.bind(Ha,G)):(Sa.unbind(Fa,D,!1),Sa.unbind(Ga,E,!1),Ha&&Sa.unbind(Ha,G,!1)),Sa.data(B+"_intouch",a===!0)}function la(a,b){var c=void 0!==b.identifier?b.identifier:0;return Va[a].identifier=c,Va[a].start.x=Va[a].end.x=b.pageX||b.clientX,Va[a].start.y=Va[a].end.y=b.pageY||b.clientY,Va[a]}function ma(a){var b=void 0!==a.identifier?a.identifier:0,c=na(b);return c.end.x=a.pageX||a.clientX,c.end.y=a.pageY||a.clientY,c}function na(a){for(var b=0;b=b;b++)a.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return a}function pa(a,b){b=Math.max(b,qa(a)),Ra[a].distance=b}function qa(a){return Ra[a]?Ra[a].distance:void 0}function ra(){var a={};return a[d]=sa(d),a[e]=sa(e),a[f]=sa(f),a[g]=sa(g),a}function sa(a){return{direction:a,distance:0}}function ta(){return Xa-Wa}function ua(a,b){var c=Math.abs(a.x-b.x),d=Math.abs(a.y-b.y);return Math.round(Math.sqrt(c*c+d*d))}function va(a,b){var c=b/a*1;return c.toFixed(2)}function wa(){return 1>Oa?i:h}function xa(a,b){return Math.round(Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)))}function ya(a,b){var c=a.x-b.x,d=b.y-a.y,e=Math.atan2(d,c),f=Math.round(180*e/Math.PI);return 0>f&&(f=360-Math.abs(f)),f}function za(a,b){var c=ya(a,b);return 45>=c&&c>=0?d:360>=c&&c>=315?d:c>=135&&225>=c?e:c>45&&135>c?g:f}function Aa(){var a=new Date;return a.getTime()}function Ba(b){b=a(b);var c=b.offset(),d={left:c.left,right:c.left+b.outerWidth(),top:c.top,bottom:c.top+b.outerHeight()};return d}function Ca(a,b){return a.x>b.left&&a.xb.top&&a.yc;c++){var e=a.anims[c];e&&e[0][b.transition](e[1],a.duration,a.easing,e[2])}}function sc_stopScroll(a,b){is_boolean(b)||(b=!0),is_object(a.pre)&&sc_stopScroll(a.pre,b);for(var c=0,d=a.anims.length;d>c;c++){var e=a.anims[c];e[0].stop(!0),b&&(e[0].css(e[1]),is_function(e[2])&&e[2]())}is_object(a.post)&&sc_stopScroll(a.post,b)}function sc_afterScroll(a,b,c){switch(b&&b.remove(),c.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":a.css("opacity",1),a.css("filter","")}}function sc_fireCallbacks(a,b,c,d,e){if(b[c]&&b[c].call(a,d),e[c].length)for(var f=0,g=e[c].length;g>f;f++)e[c][f].call(a,d);return[]}function sc_fireQueue(a,b,c){return b.length&&(a.trigger(cf_e(b[0][0],c),b[0][1]),b.shift()),b}function sc_hideHiddenItems(a){a.each(function(){var a=$(this);a.data("_cfs_isHidden",a.is(":hidden")).hide()})}function sc_showHiddenItems(a){a&&a.each(function(){var a=$(this);a.data("_cfs_isHidden")||a.show()})}function sc_clearTimers(a){return a.auto&&clearTimeout(a.auto),a.progress&&clearInterval(a.progress),a}function sc_mapCallbackArguments(a,b,c,d,e,f,g){return{width:g.width,height:g.height,items:{old:a,skipped:b,visible:c},scroll:{items:d,direction:e,duration:f}}}function sc_getDuration(a,b,c,d){var e=a.duration;return"none"==a.fx?0:("auto"==e?e=b.scroll.duration/b.scroll.items*c:10>e&&(e=d/e),1>e?0:("fade"==a.fx&&(e/=2),Math.round(e)))}function nv_showNavi(a,b,c){var d=is_number(a.items.minimum)?a.items.minimum:a.items.visible+1;if("show"==b||"hide"==b)var e=b;else if(d>b){debug(c,"Not enough items ("+b+" total, "+d+" needed): Hiding navigation.");var e="hide"}else var e="show";var f="show"==e?"removeClass":"addClass",g=cf_c("hidden",c);a.auto.button&&a.auto.button[e]()[f](g),a.prev.button&&a.prev.button[e]()[f](g),a.next.button&&a.next.button[e]()[f](g),a.pagination.container&&a.pagination.container[e]()[f](g)}function nv_enableNavi(a,b,c){if(!a.circular&&!a.infinite){var d="removeClass"==b||"addClass"==b?b:!1,e=cf_c("disabled",c);if(a.auto.button&&d&&a.auto.button[d](e),a.prev.button){var f=d||0==b?"addClass":"removeClass";a.prev.button[f](e)}if(a.next.button){var f=d||b==a.items.visible?"addClass":"removeClass";a.next.button[f](e)}}}function go_getObject(a,b){return is_function(b)?b=b.call(a):is_undefined(b)&&(b={}),b}function go_getItemsObject(a,b){return b=go_getObject(a,b),is_number(b)?b={visible:b}:"variable"==b?b={visible:b,width:b,height:b}:is_object(b)||(b={}),b}function go_getScrollObject(a,b){return b=go_getObject(a,b),is_number(b)?b=50>=b?{items:b}:{duration:b}:is_string(b)?b={easing:b}:is_object(b)||(b={}),b}function go_getNaviObject(a,b){if(b=go_getObject(a,b),is_string(b)){var c=cf_getKeyCode(b);b=-1==c?$(b):c}return b}function go_getAutoObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_boolean(b)?b={play:b}:is_number(b)&&(b={timeoutDuration:b}),b.progress&&(is_string(b.progress)||is_jquery(b.progress))&&(b.progress={bar:b.progress}),b}function go_complementAutoObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_boolean(b.play)||(b.play=!0),is_number(b.delay)||(b.delay=0),is_undefined(b.pauseOnEvent)&&(b.pauseOnEvent=!0),is_boolean(b.pauseOnResize)||(b.pauseOnResize=!0),is_number(b.timeoutDuration)||(b.timeoutDuration=b.duration<10?2500:5*b.duration),b.progress&&(is_function(b.progress.bar)&&(b.progress.bar=b.progress.bar.call(a)),is_string(b.progress.bar)&&(b.progress.bar=$(b.progress.bar)),b.progress.bar?(is_function(b.progress.updater)||(b.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(b.progress.interval)||(b.progress.interval=50)):b.progress=!1),b}function go_getPrevNextObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_number(b)&&(b={key:b}),b}function go_complementPrevNextObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_string(b.key)&&(b.key=cf_getKeyCode(b.key)),b}function go_getPaginationObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={container:b}:is_boolean(b)&&(b={keys:b}),b}function go_complementPaginationObject(a,b){return is_function(b.container)&&(b.container=b.container.call(a)),is_string(b.container)&&(b.container=$(b.container)),is_number(b.items)||(b.items=!1),is_boolean(b.keys)||(b.keys=!1),is_function(b.anchorBuilder)||is_false(b.anchorBuilder)||(b.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(b.deviation)||(b.deviation=0),b}function go_getSwipeObject(a,b){return is_function(b)&&(b=b.call(a)),is_undefined(b)&&(b={onTouch:!1}),is_true(b)?b={onTouch:b}:is_number(b)&&(b={items:b}),b}function go_complementSwipeObject(a,b){return is_boolean(b.onTouch)||(b.onTouch=!0),is_boolean(b.onMouse)||(b.onMouse=!1),is_object(b.options)||(b.options={}),is_boolean(b.options.triggerOnTouchEnd)||(b.options.triggerOnTouchEnd=!1),b}function go_getMousewheelObject(a,b){return is_function(b)&&(b=b.call(a)),is_true(b)?b={}:is_number(b)?b={items:b}:is_undefined(b)&&(b=!1),b}function go_complementMousewheelObject(a,b){return b}function gn_getItemIndex(a,b,c,d,e){if(is_string(a)&&(a=$(a,e)),is_object(a)&&(a=$(a,e)),is_jquery(a)?(a=e.children().index(a),is_boolean(c)||(c=!1)):is_boolean(c)||(c=!0),is_number(a)||(a=0),is_number(b)||(b=0),c&&(a+=d.first),a+=b,d.total>0){for(;a>=d.total;)a-=d.total;for(;0>a;)a+=d.total}return a}function gn_getVisibleItemsPrev(a,b,c){for(var d=0,e=0,f=c;f>=0;f--){var g=a.eq(f);if(d+=g.is(":visible")?g[b.d.outerWidth](!0):0,d>b.maxDimension)return e;0==f&&(f=a.length),e++}}function gn_getVisibleItemsPrevFilter(a,b,c){return gn_getItemsPrevFilter(a,b.items.filter,b.items.visibleConf.org,c)}function gn_getScrollItemsPrevFilter(a,b,c,d){return gn_getItemsPrevFilter(a,b.items.filter,d,c)}function gn_getItemsPrevFilter(a,b,c,d){for(var e=0,f=0,g=d,h=a.length;g>=0;g--){if(f++,f==h)return f;var i=a.eq(g);if(i.is(b)&&(e++,e==c))return f;0==g&&(g=h)}}function gn_getVisibleOrg(a,b){return b.items.visibleConf.org||a.children().slice(0,b.items.visible).filter(b.items.filter).length}function gn_getVisibleItemsNext(a,b,c){for(var d=0,e=0,f=c,g=a.length-1;g>=f;f++){var h=a.eq(f);if(d+=h.is(":visible")?h[b.d.outerWidth](!0):0,d>b.maxDimension)return e;if(e++,e==g+1)return e;f==g&&(f=-1)}}function gn_getVisibleItemsNextTestCircular(a,b,c,d){var e=gn_getVisibleItemsNext(a,b,c);return b.circular||c+e>d&&(e=d-c),e}function gn_getVisibleItemsNextFilter(a,b,c){return gn_getItemsNextFilter(a,b.items.filter,b.items.visibleConf.org,c,b.circular)}function gn_getScrollItemsNextFilter(a,b,c,d){return gn_getItemsNextFilter(a,b.items.filter,d+1,c,b.circular)-1}function gn_getItemsNextFilter(a,b,c,d,e){for(var f=0,g=0,h=d,i=a.length-1;i>=h;h++){if(g++,g>=i)return g;var j=a.eq(h);if(j.is(b)&&(f++,f==c))return g;h==i&&(h=-1)}}function gi_getCurrentItems(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsPrev(a,b,c){return a.slice(c,b.items.visibleConf.old+c)}function gi_getNewItemsPrev(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsNext(a,b){return a.slice(0,b.items.visibleConf.old)}function gi_getNewItemsNext(a,b,c){return a.slice(c,b.items.visible+c)}function sz_storeMargin(a,b,c){b.usePadding&&(is_string(c)||(c="_cfs_origCssMargin"),a.each(function(){var a=$(this),d=parseInt(a.css(b.d.marginRight),10);is_number(d)||(d=0),a.data(c,d)}))}function sz_resetMargin(a,b,c){if(b.usePadding){var d=is_boolean(c)?c:!1;is_number(c)||(c=0),sz_storeMargin(a,b,"_cfs_tempCssMargin"),a.each(function(){var a=$(this);a.css(b.d.marginRight,d?a.data("_cfs_tempCssMargin"):c+a.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(a){a.each(function(){var a=$(this);a.data("_cfs_origCss",a.attr("style")||"")})}function sz_restoreOrigCss(a){a.each(function(){var a=$(this);a.attr("style",a.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(a,b){var c=(a.items.visible,a.items[a.d.width]),d=a[a.d.height],e=is_percentage(d);b.each(function(){var b=$(this),f=c-ms_getPaddingBorderMargin(b,a,"Width");b[a.d.width](f),e&&b[a.d.height](ms_getPercentage(f,d))})}function sz_setSizes(a,b){var c=a.parent(),d=a.children(),e=gi_getCurrentItems(d,b),f=cf_mapWrapperSizes(ms_getSizes(e,b,!0),b,!1);if(c.css(f),b.usePadding){var g=b.padding,h=g[b.d[1]];b.align&&0>h&&(h=0);var i=e.last();i.css(b.d.marginRight,i.data("_cfs_origCssMargin")+h),a.css(b.d.top,g[b.d[0]]),a.css(b.d.left,g[b.d[3]])}return a.css(b.d.width,f[b.d.width]+2*ms_getTotalSize(d,b,"width")),a.css(b.d.height,ms_getLargestSize(d,b,"height")),b.centerVertically&&a.css("line-height",f.height+"px"),f}function ms_getSizes(a,b,c){return[ms_getTotalSize(a,b,"width",c),ms_getLargestSize(a,b,"height",c)]}function ms_getLargestSize(a,b,c,d){return is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d?b[b.d[c]]:is_number(b.items[b.d[c]])?b.items[b.d[c]]:(c=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(a,b,c))}function ms_getTrueLargestSize(a,b,c){for(var d=0,e=0,f=a.length;f>e;e++){var g=a.eq(e).find(".fusion-carousel-item-wrapper"),h=g.is(":visible")?g[b.d[c]](!0):0;h>d&&(d=h)}return d}function ms_getTotalSize(a,b,c,d){if(is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d)return b[b.d[c]];if(is_number(b.items[b.d[c]]))return b.items[b.d[c]]*a.length;for(var e=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",f=0,g=0,h=a.length;h>g;g++){var i=a.eq(g);f+=i.is(":visible")?i[b.d[e]](!0):0}return f}function ms_getParentSize(a,b,c){var d=a.is(":visible");d&&a.hide();var e=a.parent()[b.d[c]]();return d&&a.show(),e}function ms_getMaxDimension(a,b){return is_number(a[a.d.width])?a[a.d.width]:b}function ms_hasVariableSizes(a,b,c){for(var d=!1,e=!1,f=0,g=a.length;g>f;f++){var h=a.eq(f),i=h.is(":visible")?h[b.d[c]](!0):0;d===!1?d=i:d!=i&&(e=!0),0==d&&(e=!0)}return e}function ms_getPaddingBorderMargin(a,b,c){return a[b.d["outer"+c]](!0)-a[b.d[c.toLowerCase()]]()}function ms_getPercentage(a,b){if(is_percentage(b)){if(b=parseInt(b.slice(0,-1),10),!is_number(b))return a;a*=b/100}return a}function cf_e(a,b,c,d,e){return is_boolean(c)||(c=!0),is_boolean(d)||(d=!0),is_boolean(e)||(e=!1),c&&(a=b.events.prefix+a),d&&(a=a+"."+b.events.namespace),d&&e&&(a+=b.serialNumber),a}function cf_c(a,b){return is_string(b.classnames[a])?b.classnames[a]:a}function cf_mapWrapperSizes(a,b,c){is_boolean(c)||(c=!0);var d=b.usePadding&&c?b.padding:[0,0,0,0],e={};return e[b.d.width]=a[0]+d[1]+d[3],e[b.d.height]=a[1]+d[0]+d[2],e}function cf_sortParams(a,b){for(var c=[],d=0,e=a.length;e>d;d++)for(var f=0,g=b.length;g>f;f++)if(b[f].indexOf(typeof a[d])>-1&&is_undefined(c[f])){c[f]=a[d];break}return c}function cf_getPadding(a){if(is_undefined(a))return[0,0,0,0];if(is_number(a))return[a,a,a,a];if(is_string(a)&&(a=a.split("px").join("").split("em").join("").split(" ")),!is_array(a))return[0,0,0,0];for(var b=0;4>b;b++)a[b]=parseInt(a[b],10);switch(a.length){case 0:return[0,0,0,0];case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];default:return[a[0],a[1],a[2],a[3]]}}function cf_getAlignPadding(a,b){var c=is_number(b[b.d.width])?Math.ceil(b[b.d.width]-ms_getTotalSize(a,b,"width")):0;switch(b.align){case"left":return[0,c];case"right":return[c,0];case"center":default:return[Math.ceil(c/2),Math.floor(c/2)]}}function cf_getDimensions(a){for(var b=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],c=b[0].length,d="right"==a.direction||"left"==a.direction?0:1,e={},f=0;c>f;f++)e[b[0][f]]=b[d][f];return e}function cf_getAdjust(a,b,c,d){var e=a;if(is_function(c))e=c.call(d,e);else if(is_string(c)){var f=c.split("+"),g=c.split("-");if(g.length>f.length)var h=!0,i=g[0],j=g[1];else var h=!1,i=f[0],j=f[1];switch(i){case"even":e=a%2==1?a-1:a;break;case"odd":e=a%2==0?a-1:a;break;default:e=a}j=parseInt(j,10),is_number(j)&&(h&&(j=-j),e+=j)}return(!is_number(e)||1>e)&&(e=1),e}function cf_getItemsAdjust(a,b,c,d){return cf_getItemAdjustMinMax(cf_getAdjust(a,b,c,d),b.items.visibleConf)}function cf_getItemAdjustMinMax(a,b){return is_number(b.min)&&ab.max&&(a=b.max),1>a&&(a=1),a}function cf_getSynchArr(a){is_array(a)||(a=[[a]]),is_array(a[0])||(a=[a]);for(var b=0,c=a.length;c>b;b++)is_string(a[b][0])&&(a[b][0]=$(a[b][0])),is_boolean(a[b][1])||(a[b][1]=!0),is_boolean(a[b][2])||(a[b][2]=!0),is_number(a[b][3])||(a[b][3]=0);return a}function cf_getKeyCode(a){return"right"==a?39:"left"==a?37:"up"==a?38:"down"==a?40:-1}function cf_setCookie(a,b,c){if(a){var d=b.triggerHandler(cf_e("currentPosition",c));$.fn.carouFredSel.cookie.set(a,d)}}function cf_getCookie(a){var b=$.fn.carouFredSel.cookie.get(a);return""==b?0:b}function in_mapCss(a,b){for(var c={},d=0,e=b.length;e>d;d++)c[b[d]]=a.css(b[d]);return c}function in_complementItems(a,b,c,d){return is_object(a.visibleConf)||(a.visibleConf={}),is_object(a.sizesConf)||(a.sizesConf={}),0==a.start&&is_number(d)&&(a.start=d),is_object(a.visible)?(a.visibleConf.min=a.visible.min,a.visibleConf.max=a.visible.max,a.visible=!1):is_string(a.visible)?("variable"==a.visible?a.visibleConf.variable=!0:a.visibleConf.adjust=a.visible,a.visible=!1):is_function(a.visible)&&(a.visibleConf.adjust=a.visible,a.visible=!1),is_string(a.filter)||(a.filter=c.filter(":hidden").length>0?":visible":"*"),a[b.d.width]||(b.responsive?(debug(!0,"Set a "+b.d.width+" for the items!"),a[b.d.width]=ms_getTrueLargestSize(c,b,"outerWidth")):a[b.d.width]=ms_hasVariableSizes(c,b,"outerWidth")?"variable":c[b.d.outerWidth](!0)),a[b.d.height]||(a[b.d.height]=ms_hasVariableSizes(c,b,"outerHeight")?"variable":c[b.d.outerHeight](!0)),a.sizesConf.width=a.width,a.sizesConf.height=a.height,a}function in_complementVisibleItems(a,b){return"variable"==a.items[a.d.width]&&(a.items.visibleConf.variable=!0),a.items.visibleConf.variable||(is_number(a[a.d.width])?a.items.visible=Math.floor(a[a.d.width]/a.items[a.d.width]):(a.items.visible=Math.floor(b/a.items[a.d.width]),a[a.d.width]=a.items.visible*a.items[a.d.width],a.items.visibleConf.adjust||(a.align=!1)),("Infinity"==a.items.visible||a.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),a.items.visibleConf.variable=!0)),a}function in_complementPrimarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerWidth")),a}function in_complementSecondarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerHeight")),a||(a=b.items[b.d.height]),a}function in_getAlignPadding(a,b){var c=cf_getAlignPadding(gi_getCurrentItems(b,a),a);return a.padding[a.d[1]]=c[1],a.padding[a.d[3]]=c[0],a}function in_getResponsiveValues(a,b,c){var d=cf_getItemAdjustMinMax(Math.ceil(a[a.d.width]/a.items[a.d.width]),a.items.visibleConf);d>b.length&&(d=b.length);var e=Math.floor(a[a.d.width]/d);return a.items.visible=d,a.items[a.d.width]=e,a[a.d.width]=d*e,a}function bt_pauseOnHoverConfig(a){if(is_string(a))var b=a.indexOf("immediate")>-1?!0:!1,c=a.indexOf("resume")>-1?!0:!1;else var b=c=!1;return[b,c]}function bt_mousesheelNumber(a){return is_number(a)?a:null}function is_null(a){return null===a}function is_undefined(a){return is_null(a)||"undefined"==typeof a||""===a||"undefined"===a}function is_array(a){return a instanceof Array}function is_jquery(a){return a instanceof jQuery}function is_object(a){return(a instanceof Object||"object"==typeof a)&&!is_null(a)&&!is_jquery(a)&&!is_array(a)&&!is_function(a)}function is_number(a){return(a instanceof Number||"number"==typeof a)&&!isNaN(a)}function is_string(a){return(a instanceof String||"string"==typeof a)&&!is_undefined(a)&&!is_true(a)&&!is_false(a)}function is_function(a){return a instanceof Function||"function"==typeof a}function is_boolean(a){return a instanceof Boolean||"boolean"==typeof a||is_true(a)||is_false(a)}function is_true(a){return a===!0||"true"===a}function is_false(a){return a===!1||"false"===a}function is_percentage(a){return is_string(a)&&"%"==a.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(a,b){debug(!0,a+" is DEPRECATED, support for it will be removed. Use "+b+" instead.")}function debug(a,b){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(a)){var c=" ("+a.selector+")";a=a.debug}else var c="";if(!a)return!1;b=is_string(b)?"carouFredSel"+c+": "+b:["carouFredSel"+c+":",b],window.console.log(b)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(a,b,c){a=go_getObject($tt0,a),a.items=go_getItemsObject($tt0,a.items),a.scroll=go_getScrollObject($tt0,a.scroll),a.auto=go_getAutoObject($tt0,a.auto),a.prev=go_getPrevNextObject($tt0,a.prev),a.next=go_getPrevNextObject($tt0,a.next),a.pagination=go_getPaginationObject($tt0,a.pagination),a.swipe=go_getSwipeObject($tt0,a.swipe),a.mousewheel=go_getMousewheelObject($tt0,a.mousewheel),b&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,a)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,a),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var d=$cfs.children(),e=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,e),opts.items=in_complementItems(opts.items,opts,d,c),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,d),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,d),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(e,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,e)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(d,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(d,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,d,e);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,d),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var a=$cfs.children(),b=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),c="relative";switch(b.position){case"absolute":case"fixed":c=b.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(b),$wrp.css({overflow:"hidden",position:c}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",b.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(a,opts),sz_storeOrigCss(a),opts.responsive&&sz_setResponsiveSizes(opts,a)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(a,b){return a.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),b)),!0}),$cfs.bind(cf_e("finish",conf),function(a){return a.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(a,b,c){if(a.stopPropagation(),tmrs=sc_clearTimers(tmrs),b&&crsl.isScrolling){scrl.isStopped=!0;var d=getTime()-scrl.startTime;scrl.duration-=d,scrl.pre&&(scrl.pre.duration-=d),scrl.post&&(scrl.post.duration-=d),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||c&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var e=opts.auto.timeoutDuration-tmrs.timePassed,f=100-Math.ceil(100*e/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,f,e)}return!0}),$cfs.bind(cf_e("play",conf),function(a,b,c,d){a.stopPropagation(),tmrs=sc_clearTimers(tmrs);var e=[b,c,d],f=["string","number","boolean"],g=cf_sortParams(e,f);if(b=g[0],c=g[1],d=g[2],"prev"!=b&&"next"!=b&&(b=crsl.direction),is_number(c)||(c=0),is_boolean(d)||(d=!1),d&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return a.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var h=opts.auto.timeoutDuration+c;return dur2=h-tmrs.timePassed,perc=100-Math.ceil(100*dur2/h),opts.auto.progress&&(tmrs.progress=setInterval(function(){var a=getTime()-tmrs.startTime+tmrs.timePassed,b=Math.ceil(100*a/h);opts.auto.progress.updater.call(opts.auto.progress.bar[0],b)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),b):$cfs.trigger(cf_e(b,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(a){return a.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(a,b,c,d,e){if(a.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return a.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var f=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(f>itms.total)return a.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+f+" needed): Not scrolling.");var g=[b,c,d,e],h=["object","number/string","function","boolean"],i=cf_sortParams(g,h);b=i[0],c=i[1],d=i[2],e=i[3];var j=a.type.slice(conf.events.prefix.length);if(is_object(b)||(b={}),is_function(d)&&(b.onAfter=d),is_boolean(e)&&(b.queue=e),b=$.extend(!0,{},opts[j],b),b.conditions&&!b.conditions.call($tt0,j))return a.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(c)){if("*"!=opts.items.filter)c="visible";else for(var k=[c,b.items,opts[j].items],i=0,l=k.length;l>i;i++)if(is_number(k[i])||"page"==k[i]||"visible"==k[i]){c=k[i];break}switch(c){case"page":return a.stopImmediatePropagation(), $cfs.triggerHandler(cf_e(j+"Page",conf),[b,d]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(c=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]]),a.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(b.duration>0&&crsl.isScrolling)return b.queue&&("last"==b.queue&&(queu=[]),("first"!=b.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]])),a.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+j,conf),[b,c]),opts.synchronise)for(var m=opts.synchronise,n=[b,c],o=0,l=m.length;l>o;o++){var p=j;m[o][2]||(p="prev"==p?"next":"prev"),m[o][1]||(n[0]=m[o][0].triggerHandler("_cfs_triggerEvent",["configuration",p])),n[1]=c+m[o][3],m[o][0].trigger("_cfs_triggerEvent",["slide_"+p,n])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if(opts.items.visibleConf.variable)c=gn_getVisibleItemsPrev(d,opts,itms.total-1);else if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsPrevFilter(d,opts,itms.total-1,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}if(opts.circular||itms.total-c=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&b.onEnd&&b.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-c,itms.total).prependTo($cfs),itms.totall?opts.padding[opts.d[3]]:0,p=!1,q=$();if(opts.items.visible=0&&sz_resetMargin(j,opts,opts.padding[opts.d[1]]),l>=0&&sz_resetMargin(i,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=m,opts.padding[opts.d[3]]=l),B[opts.d.left]=-(t-o),C[opts.d.left]=-(v-o),x[opts.d.left]=u[opts.d.width];var E=function(){},F=function(){},G=function(){},H=function(){},I=function(){},J=function(){},K=function(){},L=function(){},M=function(){},N=function(){},O=function(){};switch(b.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":s=$cfs.clone(!0).appendTo($wrp)}switch(b.fx){case"crossfade":case"uncover":case"uncover-fade":s.children().slice(0,c).remove(),s.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":s.children().slice(opts.items.visible).remove(),s.css(C)}if($cfs.css(B),scrl=sc_setScroll(D,b.easing,conf),w[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,opts.centerVertically&&(w["line-height"]=u.height+"px"),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(E=function(){$wrp.css(u)},F=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){switch(k.not(i).length&&(y[opts.d.marginRight]=i.data("_cfs_origCssMargin"),0>l?i.css(y):(K=function(){i.css(y)},L=function(){scrl.anims.push([i,y])})),b.fx){case"cover":case"cover-fade":s.children().eq(c-1).css(y)}k.not(j).length&&(z[opts.d.marginRight]=j.data("_cfs_origCssMargin"),G=function(){j.css(z)},H=function(){scrl.anims.push([j,z])}),m>=0&&(A[opts.d.marginRight]=k.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],I=function(){k.css(A)},J=function(){scrl.anims.push([k,A])})}O=function(){$cfs.css(w)};var P=opts.items.visible+c-itms.total;N=function(){if(P>0&&($cfs.children().slice(itms.total).remove(),g=$($cfs.children().slice(itms.total-(opts.items.visible-P)).get().concat($cfs.children().slice(0,P).get()))),sc_showHiddenItems(p),opts.usePadding){var a=$cfs.children().eq(opts.items.visible+c-1);a.css(opts.d.marginRight,a.data("_cfs_origCssMargin"))}};var Q=sc_mapCallbackArguments(g,q,h,c,"prev",D,u);switch(M=function(){sc_afterScroll($cfs,s,b),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,b,"onAfter",Q,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,b,"onBefore",Q,clbk),b.fx){case"none":$cfs.css(w),E(),G(),I(),K(),O(),N(),M();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){E(),G(),I(),K(),O(),N(),scrl=sc_setScroll(D,b.easing,conf),scrl.anims.push([$cfs,{opacity:1},M]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([s,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},M]),F(),G(),I(),K(),O(),N();break;case"cover":scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"uncover":scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;default:scrl.anims.push([$cfs,w,function(){N(),M()}]),F(),H(),J(),L()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,u]),!0}),$cfs.bind(cf_e("slide_next",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsNextFilter(d,opts,0,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}var f=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var g=gn_getVisibleItemsNext(d,opts,c),e=gn_getVisibleItemsPrev(d,opts,f-1);else var g=opts.items.visible,e=opts.items.visible;c+g>f&&(c=f-e)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var g=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(d,opts,c,f),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-c>=g&&cm&&(w[opts.d.left]+=m),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(C=function(){$wrp.css(u)},D=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){var L=l.data("_cfs_origCssMargin");n>=0&&(L+=opts.padding[opts.d[1]]),l.css(opts.d.marginRight,L),j.not(k).length&&(z[opts.d.marginRight]=k.data("_cfs_origCssMargin")),E=function(){k.css(z)},F=function(){scrl.anims.push([k,z])};var M=j.data("_cfs_origCssMargin");m>0&&(M+=opts.padding[opts.d[3]]),y[opts.d.marginRight]=M,G=function(){j.css(y)},H=function(){scrl.anims.push([j,y])}}K=function(){$cfs.css(A)};var N=opts.items.visible+c-itms.total;J=function(){N>0&&$cfs.children().slice(itms.total).remove();var a=$cfs.children().slice(0,c).appendTo($cfs).last();if(N>0&&(i=gi_getCurrentItems(d,opts)),sc_showHiddenItems(p),opts.usePadding){if(itms.totalb?"next":"prev"),"prev"==f&&(b=itms.total-b),$cfs.trigger(cf_e(f,conf),[e,b,g]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d-1,b,"prev",c])}),$cfs.bind(cf_e("nextPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d+1,b,"next",c])}),$cfs.bind(cf_e("slideToPage",conf),function(a,b,c,d,e){a.stopPropagation(),is_number(b)||(b=$cfs.triggerHandler(cf_e("currentPage",conf)));var f=opts.pagination.items||opts.items.visible,g=Math.ceil(itms.total/f)-1;return 0>b&&(b=g),b>g&&(b=0),$cfs.triggerHandler(cf_e("slideTo",conf),[b*f,0,!0,c,d,e])}),$cfs.bind(cf_e("jumpToStart",conf),function(a,b){if(a.stopPropagation(),b=b?gn_getItemIndex(b,0,!0,itms,$cfs):0,b+=itms.first,0!=b){if(itms.total>0)for(;b>itms.total;)b-=itms.total;$cfs.prepend($cfs.children().slice(b,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(a,b){if(a.stopPropagation(),b)b=cf_getSynchArr(b);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");b=opts.synchronise}for(var c=$cfs.triggerHandler(cf_e("currentPosition",conf)),d=!0,e=0,f=b.length;f>e;e++)b[e][0].triggerHandler(cf_e("slideTo",conf),[c,b[e][3],!0])||(d=!1);return d}),$cfs.bind(cf_e("queue",conf),function(a,b,c){return a.stopPropagation(),is_function(b)?b.call($tt0,queu):is_array(b)?queu=b:is_undefined(b)||queu.push([b,c]),queu}),$cfs.bind(cf_e("insertItem",conf),function(a,b,c,d,e){a.stopPropagation();var f=[b,c,d,e],g=["string/object","string/number/object","boolean","number"],h=cf_sortParams(f,g);if(b=h[0],c=h[1],d=h[2],e=h[3],is_object(b)&&!is_jquery(b)?b=$(b):is_string(b)&&(b=$(b)),!is_jquery(b)||0==b.length)return debug(conf,"Not a valid object.");is_undefined(c)&&(c="end"),sz_storeMargin(b,opts),sz_storeOrigCss(b);var i=c,j="before";"end"==c?d?(0==itms.first?(c=itms.total-1,j="after"):(c=itms.first,itms.first+=b.length),0>c&&(c=0)):(c=itms.total-1,j="after"):c=gn_getItemIndex(c,e,d,itms,$cfs);var k=$cfs.children().eq(c);return k.length?k[j](b):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(b)),"end"==i||d||c=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(a,b,c,d){a.stopPropagation();var e=[b,c,d],f=["string/number/object","boolean","number"],g=cf_sortParams(e,f);b=g[0],c=g[1],d=g[2];if(b instanceof $&&b.length>1)return h=$(),b.each(function(a,b){var e=$cfs.trigger(cf_e("removeItem",conf),[$(this),c,d]);e&&(h=h.add(e))}),h;if(is_undefined(b)||"end"==b)h=$cfs.children().last();else{b=gn_getItemIndex(b,d,c,itms,$cfs);var h=$cfs.children().eq(b);h.length&&bc&&(c=0),c>e&&(c=e),is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("currentVisible",conf),function(a,b){a.stopPropagation();var c=gi_getCurrentItems($cfs.children(),opts);return is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("slice",conf),function(a,b,c,d){if(a.stopPropagation(),0==itms.total)return!1;var e=[b,c,d],f=["number","number","function"],g=cf_sortParams(e,f);if(b=is_number(g[0])?g[0]:0,c=is_number(g[1])?g[1]:itms.total,d=g[2],b+=itms.first,c+=itms.first,items.total>0){for(;b>itms.total;)b-=itms.total;for(;c>itms.total;)c-=itms.total;for(;0>b;)b+=itms.total;for(;0>c;)c+=itms.total}var h,i=$cfs.children();return h=c>b?i.slice(b,c):$(i.slice(b,itms.total).get().concat(i.slice(0,c).get())),is_function(d)&&d.call($tt0,h),h}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(a,b){a.stopPropagation();var c=a.type.slice(conf.events.prefix.length),d=crsl[c];return is_function(b)&&b.call($tt0,d),d}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(a,b,c){return a.stopPropagation(),is_undefined(b)?b=$("body"):is_string(b)&&(b=$(b)),is_jquery(b)&&0!=b.length?(is_string(c)||(c="a.caroufredsel"),b.find(c).each(function(){var a=this.hash||"";a.length>0&&-1!=$cfs.children().index($(a))&&$(this).unbind("click").click(function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),a)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(a,b,c){if(a.stopPropagation(),opts.pagination.container){var d=opts.pagination.items||opts.items.visible,e=Math.ceil(itms.total/d);b&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var a=0;e>a;a++){var b=$cfs.children().eq(gn_getItemIndex(a*d,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(b[0],a+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(a){$(this).bind(opts.pagination.event,function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[a*d,-opts.pagination.deviation,!0,opts.pagination])})})}));var f=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return f>=e&&(f=0),0>f&&(f=e-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(f).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(a){var b=opts.items.visible,c=$cfs.children(),d=ms_getParentSize($wrp,opts,"width");if(itms.total=c.length,crsl.primarySizePercentage?(opts.maxDimension=d,opts[opts.d.width]=ms_getPercentage(d,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,d),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,c,d),b=opts.items.visible,sz_setResponsiveSizes(opts,c)):opts.items.visibleConf.variable?b=gn_getVisibleItemsNext(c,opts,0):"*"!=opts.items.filter&&(b=gn_getVisibleItemsNextFilter(c,opts,0)),!opts.circular&&0!=itms.first&&b>itms.first){if(opts.items.visibleConf.variable)var e=gn_getVisibleItemsPrev(c,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var e=gn_getVisibleItemsPrevFilter(c,opts,itms.first)-itms.first;else var e=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+e+" items backward."),$cfs.trigger(cf_e("prev",conf),e)}opts.items.visible=cf_getItemsAdjust(b,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,c);var f=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,f]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),f}),$cfs.bind(cf_e("destroy",conf),function(a,b){return a.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),b&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(a){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(a,b,c){return a.stopPropagation(),$cfs.triggerHandler(cf_e(b,conf),c)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(a){a.preventDefault();var b=!1,c=null;crsl.isPaused?b="play":opts.auto.pauseOnEvent&&(b="pause",c=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),b&&$cfs.trigger(cf_e(b,conf),c)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b==opts.next.key&&(a.preventDefault(),$cfs.trigger(cf_e("next",conf))),b==opts.prev.key&&(a.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b>=49&&58>b&&(b=(b-49)*opts.items.visible,b<=itms.total&&(a.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[b,0,!0,opts.pagination])))}),$.fn.swipe){var b="ontouchstart"in window;if(b&&opts.swipe.onTouch||!b&&opts.swipe.onMouse){var c=$.extend(!0,{},opts.prev,opts.swipe),d=$.extend(!0,{},opts.next,opts.swipe),e=function(){$cfs.trigger(cf_e("prev",conf),[c])},f=function(){$cfs.trigger(cf_e("next",conf),[d])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=f,opts.swipe.options.swipeDown=e;break;default:opts.swipe.options.swipeLeft=f,opts.swipe.options.swipeRight=e}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var g=$.extend(!0,{},opts.prev,opts.mousewheel),h=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(a,b){a.preventDefault(),b>0?$cfs.trigger(cf_e("prev",conf),[g]):$cfs.trigger(cf_e("next",conf),[h])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var i=function(a){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},j=$(window),k=null;if($.debounce&&"debounce"==conf.onWindowResize)k=$.debounce(200,i);else if($.throttle&&"throttle"==conf.onWindowResize)k=$.throttle(300,i);else{var l=0,m=0;k=function(){var a=j.width(),b=j.height();(a!=l||b!=m)&&(i(),l=a,m=b)}}j.bind(cf_e("resize",conf,!1,!0,!0),k)}},FN._unbind_buttons=function(){var a=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(a),opts.auto.button&&opts.auto.button.unbind(a),opts.prev.button&&opts.prev.button.unbind(a),opts.next.button&&opts.next.button.unbind(a),opts.pagination.container&&(opts.pagination.container.unbind(a),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,s.length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,centerVertically:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(a){return''+a+""},$.fn.carouFredSel.progressbarUpdater=function(a){$(this).css("width",a+"%")},$.fn.carouFredSel.cookie={get:function(a){a+="=";for(var b=document.cookie.split(";"),c=0,d=b.length;d>c;c++){for(var e=b[c];" "==e.charAt(0);)e=e.slice(1);if(0==e.indexOf(a))return e.slice(a.length)}return 0},set:function(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toGMTString()}document.cookie=a+"="+b+d+"; path=/"},remove:function(a){$.fn.carouFredSel.cookie.set(a,"",-1)}},$.extend($.easing,{quadratic:function(a){var b=a*a;return a*(-b*a+4*b-6*a+4)},cubic:function(a){return a*(4*a*a-9*a+6)},elastic:function(a){var b=a*a;return a*(33*b*b-106*b*a+126*b-67*a+15)}}))}(jQuery),function(a){function b(a,b){return a.toFixed(b.decimals)}a.fn.countTo=function(b){return b=b||{},a(this).each(function(){function c(){k+=g,j++,d(k),"function"==typeof e.onUpdate&&e.onUpdate.call(h,k),j>=f&&(i.removeData("countTo"),clearInterval(l.interval),k=e.to,"function"==typeof e.onComplete&&e.onComplete.call(h,k))}function d(a){var b=e.formatter.call(h,a,e);i.text(b)}var e=a.extend({},a.fn.countTo.defaults,{from:a(this).data("from"),to:a(this).data("to"),speed:a(this).data("speed"),refreshInterval:a(this).data("refresh-interval"),decimals:a(this).data("decimals")},b),f=Math.ceil(e.speed/e.refreshInterval),g=(e.to-e.from)/f,h=this,i=a(this),j=0,k=e.from,l=i.data("countTo")||{};i.data("countTo",l),l.interval&&clearInterval(l.interval),l.interval=setInterval(c,e.refreshInterval),d(k)})},a.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:b,onUpdate:null,onComplete:null}}(jQuery),function(a,b){"use strict";function c(b){a.fn.cycle.debug&&d(b)}function d(){window.console&&console.log}function e(b,c,d){var e=a(b).data("cycle.opts");if(e){var f=!!b.cyclePause;f&&e.paused?e.paused(b,e,c,d):!f&&e.resumed&&e.resumed(b,e,c,d)}}function f(c,f,g){function i(b,c,e){if(!b&&c===!0){var f=a(e).data("cycle.opts");if(!f)return d("options not found, can not resume"),!1;e.cycleTimeout&&(clearTimeout(e.cycleTimeout),e.cycleTimeout=0),m(f.elements,f,1,!f.backwards)}}if(c.cycleStop===b&&(c.cycleStop=0),(f===b||null===f)&&(f={}),f.constructor==String){switch(f){case"destroy":case"stop":var j=a(c).data("cycle.opts");return j?(c.cycleStop++,c.cycleTimeout&&clearTimeout(c.cycleTimeout),c.cycleTimeout=0,j.elements&&a(j.elements).stop(),a(c).removeData("cycle.opts"),"destroy"==f&&h(c,j),!1):!1;case"toggle":return c.cyclePause=1===c.cyclePause?0:1,i(c.cyclePause,g,c),e(c),!1;case"pause":return c.cyclePause=1,e(c),!1;case"resume":return c.cyclePause=0,i(!1,g,c),e(c),!1;case"prev":case"next":return(j=a(c).data("cycle.opts"))?("string"==typeof g&&(j.oneTimeFx=g),a.fn.cycle[f](j),!1):(d('options not found, "prev/next" ignored'),!1);default:f={fx:f}}return f}if(f.constructor==Number){var k=f;return(f=a(c).data("cycle.opts"))?0>k||k>=f.elements.length?(d("invalid slide index: "+k),!1):(f.nextSlide=k,c.cycleTimeout&&(clearTimeout(c.cycleTimeout),c.cycleTimeout=0),"string"==typeof g&&(f.oneTimeFx=g),m(f.elements,f,1,k>=f.currSlide),!1):(d("options not found, can not advance slide"),!1)}return f}function g(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(d){}}function h(b,c){c.next&&a(c.next).unbind(c.prevNextEvent),c.prev&&a(c.prev).unbind(c.prevNextEvent),(c.pager||c.pagerAnchorBuilder)&&a.each(c.pagerAnchors||[],function(){this.unbind().remove()}),c.pagerAnchors=null,a(b).unbind("mouseenter.cycle mouseleave.cycle"),c.destroy&&c.destroy(c); }function i(c,f,h,i,n){var r,s=a.extend({},a.fn.cycle.defaults,i||{},a.metadata?c.metadata():a.meta?c.data():{}),t=a.isFunction(c.data)?c.data(s.metaAttr):null;t&&(s=a.extend(s,t)),s.autostop&&(s.countdown=s.autostopCount||h.length);var u=c[0];if(c.data("cycle.opts",s),s.$cont=c,s.stopCount=u.cycleStop,s.elements=h,s.before=s.before?[s.before]:[],s.after=s.after?[s.after]:[],!a.support.opacity&&s.cleartype&&s.after.push(function(){g(this,s)}),s.continuous&&s.after.push(function(){m(h,s,0,!s.backwards)}),j(s),a.support.opacity||!s.cleartype||s.cleartypeNoBg||q(f),"static"==c.css("position")&&c.css("position","relative"),s.width&&c.width(s.width),s.height&&"auto"!=s.height&&c.height(s.height),s.startingSlide!==b?(s.startingSlide=parseInt(s.startingSlide,10),s.startingSlide>=h.length||s.startSlide<0?s.startingSlide=0:r=!0):s.backwards?s.startingSlide=h.length-1:s.startingSlide=0,s.random){s.randomMap=[];for(var v=0;v=h.length&&(s.startingSlide=0);s.currSlide=s.startingSlide||0;var x=s.startingSlide;f.css({position:"absolute",top:0,left:0}).hide().each(function(b){var c;c=s.backwards?x?x>=b?h.length+(b-x):x-b:h.length-b:x?b>=x?h.length-(b-x):x-b:h.length-b,a(this).css("z-index",c)}),a(h[x]).css("opacity",1).show(),g(h[x],s),s.fit&&(s.aspect?f.each(function(){var b=a(this),c=s.aspect===!0?b.width()/b.height():s.aspect;s.width&&b.width()!=s.width&&(b.width(s.width),b.height(s.width/c)),s.height&&b.height()z?E:z,A=F>A?F:A}s.containerResize&&z>0&&A>0&&c.animate({width:z+"px",height:A+"px"}),s.containerResizeHeight&&A>0&&c.animate({height:A+"px"})}var G=!1;if(s.pause&&c.bind("mouseenter.cycle",function(){G=!0,this.cyclePause++,e(u,!0)}).bind("mouseleave.cycle",function(){G&&this.cyclePause--,e(u,!0)}),k(s)===!1)return!1;var H=!1;if(i.requeueAttempts=i.requeueAttempts||0,f.each(function(){var b=a(this);if(this.cycleH=s.fit&&s.height?s.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0,this.cycleW=s.fit&&s.width?s.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0,b.is("img")){var c=0===this.cycleH&&0===this.cycleW&&!this.complete;if(c){if(n.s&&s.requeueOnImageNotLoaded&&++i.requeueAttempts<100)return d(i.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){a(n.s,n.c).cycle(i)},s.requeueTimeout),H=!0,!1;d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0}),H)return!1;if(s.cssBefore=s.cssBefore||{},s.cssAfter=s.cssAfter||{},s.cssFirst=s.cssFirst||{},s.animIn=s.animIn||{},s.animOut=s.animOut||{},f.not(":eq("+x+")").css(s.cssBefore),a(f[x]).css(s.cssFirst),s.timeout){s.timeout=parseInt(s.timeout,10),s.speed.constructor==String&&(s.speed=a.fx.speeds[s.speed]||parseInt(s.speed,10)),s.sync||(s.speed=s.speed/2);for(var I="none"==s.fx?0:"shuffle"==s.fx?500:250;s.timeout-s.speed=h.length-1?0:s.startingSlide+1,!s.multiFx){var J=a.fn.cycle.transitions[s.fx];if(a.isFunction(J))J(c,f,s);else if("custom"!=s.fx&&!s.multiFx)return d("unknown transition: "+s.fx,"; slideshow terminating"),!1}var K=f[x];return s.skipInitializationCallbacks||(s.before.length&&s.before[0].apply(K,[K,K,s,!0]),s.after.length&&s.after[0].apply(K,[K,K,s,!0])),s.next&&a(s.next).bind(s.prevNextEvent,function(){return o(s,1)}),s.prev&&a(s.prev).bind(s.prevNextEvent,function(){return o(s,0)}),(s.pager||s.pagerAnchorBuilder)&&p(h,s),l(s,h),s}function j(b){b.original={before:[],after:[]},b.original.cssBefore=a.extend({},b.cssBefore),b.original.cssAfter=a.extend({},b.cssAfter),b.original.animIn=a.extend({},b.animIn),b.original.animOut=a.extend({},b.animOut),a.each(b.before,function(){b.original.before.push(this)}),a.each(b.after,function(){b.original.after.push(this)})}function k(b){var e,f,g=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){for(b.multiFx=!0,b.fxs=b.fx.replace(/\s*/g,"").split(","),e=0;ee;e++){var k=Math.floor(Math.random()*b.fxs.length);b.fxs.push(b.fxs.splice(k,1)[0])}c("randomized fx sequence: ",b.fxs)}return!0}function l(b,c){b.addSlide=function(d,e){var f=a(d),g=f[0];b.autostopCount||b.countdown++,c[e?"unshift":"push"](g),b.els&&b.els[e?"unshift":"push"](g),b.slideCount=c.length,b.random&&(b.randomMap.push(b.slideCount-1),b.randomMap.sort(function(a,b){return Math.random()-.5})),f.css("position","absolute"),f[e?"prependTo":"appendTo"](b.$cont),e&&(b.currSlide++,b.nextSlide++),a.support.opacity||!b.cleartype||b.cleartypeNoBg||q(f),b.fit&&b.width&&f.width(b.width),b.fit&&b.height&&"auto"!=b.height&&f.height(b.height),g.cycleH=b.fit&&b.height?b.height:f.height(),g.cycleW=b.fit&&b.width?b.width:f.width(),f.css(b.cssBefore),(b.pager||b.pagerAnchorBuilder)&&a.fn.cycle.createPagerAnchor(c.length-1,g,a(b.pager),c,b),a.isFunction(b.onAddSlide)?b.onAddSlide(f):f.hide()}}function m(d,e,f,g){function h(){var a=0;e.timeout;e.timeout&&!e.continuous?(a=n(d[e.currSlide],d[e.nextSlide],e,g),"shuffle"==e.fx&&(a-=e.speedOut)):e.continuous&&i.cyclePause&&(a=10),a>0&&(i.cycleTimeout=setTimeout(function(){m(d,e,0,!e.backwards)},a))}var i=e.$cont[0],j=d[e.currSlide],k=d[e.nextSlide];if(f&&e.busy&&e.manualTrump&&(c("manualTrump in go(), stopping active transition"),a(d).stop(!0,!0),e.busy=0,clearTimeout(i.cycleTimeout)),e.busy)return void c("transition active, ignoring new tx request");if(i.cycleStop==e.stopCount&&(0!==i.cycleTimeout||f)){if(!f&&!i.cyclePause&&!e.bounce&&(e.autostop&&--e.countdown<=0||e.nowrap&&!e.random&&e.nextSlide=e.fxs.length)?e.lastFx=0:!g&&(e.lastFx===b||--e.lastFx<0)&&(e.lastFx=e.fxs.length-1),o=e.fxs[e.lastFx]),e.oneTimeFx&&(o=e.oneTimeFx,e.oneTimeFx=null),a.fn.cycle.resetState(e,o),e.before.length&&a.each(e.before,function(a,b){i.cycleStop==e.stopCount&&b.apply(k,[j,k,e,g])});var p=function(){e.busy=0,a.each(e.after,function(a,b){i.cycleStop==e.stopCount&&b.apply(k,[j,k,e,g])}),i.cycleStop||h()};c("tx firing("+o+"); currSlide: "+e.currSlide+"; nextSlide: "+e.nextSlide),e.busy=1,e.fxFn?e.fxFn(j,k,e,p,g,f&&e.fastOnEvent):a.isFunction(a.fn.cycle[e.fx])?a.fn.cycle[e.fx](j,k,e,p,g,f&&e.fastOnEvent):a.fn.cycle.custom(j,k,e,p,g,f&&e.fastOnEvent)}if(l||e.nextSlide==e.currSlide){var q;e.lastSlide=e.currSlide,e.random?(e.currSlide=e.nextSlide,++e.randomIndex==d.length&&(e.randomIndex=0,e.randomMap.sort(function(a,b){return Math.random()-.5})),e.nextSlide=e.randomMap[e.randomIndex],e.nextSlide==e.currSlide&&(e.nextSlide=e.currSlide==e.slideCount-1?0:e.currSlide+1)):e.backwards?(q=e.nextSlide-1<0,q&&e.bounce?(e.backwards=!e.backwards,e.nextSlide=1,e.currSlide=0):(e.nextSlide=q?d.length-1:e.nextSlide-1,e.currSlide=q?0:e.nextSlide+1)):(q=e.nextSlide+1==d.length,q&&e.bounce?(e.backwards=!e.backwards,e.nextSlide=d.length-2,e.currSlide=d.length-1):(e.nextSlide=q?0:e.nextSlide+1,e.currSlide=q?d.length-1:e.nextSlide-1))}l&&e.pager&&e.updateActivePagerLink(e.pager,e.currSlide,e.activePagerClass)}}function n(a,b,d,e){if(d.timeoutFn){for(var f=d.timeoutFn.call(a,a,b,d,e);"none"!=d.fx&&f-d.speed<250;)f+=d.speed;if(c("calculated timeout: "+f+"; speed: "+d.speed),f!==!1)return f}return d.timeout}function o(b,c){var d=c?1:-1,e=b.elements,f=b.$cont[0],g=f.cycleTimeout;if(g&&(clearTimeout(g),f.cycleTimeout=0),b.random&&0>d)b.randomIndex--,-2==--b.randomIndex?b.randomIndex=e.length-2:-1==b.randomIndex&&(b.randomIndex=e.length-1),b.nextSlide=b.randomMap[b.randomIndex];else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else if(b.nextSlide=b.currSlide+d,b.nextSlide<0){if(b.nowrap)return!1;b.nextSlide=e.length-1}else if(b.nextSlide>=e.length){if(b.nowrap)return!1;b.nextSlide=0}var h=b.onPrevNextEvent||b.prevNextClick;return a.isFunction(h)&&h(d>0,b.nextSlide,e[b.nextSlide]),m(e,b,1,c),!1}function p(b,c){var d=a(c.pager);a.each(b,function(e,f){a.fn.cycle.createPagerAnchor(e,f,d,b,c)}),c.updateActivePagerLink(c.pager,c.startingSlide,c.activePagerClass)}function q(b){function d(a){return a=parseInt(a,10).toString(16),a.length<2?"0"+a:a}function e(b){for(;b&&"html"!=b.nodeName.toLowerCase();b=b.parentNode){var c=a.css(b,"background-color");if(c&&c.indexOf("rgb")>=0){var e=c.match(/\d+/g);return"#"+d(e[0])+d(e[1])+d(e[2])}if(c&&"transparent"!=c)return c}return"#ffffff"}c("applying clearType background-color hack"),b.each(function(){a(this).css("background-color",e(this))})}var r="3.0.3";a.expr[":"].paused=function(a){return a.cyclePause},a.fn.cycle=function(b,e){var g={s:this.selector,c:this.context};return 0===this.length&&"stop"!=b?!a.isReady&&g.s?(d("DOM not ready, queuing slideshow"),a(function(){a(g.s,g.c).cycle(b,e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this):this.each(function(){var h=f(this,b,e);if(h!==!1){h.updateActivePagerLink=h.updateActivePagerLink||a.fn.cycle.updateActivePagerLink,this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0,this.cycleStop=0;var j=a(this),k=h.slideExpr?a(h.slideExpr,this):j.children(),l=k.get();if(l.length<2)return void d("terminating; too few slides: "+l.length);var o=i(j,k,l,h,g);if(o!==!1){var p=o.continuous?10:n(l[o.currSlide],l[o.nextSlide],o,!o.backwards);p&&(p+=o.delay||0,10>p&&(p=10),c("first timeout: "+p),this.cycleTimeout=setTimeout(function(){m(l,o,0,!h.backwards)},p))}}})},a.fn.cycle.resetState=function(b,c){c=c||b.fx,b.before=[],b.after=[],b.cssBefore=a.extend({},b.original.cssBefore),b.cssAfter=a.extend({},b.original.cssAfter),b.animIn=a.extend({},b.original.animIn),b.animOut=a.extend({},b.original.animOut),b.fxFn=null,a.each(b.original.before,function(){b.before.push(this)}),a.each(b.original.after,function(){b.after.push(this)});var d=a.fn.cycle.transitions[c];a.isFunction(d)&&d(b.$cont,a(b.elements),b)},a.fn.cycle.updateActivePagerLink=function(b,c,d){a(b).each(function(){a(this).children().removeClass(d).eq(c).addClass(d)})},a.fn.cycle.next=function(a){o(a,1)},a.fn.cycle.prev=function(a){o(a,0)},a.fn.cycle.createPagerAnchor=function(b,d,f,g,h){var i;if(a.isFunction(h.pagerAnchorBuilder)?(i=h.pagerAnchorBuilder(b,d),c("pagerAnchorBuilder("+b+", el) returned: "+i)):i='',i){var j=a(i);if(0===j.parents("body").length){var k=[];f.length>1?(f.each(function(){var b=j.clone(!0);a(this).append(b),k.push(b[0])}),j=a(k)):j.appendTo(f)}h.pagerAnchors=h.pagerAnchors||[],h.pagerAnchors.push(j);var l=function(c){c.preventDefault(),h.nextSlide=b;var d=h.$cont[0],e=d.cycleTimeout;e&&(clearTimeout(e),d.cycleTimeout=0);var f=h.onPagerEvent||h.pagerClick;a.isFunction(f)&&f(h.nextSlide,g[h.nextSlide]),m(g,h,1,h.currSlided?e-d:a.slideCount-d:d>e?d-e:d+a.slideCount-e},a.fn.cycle.commonReset=function(b,c,d,e,f,g){a(d.elements).not(b).hide(),"undefined"==typeof d.cssBefore.opacity&&(d.cssBefore.opacity=1),d.cssBefore.display="block",d.slideResize&&e!==!1&&c.cycleW>0&&(d.cssBefore.width=c.cycleW),d.slideResize&&f!==!1&&c.cycleH>0&&(d.cssBefore.height=c.cycleH),d.cssAfter=d.cssAfter||{},d.cssAfter.display="none",a(b).css("zIndex",d.slideCount+(g===!0?1:0)),a(c).css("zIndex",d.slideCount+(g===!0?0:1))},a.fn.cycle.custom=function(b,c,d,e,f,g){var h=a(b),i=a(c),j=d.speedIn,k=d.speedOut,l=d.easeIn,m=d.easeOut,n=d.animInDelay,o=d.animOutDelay;i.css(d.cssBefore),g&&(j=k="number"==typeof g?g:1,l=m=null);var p=function(){i.delay(n).animate(d.animIn,j,l,function(){e()})};h.delay(o).animate(d.animOut,k,m,function(){h.css(d.cssAfter),d.sync||p()}),d.sync&&p()},a.fn.cycle.transitions={fade:function(b,c,d){c.not(":eq("+d.currSlide+")").css("opacity",0),d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.cssBefore.opacity=0}),d.animIn={opacity:1},d.animOut={opacity:0},d.cssBefore={top:0,left:0}}},a.fn.cycle.ver=function(){return r},a.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!a.support.opacity,cleartypeNoBg:!1,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:b,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}}(jQuery),function(a){"use strict";a.fn.cycle.transitions.none=function(b,c,d){d.fxFn=function(b,c,d,e){a(c).show(),a(b).hide(),e()}},a.fn.cycle.transitions.fadeout=function(b,c,d){c.not(":eq("+d.currSlide+")").css({display:"block",opacity:1}),d.before.push(function(b,c,d,e,f,g){a(b).css("zIndex",d.slideCount+(g!==!0?1:0)),a(c).css("zIndex",d.slideCount+(g!==!0?0:1))}),d.animIn.opacity=1,d.animOut.opacity=0,d.cssBefore.opacity=1,d.cssBefore.display="block",d.cssAfter.zIndex=0},a.fn.cycle.transitions.scrollUp=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssBefore.top=e,d.cssBefore.left=0,d.cssFirst.top=0,d.animIn.top=0,d.animOut.top=-e},a.fn.cycle.transitions.scrollDown=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssFirst.top=0,d.cssBefore.top=-e,d.cssBefore.left=0,d.animIn.top=0,d.animOut.top=e},a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst.left=0,d.cssBefore.left=e,d.cssBefore.top=0,d.animIn.left=0,d.animOut.left=0-e},a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst.left=0,d.cssBefore.left=-e,d.cssBefore.top=0,d.animIn.left=0,d.animOut.left=e},a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width(),d.before.push(function(b,c,d,e){d.rev&&(e=!e),a.fn.cycle.commonReset(b,c,d),d.cssBefore.left=e?c.cycleW-1:1-c.cycleW,d.animOut.left=e?-b.cycleW:b.cycleW}),d.cssFirst.left=0,d.cssBefore.top=0,d.animIn.left=0,d.animOut.top=0},a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden"),d.before.push(function(b,c,d,e){d.rev&&(e=!e),a.fn.cycle.commonReset(b,c,d),d.cssBefore.top=e?1-c.cycleH:c.cycleH-1,d.animOut.top=e?b.cycleH:-b.cycleH}),d.cssFirst.top=0,d.cssBefore.left=0,d.animIn.top=0,d.animOut.left=0},a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide(),a.fn.cycle.commonReset(b,c,d,!1,!0),d.animIn.width=c.cycleW}),d.cssBefore.left=0,d.cssBefore.top=0,d.cssBefore.width=0,d.animIn.width="show",d.animOut.width=0},a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide(),a.fn.cycle.commonReset(b,c,d,!0,!1),d.animIn.height=c.cycleH}),d.cssBefore.left=0,d.cssBefore.top=0,d.cssBefore.height=0,d.animIn.height="show",d.animOut.height=0},a.fn.cycle.transitions.shuffle=function(b,c,d){var e,f=b.css("overflow","visible").width();for(c.css({left:0,top:0}),d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0)}),d.speedAdjusted||(d.speed=d.speed/2,d.speedAdjusted=!0),d.random=0,d.shuffle=d.shuffle||{left:-f,top:15},d.els=[],e=0;ei;i++)f?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(f)for(var j=0,k=d.els.length;k>j;j++)a(d.els[j]).css("z-index",k-j+h);else{var l=a(b).css("z-index");g.css("z-index",parseInt(l,10)+1+h)}g.animate({left:0,top:0},d.speedOut,d.easeOut,function(){a(f?this:b).hide(),e&&e()})})},a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0})},a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.cssBefore.top=c.cycleH,d.animIn.height=c.cycleH,d.animOut.width=c.cycleW}),d.cssFirst.top=0,d.cssBefore.left=0,d.cssBefore.height=0,d.animIn.top=0,d.animOut.height=0},a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssFirst.top=0,d.cssBefore.left=0,d.cssBefore.top=0,d.cssBefore.height=0,d.animOut.height=0},a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.cssBefore.left=c.cycleW,d.animIn.width=c.cycleW}),d.cssBefore.top=0,d.cssBefore.width=0,d.animIn.left=0,d.animOut.width=0},a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.animIn.width=c.cycleW,d.animOut.left=b.cycleW}),a.extend(d.cssBefore,{top:0,left:0,width:0}),d.animIn.left=0,d.animOut.width=0},a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!1,!0),d.cssBefore.top=c.cycleH/2,d.cssBefore.left=c.cycleW/2,a.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH}),a.extend(d.animOut,{width:0,height:0,top:b.cycleH/2,left:b.cycleW/2})}),d.cssFirst.top=0,d.cssFirst.left=0,d.cssBefore.width=0,d.cssBefore.height=0},a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!1),d.cssBefore.left=c.cycleW/2,d.cssBefore.top=c.cycleH/2,a.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH})}),d.cssBefore.width=0,d.cssBefore.height=0,d.animOut.opacity=0},a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.width=c.cycleW,d.animOut.left=b.cycleW}),d.cssBefore.left=e,d.cssBefore.top=0,d.animIn.left=0,d.animOut.left=e},a.fn.cycle.transitions.blindY=function(b,c,d){var e=b.css("overflow","hidden").height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssBefore.top=e,d.cssBefore.left=0,d.animIn.top=0,d.animOut.top=e},a.fn.cycle.transitions.blindZ=function(b,c,d){var e=b.css("overflow","hidden").height(),f=b.width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssBefore.top=e,d.cssBefore.left=f,d.animIn.top=0,d.animIn.left=0,d.animOut.top=e,d.animOut.left=f},a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.cssBefore.left=this.cycleW/2,d.animIn.left=0,d.animIn.width=this.cycleW,d.animOut.left=0}),d.cssBefore.top=0,d.cssBefore.width=0},a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.cssBefore.top=this.cycleH/2,d.animIn.top=0,d.animIn.height=this.cycleH,d.animOut.top=0}),d.cssBefore.height=0,d.cssBefore.left=0},a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0,!0),d.cssBefore.left=c.cycleW/2,d.animIn.left=0,d.animIn.width=this.cycleW,d.animOut.left=b.cycleW/2,d.animOut.width=0}),d.cssBefore.top=0,d.cssBefore.width=0},a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1,!0),d.cssBefore.top=c.cycleH/2,d.animIn.top=0,d.animIn.height=c.cycleH,d.animOut.top=b.cycleH/2,d.animOut.height=0}),d.cssBefore.height=0,d.cssBefore.left=0},a.fn.cycle.transitions.cover=function(b,c,d){var e=d.direction||"left",f=b.css("overflow","hidden").width(),g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.cssAfter.display="","right"==e?d.cssBefore.left=-f:"up"==e?d.cssBefore.top=g:"down"==e?d.cssBefore.top=-g:d.cssBefore.left=f}),d.animIn.left=0,d.animIn.top=0,d.cssBefore.top=0,d.cssBefore.left=0},a.fn.cycle.transitions.uncover=function(b,c,d){var e=d.direction||"left",f=b.css("overflow","hidden").width(),g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0),"right"==e?d.animOut.left=f:"up"==e?d.animOut.top=-g:"down"==e?d.animOut.top=g:d.animOut.left=-f}),d.animIn.left=0,d.animIn.top=0,d.cssBefore.top=0,d.cssBefore.left=0},a.fn.cycle.transitions.toss=function(b,c,d){var e=b.css("overflow","visible").width(),f=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0),d.animOut.left||d.animOut.top?d.animOut.opacity=0:a.extend(d.animOut,{left:2*e,top:-f/2,opacity:0})}),d.cssBefore.left=0,d.cssBefore.top=0,d.animIn.left=0},a.fn.cycle.transitions.wipe=function(b,c,d){var e=b.css("overflow","hidden").width(),f=b.height();d.cssBefore=d.cssBefore||{};var g;if(d.clip)if(/l2r/.test(d.clip))g="rect(0px 0px "+f+"px 0px)";else if(/r2l/.test(d.clip))g="rect(0px "+e+"px "+f+"px "+e+"px)";else if(/t2b/.test(d.clip))g="rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(d.clip))g="rect("+f+"px "+e+"px "+f+"px 0px)";else if(/zoom/.test(d.clip)){var h=parseInt(f/2,10),i=parseInt(e/2,10);g="rect("+h+"px "+i+"px "+h+"px "+i+"px)"}d.cssBefore.clip=d.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var j=d.cssBefore.clip.match(/(\d+)/g),k=parseInt(j[0],10),l=parseInt(j[1],10),m=parseInt(j[2],10),n=parseInt(j[3],10);d.before.push(function(b,c,d){if(b!=c){var g=a(b),h=a(c);a.fn.cycle.commonReset(b,c,d,!0,!0,!1),d.cssAfter.display="block";var i=1,j=parseInt(d.speedIn/13,10)-1;!function o(){var a=k?k-parseInt(i*(k/j),10):0,b=n?n-parseInt(i*(n/j),10):0,c=f>m?m+parseInt(i*((f-m)/j||1),10):f,d=e>l?l+parseInt(i*((e-l)/j||1),10):e;h.css({clip:"rect("+a+"px "+d+"px "+c+"px "+b+"px)"}),i++<=j?setTimeout(o,13):g.css("display","none")}()}}),a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0}),d.animIn={left:0},d.animOut={left:0}}}(jQuery),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),hb?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}),function(a,b,c){var d,e=b.event;e.special.smartresize={setup:function(){b(this).bind("resize",e.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",e.special.smartresize.handler)},handler:function(a,b){var c=this,e=arguments;a.type="smartresize",d&&clearTimeout(d),d=setTimeout(function(){jQuery.event.handle.apply(c,e)},"execAsap"===b?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Slideshow=function(a,c){this.$el=b(c),this.$list=this.$el.find("ul.ei-slider-large"),this.$imgItems=this.$list.children("li"),this.itemsCount=this.$imgItems.length,this.$images=this.$imgItems.find("img:first"),this.$sliderthumbs=this.$el.find("ul.ei-slider-thumbs").hide(),this.$sliderElems=this.$sliderthumbs.children("li"),this.$sliderElem=this.$sliderthumbs.children("li.ei-slider-element"),this.$thumbs=this.$sliderElems.not(".ei-slider-element"),this._init(a)},b.Slideshow.defaults={animation:"sides",autoplay:!1,slideshow_interval:3e3,speed:800,easing:"",titlesFactor:.6,titlespeed:800,titleeasing:"",thumbMaxWidth:150},b.Slideshow.prototype={_init:function(a){this.options=b.extend(!0,{},b.Slideshow.defaults,a),this.$imgItems.css("opacity",0),this.$imgItems.find("div.ei-title > *").css("opacity",0),this.current=0;var c=this;this.$loading=b('
Loading
').prependTo(c.$el),b.when(this._preloadImages()).done(function(){c.$loading.hide(),c._setImagesSize(),c._initThumbs(),c.$imgItems.eq(c.current).css({opacity:1,"z-index":10}).show().find("div.ei-title > *").css("opacity",1),c.options.autoplay&&c._startSlideshow(),c._initEvents()})},_preloadImages:function(){var a=this,c=0;return b.Deferred(function(d){a.$images.each(function(e){b("").load(function(){++c===a.itemsCount&&d.resolve()}).attr("src",b(this).attr("src"))})}).promise()},_setImagesSize:function(){this.elWidth=this.$el.width();var a=this;this.$images.each(function(c){var d=b(this);imgDim=a._getImageDim(d.attr("src")),d.css({width:imgDim.width,height:imgDim.height,marginLeft:imgDim.left,marginTop:imgDim.top})})},_getImageDim:function(a){var b=new Image;b.src=a;var c,d,e=this.elWidth,f=this.$el.height(),g=f/e,h=b.width,i=b.height,j=i/h;return g>j?(d=f,c=f/j):(d=e*j,c=e),{width:c,height:d,left:(e-c)/2,top:(f-d)/2}},_initThumbs:function(){this.$sliderElems.css({"max-width":this.options.thumbMaxWidth+"px",width:100/this.itemsCount+"%"}),this.$sliderthumbs.css("max-width",this.options.thumbMaxWidth*this.itemsCount+"px").show()},_startSlideshow:function(){var a=this;this.slideshow=setTimeout(function(){var b;b=a.current===a.itemsCount-1?0:a.current+1,a._slideTo(b),a.options.autoplay&&a._startSlideshow()},this.options.slideshow_interval)},_slideTo:function(a){if(a===this.current||this.isAnimating)return!1;this.isAnimating=!0;var c=this.$imgItems.eq(this.current),d=this.$imgItems.eq(a),e=this,f={zIndex:10},g={opacity:1};"sides"===this.options.animation&&(f.left=a>this.current?-1*this.elWidth:this.elWidth,g.left=0),d.find("div.ei-title > h2").css("margin-right","50px").stop().delay(this.options.speed*this.options.titlesFactor).animate({marginRight:"0px",opacity:1},this.options.titlespeed,this.options.titleeasing).end().find("div.ei-title > h3").css("margin-right","-50px").stop().delay(this.options.speed*this.options.titlesFactor).animate({marginRight:"0px",opacity:1},this.options.titlespeed,this.options.titleeasing),b.when(c.css("z-index",1).find("div.ei-title > *").stop().fadeOut(this.options.speed/2,function(){b(this).show().css("opacity",0)}),d.css(f).stop().animate(g,this.options.speed,this.options.easing),this.$sliderElem.stop().animate({left:this.$thumbs.eq(a).position().left},this.options.speed)).done(function(){c.css("opacity",0).find("div.ei-title > *").css("opacity",0),e.current=a,e.isAnimating=!1})},_initEvents:function(){var c=this;b(a).on("smartresize.eislideshow",function(a){c._setImagesSize(),c.$sliderElem.css("left",c.$thumbs.eq(c.current).position().left)}),this.$thumbs.on("click.eislideshow",function(a){c.options.autoplay&&(clearTimeout(c.slideshow),c.options.autoplay=!1);var d=b(this),e=d.index()-1;return c._slideTo(e),!1})}};var f=function(a){this.console};b.fn.eislideshow=function(a){if("string"==typeof a){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"eislideshow");return d?b.isFunction(d[a])&&"_"!==a.charAt(0)?void d[a].apply(d,c):void f("no such method '"+a+"' for eislideshow instance"):void f("cannot call methods on eislideshow prior to initialization; attempted to call method '"+a+"'"); })}else this.each(function(){var c=b.data(this,"eislideshow");c||b.data(this,"eislideshow",new b.Slideshow(a,this))});return this}}(window,jQuery),function(a){"use strict";a.fn.fitVids=function(b){var c={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var d=document.head||document.getElementsByTagName("head")[0],e=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",f=document.createElement("div");f.innerHTML='

x

",d.appendChild(f.childNodes[1])}return b&&a.extend(c,b),this.each(function(){var b=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];c.customSelector&&b.push(c.customSelector);var d=".fitvidsignore";c.ignore&&(d=d+", "+c.ignore);var e=a(this).find(b.join(","));e=e.not("object object"),e=e.not(d),e.each(function(){var b=a(this);if(!(b.parents(d).length>0||"embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){b.css("height")||b.css("width")||!isNaN(b.attr("height"))&&!isNaN(b.attr("width"))||(b.attr("height",9),b.attr("width",16));var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),e=isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10),f=c/e;if(!b.attr("id")){var g="fitvid"+Math.floor(999999*Math.random());b.attr("id",g)}b.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*f+"%"),b.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),function(b){function c(){var a=document.getElementsByTagName("script"),b=a[a.length-1].src.split("?")[0];return b.split("/").length>0?b.split("/").slice(0,-1).join("/")+"/":""}function d(a,b,c){for(var d=0;d=9,c.isie10=c.isie&&"performance"in window&&document.documentMode>=10,c.isie9mobile=/iemobile.9/i.test(navigator.userAgent),c.isie9mobile&&(c.isie9=!1),c.isie7mobile=!c.isie9mobile&&c.isie7&&/iemobile/i.test(navigator.userAgent),c.ismozilla="MozAppearance"in b.style,c.iswebkit="WebkitAppearance"in b.style,c.ischrome="chrome"in window,c.ischrome22=c.ischrome&&c.haspointerlock,c.ischrome26=c.ischrome&&"transition"in b.style,c.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,c.hasmstouch=window.navigator.msPointerEnabled||!1,c.ismac=/^mac$/i.test(navigator.platform),c.isios=c.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform),c.isios4=c.isios&&!("seal"in Object),c.isandroid=/android/i.test(navigator.userAgent),c.trstyle=!1,c.hastransform=!1,c.hastranslate3d=!1,c.transitionstyle=!1,c.hastransition=!1,c.transitionend=!1;for(var d=["transform","msTransform","webkitTransform","MozTransform","OTransform"],e=0;e0;){if(9==a[0].nodeType)return!1;var b=a.css("zIndex");if(!isNaN(b)&&0!=b)return parseInt(b);a=a.parent()}return!1}function l(a,b,c){var d=a.css(b),e=parseFloat(d);if(isNaN(e)){e=x[d]||0;var f=3==e?c?s.win.outerHeight()-s.win.innerHeight():s.win.outerWidth()-s.win.innerWidth():1;return s.isie8&&e&&(e+=1),f?e:0}return e}function o(a,b,c,d){s._bind(a,b,function(d){var d=d?d:window.event,e={original:d,target:d.target||d.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==d.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return d.preventDefault?d.preventDefault():d.returnValue=!1,!1},stopImmediatePropagation:function(){d.stopImmediatePropagation?d.stopImmediatePropagation():d.cancelBubble=!0}};return"mousewheel"==b?(e.deltaY=-1/40*d.wheelDelta,d.wheelDeltaX&&(e.deltaX=-1/40*d.wheelDeltaX)):e.deltaY=d.detail,c.call(a,e)},d)}function p(a,b,c){var d,e;if(0==a.deltaMode?(d=-Math.floor(a.deltaX*(s.opt.mousescrollstep/54)),e=-Math.floor(a.deltaY*(s.opt.mousescrollstep/54))):1==a.deltaMode&&(d=-Math.floor(a.deltaX*s.opt.mousescrollstep),e=-Math.floor(a.deltaY*s.opt.mousescrollstep)),b&&s.opt.oneaxismousemode&&0==d&&e&&(d=e,e=0),d&&(s.scrollmom&&s.scrollmom.stop(),s.lastdeltax+=d,s.debounced("mousewheelx",function(){var a=s.lastdeltax;s.lastdeltax=0,s.rail.drag||s.doScrollLeftBy(a)},120)),e){if(s.opt.nativeparentscrolling&&c&&!s.ispage&&!s.zoomactive)if(0>e){if(s.getScrollTop()>=s.page.maxh)return!0}else if(s.getScrollTop()<=0)return!0;s.scrollmom&&s.scrollmom.stop(),s.lastdeltay+=e,s.debounced("mousewheely",function(){var a=s.lastdeltay;s.lastdeltay=0,s.rail.drag||s.doScrollBy(a)},120)}return a.stopImmediatePropagation(),a.preventDefault()}var s=this;if(this.version="3.5.0 BETA5",this.name="nicescroll",this.me=b,this.opt={doc:j("body"),win:!1},j.extend(this.opt,r),this.opt.snapbackspeed=80,a)for(var u in s.opt)"undefined"!=typeof a[u]&&(s.opt[u]=a[u]);this.doc=s.opt.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/BODY|HTML/.test(s.opt.win?s.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=s.opt.win!==!1,this.win=s.opt.win||(this.ispage?j(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?j(window):this.win,this.body=j("body"),this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=s.opt.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.checkrtlmode=!1,this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1;do this.id="ascrail"+h++;while(document.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.overflowx=s.opt.overflowx,this.overflowy=s.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=t();var w=j.extend({},this.detected);this.canhwscroll=w.hastransform&&s.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&s.haswrapper,this.istouchcapable=!1,w.cantouch&&w.ischrome&&!w.isios&&!w.isandroid&&(this.istouchcapable=!0,w.cantouch=!1),w.cantouch&&w.ismozilla&&!w.isios&&!w.isandroid&&(this.istouchcapable=!0,w.cantouch=!1),s.opt.enablemouselockapi||(w.hasmousecapture=!1,w.haspointerlock=!1),this.delayed=function(a,b,c,d){var e=s.delaylist[a],f=(new Date).getTime();return!d&&e&&e.tt?!1:(e&&e.tt&&clearTimeout(e.tt),void(e&&e.last+c>f&&!e.tt?s.delaylist[a]={last:f+c,tt:setTimeout(function(){s.delaylist[a].tt=0,b.call()},c)}:e&&e.tt||(s.delaylist[a]={last:f,tt:0},setTimeout(function(){b.call()},0))))},this.debounced=function(a,b,c){var d=s.delaylist[a];(new Date).getTime();s.delaylist[a]=b,d||setTimeout(function(){var b=s.delaylist[a];s.delaylist[a]=!1,b.call()},c)},this.synched=function(a,b){function c(){s.onsync||(m(function(){s.onsync=!1;for(a in s.synclist){var b=s.synclist[a];b&&b.call(s),s.synclist[a]=!1}}),s.onsync=!0)}return s.synclist[a]=b,c(),a},this.unsynched=function(a){s.synclist[a]&&(s.synclist[a]=!1)},this.css=function(a,b){for(var c in b)s.saved.css.push([a,c,a.css(c)]),a.css(c,b[c])},this.scrollTop=function(a){return"undefined"==typeof a?s.getScrollTop():s.setScrollTop(a)},this.scrollLeft=function(a){return"undefined"==typeof a?s.getScrollLeft():s.setScrollLeft(a)},BezierClass=function(a,b,c,d,e,f,g){this.st=a,this.ed=b,this.spd=c,this.p1=d||0,this.p2=e||1,this.p3=f||0,this.p4=g||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st},BezierClass.prototype={B2:function(a){return 3*a*a*(1-a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=(new Date).getTime(),b=1-(a-this.ts)/this.spd,c=this.B2(b)+this.B3(b)+this.B4(b);return 0>b?this.ed:this.st+Math.round(this.df*c)},update:function(a,b){return this.st=this.getNow(),this.ed=a,this.spd=b,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll?(this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},w.hastranslate3d&&w.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(a){if(!a){var b=c();if(b)return 16==b.length?-b[13]:-b[5];if(s.timerscroll&&s.timerscroll.bz)return s.timerscroll.bz.getNow()}return s.doc.translate.y},this.getScrollLeft=function(a){if(!a){var b=c();if(b)return 16==b.length?-b[12]:-b[4];if(s.timerscroll&&s.timerscroll.bh)return s.timerscroll.bh.getNow()}return s.doc.translate.x},document.createEvent?this.notifyScrollEvent=function(a){var b=document.createEvent("UIEvents");b.initUIEvent("scroll",!1,!0,window,1),a.dispatchEvent(b)}:document.fireEvent?this.notifyScrollEvent=function(a){var b=document.createEventObject();a.fireEvent("onscroll"),b.cancelBubble=!0}:this.notifyScrollEvent=function(a,b){},w.hastranslate3d&&s.opt.enabletranslate3d?(this.setScrollTop=function(a,b){s.doc.translate.y=a,s.doc.translate.ty=-1*a+"px",s.doc.css(w.trstyle,"translate3d("+s.doc.translate.tx+","+s.doc.translate.ty+",0px)"),b||s.notifyScrollEvent(s.win[0])},this.setScrollLeft=function(a,b){s.doc.translate.x=a,s.doc.translate.tx=-1*a+"px",s.doc.css(w.trstyle,"translate3d("+s.doc.translate.tx+","+s.doc.translate.ty+",0px)"),b||s.notifyScrollEvent(s.win[0])}):(this.setScrollTop=function(a,b){s.doc.translate.y=a,s.doc.translate.ty=-1*a+"px",s.doc.css(w.trstyle,"translate("+s.doc.translate.tx+","+s.doc.translate.ty+")"),b||s.notifyScrollEvent(s.win[0])},this.setScrollLeft=function(a,b){s.doc.translate.x=a,s.doc.translate.tx=-1*a+"px",s.doc.css(w.trstyle,"translate("+s.doc.translate.tx+","+s.doc.translate.ty+")"),b||s.notifyScrollEvent(s.win[0])})):(this.getScrollTop=function(){return s.docscroll.scrollTop()},this.setScrollTop=function(a){return s.docscroll.scrollTop(a)},this.getScrollLeft=function(){return s.docscroll.scrollLeft()},this.setScrollLeft=function(a){return s.docscroll.scrollLeft(a)}),this.getTarget=function(a){return a?a.target?a.target:a.srcElement?a.srcElement:!1:!1},this.hasParent=function(a,b){if(!a)return!1;for(var c=a.target||a.srcElement||a||!1;c&&c.id!=b;)c=c.parentNode||!1;return c!==!1};var x={thin:1,medium:3,thick:5};this.getOffset=function(){if(s.isfixed)return{top:parseFloat(s.win.css("top")),left:parseFloat(s.win.css("left"))};if(!s.viewport)return s.win.offset();var a=s.win.offset(),b=s.viewport.offset();return{top:a.top-b.top+s.viewport.scrollTop(),left:a.left-b.left+s.viewport.scrollLeft()}},this.updateScrollBar=function(a){if(s.ishwscroll)s.rail.css({height:s.win.innerHeight()}),s.railh&&s.railh.css({width:s.win.innerWidth()});else{var b=s.getOffset(),c={top:b.top,left:b.left};c.top+=l(s.win,"border-top-width",!0);(s.win.outerWidth()-s.win.innerWidth())/2;c.left+=s.rail.align?s.win.outerWidth()-l(s.win,"border-right-width")-s.rail.width:l(s.win,"border-left-width");var d=s.opt.railoffset;if(d&&(d.top&&(c.top+=d.top),s.rail.align&&d.left&&(c.left+=d.left)),s.locked||s.rail.css({top:c.top,left:c.left,height:a?a.h:s.win.innerHeight()}),s.zoom&&s.zoom.css({top:c.top+1,left:1==s.rail.align?c.left-20:c.left+s.rail.width+4}),s.railh&&!s.locked){var c={top:b.top,left:b.left},e=s.railh.align?c.top+l(s.win,"border-top-width",!0)+s.win.innerHeight()-s.railh.height:c.top+l(s.win,"border-top-width",!0),f=c.left+l(s.win,"border-left-width");s.railh.css({top:e,left:f,width:s.railh.width})}}},this.doRailClick=function(a,b,c){var d,e,f,g;s.locked||(s.cancelEvent(a),b?(d=c?s.doScrollLeft:s.doScrollTop,f=c?(a.pageX-s.railh.offset().left-s.cursorwidth/2)*s.scrollratio.x:(a.pageY-s.rail.offset().top-s.cursorheight/2)*s.scrollratio.y,d(f)):(d=c?s.doScrollLeftBy:s.doScrollBy,f=c?s.scroll.x:s.scroll.y,g=c?a.pageX-s.railh.offset().left:a.pageY-s.rail.offset().top,e=c?s.view.w:s.view.h,d(f>=g?e:-e)))},s.hasanimationframe=m,s.hascancelanimationframe=n,s.hasanimationframe?s.hascancelanimationframe||(n=function(){s.cancelAnimationFrame=!0}):(m=function(a){return setTimeout(a,15-Math.floor(+new Date/1e3)%16)},n=clearInterval),this.init=function(){function a(b){if(s.selectiondrag){if(b){var c=s.win.outerHeight(),d=b.pageY-s.selectiondrag.top;d>0&&c>d&&(d=0),d>=c&&(d-=c),s.selectiondrag.df=d}if(0!=s.selectiondrag.df){var e=2*-Math.floor(s.selectiondrag.df/6);s.doScrollBy(e),s.debounced("doselectionscroll",function(){a()},50)}}}function b(a){s.iframexd=!1;try{var b="contentDocument"in this?this.contentDocument:this.contentWindow.document;b.domain}catch(a){s.iframexd=!0,b=!1}if(s.iframexd)return"console"in window,!0;if(s.forcescreen=!0,s.isiframe&&(s.iframe={doc:j(b),html:s.doc.contents().find("html")[0],body:s.doc.contents().find("body")[0]},s.getContentSize=function(){return{w:Math.max(s.iframe.html.scrollWidth,s.iframe.body.scrollWidth),h:Math.max(s.iframe.html.scrollHeight,s.iframe.body.scrollHeight)}},s.docscroll=j(s.iframe.body)),!w.isios&&s.opt.iframeautoresize&&!s.isiframe){s.win.scrollTop(0),s.doc.height("");var c=Math.max(b.getElementsByTagName("html")[0].scrollHeight,b.body.scrollHeight);s.doc.height(c)}s.lazyResize(30),w.isie7&&s.css(j(s.iframe.html),{"overflow-y":"hidden"}),s.css(j(s.iframe.body),{"overflow-y":"hidden"}),w.isios&&s.haswrapper&&s.css(j(b.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?s.bind(this.contentWindow,"scroll",s.onscroll):s.bind(b,"scroll",s.onscroll),s.opt.enablemousewheel&&s.bind(b,"mousewheel",s.onmousewheel),s.opt.enablekeyboard&&s.bind(b,w.isopera?"keypress":"keydown",s.onkeypress),(w.cantouch||s.opt.touchbehavior)&&(s.bind(b,"mousedown",s.ontouchstart),s.bind(b,"mousemove",function(a){s.ontouchmove(a,!0)}),s.opt.grabcursorenabled&&w.cursorgrabvalue&&s.css(j(b.body),{cursor:w.cursorgrabvalue})),s.bind(b,"mouseup",s.ontouchend),s.zoom&&(s.opt.dblclickzoom&&s.bind(b,"dblclick",s.doZoom),s.ongesturezoom&&s.bind(b,"gestureend",s.ongesturezoom))}if(s.saved.css=[],w.isie7mobile)return!0;if(w.isoperamini)return!0;if(w.hasmstouch&&s.css(s.ispage?j("html"):s.win,{"-ms-touch-action":"none"}),s.zindex="auto",s.ispage||"auto"!=s.opt.zindex?s.zindex=s.opt.zindex:s.zindex=d()||"auto",s.ispage||"auto"==s.zindex||s.zindex>i&&(i=s.zindex),s.isie&&0==s.zindex&&"auto"==s.opt.zindex&&(s.zindex="auto"),!s.ispage||!w.cantouch&&!w.isieold&&!w.isie9mobile){var c=s.docscroll;s.ispage&&(c=s.haswrapper?s.win:s.doc),w.isie9mobile||s.css(c,{"overflow-y":"hidden"}),s.ispage&&w.isie7&&("BODY"==s.doc[0].nodeName?s.css(j("html"),{"overflow-y":"hidden"}):"HTML"==s.doc[0].nodeName&&s.css(j("body"),{"overflow-y":"hidden"})),!w.isios||s.ispage||s.haswrapper||s.css(j("body"),{"-webkit-overflow-scrolling":"touch"});var h=j(document.createElement("div"));h.css({position:"relative",top:0,"float":"right",width:s.opt.cursorwidth,height:"0px","background-color":s.opt.cursorcolor,border:s.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":s.opt.cursorborderradius,"-moz-border-radius":s.opt.cursorborderradius,"border-radius":s.opt.cursorborderradius}),h.hborder=parseFloat(h.outerHeight()-h.innerHeight()),s.cursor=h;var l=j(document.createElement("div"));l.attr("id",s.id),l.addClass("nicescroll-rails");var m,n,o=["left","right"];for(var p in o)n=o[p],m=s.opt.railpadding[n],m?l.css("padding-"+n,m+"px"):s.opt.railpadding[n]=0;l.append(h),l.width=Math.max(parseFloat(s.opt.cursorwidth),h.outerWidth())+s.opt.railpadding.left+s.opt.railpadding.right,l.css({width:l.width+"px",zIndex:s.zindex,background:s.opt.background,cursor:"default"}),l.visibility=!0,l.scrollable=!0,l.align="left"==s.opt.railalign?0:1,s.rail=l,s.rail.drag=!1;var r=!1;if(!s.opt.boxzoom||s.ispage||w.isieold||(r=document.createElement("div"),s.bind(r,"click",s.doZoom),s.zoom=j(r),s.zoom.css({cursor:"pointer","z-index":s.zindex,backgroundImage:"url("+k+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),s.opt.dblclickzoom&&s.bind(s.win,"dblclick",s.doZoom),w.cantouch&&s.opt.gesturezoom&&(s.ongesturezoom=function(a){return a.scale>1.5&&s.doZoomIn(a),a.scale<.8&&s.doZoomOut(a),s.cancelEvent(a)},s.bind(s.win,"gestureend",s.ongesturezoom))),s.railh=!1,s.opt.horizrailenabled){s.css(c,{"overflow-x":"hidden"});var h=j(document.createElement("div"));h.css({position:"relative",top:0,height:s.opt.cursorwidth,width:"0px","background-color":s.opt.cursorcolor,border:s.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":s.opt.cursorborderradius,"-moz-border-radius":s.opt.cursorborderradius,"border-radius":s.opt.cursorborderradius}),h.wborder=parseFloat(h.outerWidth()-h.innerWidth()),s.cursorh=h;var t=j(document.createElement("div"));t.attr("id",s.id+"-hr"),t.addClass("nicescroll-rails"),t.height=Math.max(parseFloat(s.opt.cursorwidth),h.outerHeight()),t.css({height:t.height+"px",zIndex:s.zindex,background:s.opt.background}),t.append(h),t.visibility=!0,t.scrollable=!0,t.align="top"==s.opt.railvalign?0:1,s.railh=t,s.railh.drag=!1}if(s.ispage)l.css({position:"fixed",top:"0px",height:"100%"}),l.css(l.align?{right:"0px"}:{left:"0px"}),s.body.append(l),s.railh&&(t.css({position:"fixed",left:"0px",width:"100%"}),t.css(t.align?{bottom:"0px"}:{top:"0px"}),s.body.append(t));else{if(s.ishwscroll){"static"==s.win.css("position")&&s.css(s.win,{position:"relative"});var u="HTML"==s.win[0].nodeName?s.body:s.win;s.zoom&&(s.zoom.css({position:"absolute",top:1,right:0,"margin-right":l.width+4}),u.append(s.zoom)),l.css({position:"absolute",top:0}),l.css(l.align?{right:0}:{left:0}),u.append(l),t&&(t.css({position:"absolute",left:0,bottom:0}),t.css(t.align?{bottom:0}:{top:0}),u.append(t))}else{s.isfixed="fixed"==s.win.css("position");var x=s.isfixed?"fixed":"absolute";s.isfixed||(s.viewport=s.getViewport(s.win[0])),s.viewport&&(s.body=s.viewport,0==/relative|absolute/.test(s.viewport.css("position"))&&s.css(s.viewport,{position:"relative"})),l.css({position:x}),s.zoom&&s.zoom.css({position:x}),s.updateScrollBar(),s.body.append(l),s.zoom&&s.body.append(s.zoom),s.railh&&(t.css({position:x}),s.body.append(t))}w.isios&&s.css(s.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),w.isie&&s.opt.disableoutline&&s.win.attr("hideFocus","true"),w.iswebkit&&s.opt.disableoutline&&s.win.css({outline:"none"})}if(s.opt.autohidemode===!1?(s.autohidedom=!1,s.rail.css({opacity:s.opt.cursoropacitymax}),s.railh&&s.railh.css({opacity:s.opt.cursoropacitymax})):s.opt.autohidemode===!0?(s.autohidedom=j().add(s.rail),w.isie8&&(s.autohidedom=s.autohidedom.add(s.cursor)),s.railh&&(s.autohidedom=s.autohidedom.add(s.railh)),s.railh&&w.isie8&&(s.autohidedom=s.autohidedom.add(s.cursorh))):"scroll"==s.opt.autohidemode?(s.autohidedom=j().add(s.rail),s.railh&&(s.autohidedom=s.autohidedom.add(s.railh))):"cursor"==s.opt.autohidemode?(s.autohidedom=j().add(s.cursor),s.railh&&(s.autohidedom=s.autohidedom.add(s.cursorh))):"hidden"==s.opt.autohidemode&&(s.autohidedom=!1,s.hide(),s.locked=!1),w.isie9mobile){s.scrollmom=new v(s),s.onmangotouch=function(a){var b=s.getScrollTop(),c=s.getScrollLeft();if(b==s.scrollmom.lastscrolly&&c==s.scrollmom.lastscrollx)return!0;var d=b-s.mangotouch.sy,e=c-s.mangotouch.sx,f=Math.round(Math.sqrt(Math.pow(e,2)+Math.pow(d,2)));if(0!=f){var g=0>d?-1:1,h=0>e?-1:1,i=+new Date;if(s.mangotouch.lazy&&clearTimeout(s.mangotouch.lazy),i-s.mangotouch.tm>80||s.mangotouch.dry!=g||s.mangotouch.drx!=h)s.scrollmom.stop(),s.scrollmom.reset(c,b),s.mangotouch.sy=b,s.mangotouch.ly=b,s.mangotouch.sx=c,s.mangotouch.lx=c,s.mangotouch.dry=g,s.mangotouch.drx=h,s.mangotouch.tm=i;else{s.scrollmom.stop(),s.scrollmom.update(s.mangotouch.sx-e,s.mangotouch.sy-d);i-s.mangotouch.tm;s.mangotouch.tm=i;var j=Math.max(Math.abs(s.mangotouch.ly-b),Math.abs(s.mangotouch.lx-c));s.mangotouch.ly=b,s.mangotouch.lx=c,j>2&&(s.mangotouch.lazy=setTimeout(function(){s.mangotouch.lazy=!1,s.mangotouch.dry=0,s.mangotouch.drx=0,s.mangotouch.tm=0,s.scrollmom.doMomentum(30)},100))}}};var y=s.getScrollTop(),z=s.getScrollLeft();s.mangotouch={sy:y,ly:y,dry:0,sx:z,lx:z,drx:0,lazy:!1,tm:0},s.bind(s.docscroll,"scroll",s.onmangotouch)}else{if(w.cantouch||s.istouchcapable||s.opt.touchbehavior||w.hasmstouch){s.scrollmom=new v(s),s.ontouchstart=function(a){if(a.pointerType&&2!=a.pointerType)return!1;if(!s.locked){if(w.hasmstouch)for(var b=a.target?a.target:!1;b;){var c=j(b).getNiceScroll();if(c.length>0&&c[0].me==s.me)break;if(c.length>0)return!1;if("DIV"==b.nodeName&&b.id==s.id)break;b=b.parentNode?b.parentNode:!1}s.cancelScroll();var b=s.getTarget(a);if(b){var d=/INPUT/i.test(b.nodeName)&&/range/i.test(b.type);if(d)return s.stopPropagation(a)}if(!("clientX"in a)&&"changedTouches"in a&&(a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY),s.forcescreen){var e=a,a={original:a.original?a.original:a};a.clientX=e.screenX,a.clientY=e.screenY}if(s.rail.drag={x:a.clientX,y:a.clientY,sx:s.scroll.x,sy:s.scroll.y,st:s.getScrollTop(),sl:s.getScrollLeft(),pt:2,dl:!1},s.ispage||!s.opt.directionlockdeadzone)s.rail.drag.dl="f";else{var f={w:j(window).width(),h:j(window).height()},g={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},h=Math.max(0,g.h-f.h),i=Math.max(0,g.w-f.w);!s.rail.scrollable&&s.railh.scrollable?s.rail.drag.ck=h>0?"v":!1:s.rail.scrollable&&!s.railh.scrollable?s.rail.drag.ck=i>0?"h":!1:s.rail.drag.ck=!1,s.rail.drag.ck||(s.rail.drag.dl="f")}if(s.opt.touchbehavior&&s.isiframe&&w.isie){var k=s.win.position();s.rail.drag.x+=k.left,s.rail.drag.y+=k.top}if(s.hasmoving=!1,s.lastmouseup=!1,s.scrollmom.reset(a.clientX,a.clientY),!w.cantouch&&!this.istouchcapable&&!w.hasmstouch){var l=b?/INPUT|SELECT|TEXTAREA/i.test(b.nodeName):!1;if(!l)return!s.ispage&&w.hasmousecapture&&b.setCapture(),s.opt.touchbehavior?s.cancelEvent(a):s.stopPropagation(a);/SUBMIT|CANCEL|BUTTON/i.test(j(b).attr("type"))&&(pc={tg:b,click:!1},s.preventclick=pc)}}},s.ontouchend=function(a){return a.pointerType&&2!=a.pointerType?!1:s.rail.drag&&2==s.rail.drag.pt&&(s.scrollmom.doMomentum(),s.rail.drag=!1,s.hasmoving&&(s.hasmoving=!1,s.lastmouseup=!0,s.hideCursor(),w.hasmousecapture&&document.releaseCapture(),!w.cantouch))?s.cancelEvent(a):void 0};var A=s.opt.touchbehavior&&s.isiframe&&!w.hasmousecapture;s.ontouchmove=function(a,b){if(a.pointerType&&2!=a.pointerType)return!1;if(s.rail.drag&&2==s.rail.drag.pt){if(w.cantouch&&"undefined"==typeof a.original)return!0;s.hasmoving=!0,s.preventclick&&!s.preventclick.click&&(s.preventclick.click=s.preventclick.tg.onclick||!1,s.preventclick.tg.onclick=s.onpreventclick);var c=j.extend({original:a},a);if(a=c,"changedTouches"in a&&(a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY),s.forcescreen){var d=a,a={original:a.original?a.original:a};a.clientX=d.screenX,a.clientY=d.screenY}var e=ofy=0;if(A&&!b){var f=s.win.position();e=-f.left,ofy=-f.top}var g=a.clientY+ofy,h=g-s.rail.drag.y,i=a.clientX+e,k=i-s.rail.drag.x,l=s.rail.drag.st-h;if(s.ishwscroll&&s.opt.bouncescroll?0>l?l=Math.round(l/2):l>s.page.maxh&&(l=s.page.maxh+Math.round((l-s.page.maxh)/2)):(0>l&&(l=0,g=0),l>s.page.maxh&&(l=s.page.maxh,g=0)),s.railh&&s.railh.scrollable){var m=s.rail.drag.sl-k;s.ishwscroll&&s.opt.bouncescroll?0>m?m=Math.round(m/2):m>s.page.maxw&&(m=s.page.maxw+Math.round((m-s.page.maxw)/2)):(0>m&&(m=0,i=0),m>s.page.maxw&&(m=s.page.maxw,i=0))}var n=!1;if(s.rail.drag.dl)n=!0,"v"==s.rail.drag.dl?m=s.rail.drag.sl:"h"==s.rail.drag.dl&&(l=s.rail.drag.st);else{var o=Math.abs(h),p=Math.abs(k),q=s.opt.directionlockdeadzone;if("v"==s.rail.drag.ck){if(o>q&&.3*o>=p)return s.rail.drag=!1,!0;p>q&&(s.rail.drag.dl="f",j("body").scrollTop(j("body").scrollTop()))}else if("h"==s.rail.drag.ck){if(p>q&&.3*p>=o)return s.rail.drag=!1,!0;o>q&&(s.rail.drag.dl="f",j("body").scrollLeft(j("body").scrollLeft()))}}if(s.synched("touchmove",function(){s.rail.drag&&2==s.rail.drag.pt&&(s.prepareTransition&&s.prepareTransition(0),s.rail.scrollable&&s.setScrollTop(l),s.scrollmom.update(i,g),s.railh&&s.railh.scrollable?(s.setScrollLeft(m),s.showCursor(l,m)):s.showCursor(l),w.isie10&&document.selection.clear())}),w.ischrome&&s.istouchcapable&&(n=!1),n)return s.cancelEvent(a)}}}s.onmousedown=function(a,b){if(!s.rail.drag||1==s.rail.drag.pt){if(s.locked)return s.cancelEvent(a);s.cancelScroll(),s.rail.drag={x:a.clientX,y:a.clientY,sx:s.scroll.x,sy:s.scroll.y,pt:1,hr:!!b};var c=s.getTarget(a);return!s.ispage&&w.hasmousecapture&&c.setCapture(),s.isiframe&&!w.hasmousecapture&&(s.saved.csspointerevents=s.doc.css("pointer-events"),s.css(s.doc,{"pointer-events":"none"})),s.cancelEvent(a)}},s.onmouseup=function(a){if(s.rail.drag){if(w.hasmousecapture&&document.releaseCapture(),s.isiframe&&!w.hasmousecapture&&s.doc.css("pointer-events",s.saved.csspointerevents),1!=s.rail.drag.pt)return;return s.rail.drag=!1,s.cancelEvent(a)}},s.onmousemove=function(a){if(s.rail.drag){if(1!=s.rail.drag.pt)return;if(w.ischrome&&0==a.which)return s.onmouseup(a);if(s.cursorfreezed=!0,s.rail.drag.hr){s.scroll.x=s.rail.drag.sx+(a.clientX-s.rail.drag.x),s.scroll.x<0&&(s.scroll.x=0);var b=s.scrollvaluemaxw;s.scroll.x>b&&(s.scroll.x=b)}else{s.scroll.y=s.rail.drag.sy+(a.clientY-s.rail.drag.y),s.scroll.y<0&&(s.scroll.y=0);var c=s.scrollvaluemax;s.scroll.y>c&&(s.scroll.y=c)}return s.synched("mousemove",function(){s.rail.drag&&1==s.rail.drag.pt&&(s.showCursor(),s.rail.drag.hr?s.doScrollLeft(Math.round(s.scroll.x*s.scrollratio.x),s.opt.cursordragspeed):s.doScrollTop(Math.round(s.scroll.y*s.scrollratio.y),s.opt.cursordragspeed))}),s.cancelEvent(a)}},w.cantouch||s.opt.touchbehavior?(s.onpreventclick=function(a){return s.preventclick?(s.preventclick.tg.onclick=s.preventclick.click,s.preventclick=!1,s.cancelEvent(a)):void 0},s.bind(s.win,"mousedown",s.ontouchstart),s.onclick=w.isios?!1:function(a){return s.lastmouseup?(s.lastmouseup=!1,s.cancelEvent(a)):!0},s.opt.grabcursorenabled&&w.cursorgrabvalue&&(s.css(s.ispage?s.doc:s.win,{cursor:w.cursorgrabvalue}),s.css(s.rail,{cursor:w.cursorgrabvalue}))):("getSelection"in document?s.hasTextSelected=function(){return document.getSelection().rangeCount>0}:"selection"in document?s.hasTextSelected=function(){return"None"!=document.selection.type}:s.hasTextSelected=function(){return!1},s.onselectionstart=function(a){s.ispage||(s.selectiondrag=s.win.offset())},s.onselectionend=function(a){s.selectiondrag=!1},s.onselectiondrag=function(b){s.selectiondrag&&s.hasTextSelected()&&s.debounced("selectionscroll",function(){a(b)},250)}),w.hasmstouch&&(s.css(s.rail,{"-ms-touch-action":"none"}),s.css(s.cursor,{"-ms-touch-action":"none"}),s.bind(s.win,"MSPointerDown",s.ontouchstart),s.bind(document,"MSPointerUp",s.ontouchend),s.bind(document,"MSPointerMove",s.ontouchmove),s.bind(s.cursor,"MSGestureHold",function(a){a.preventDefault()}),s.bind(s.cursor,"contextmenu",function(a){a.preventDefault()})),this.istouchcapable&&(s.bind(s.win,"touchstart",s.ontouchstart),s.bind(document,"touchend",s.ontouchend),s.bind(document,"touchcancel",s.ontouchend),s.bind(document,"touchmove",s.ontouchmove)),s.bind(s.cursor,"mousedown",s.onmousedown),s.bind(s.cursor,"mouseup",s.onmouseup),s.railh&&(s.bind(s.cursorh,"mousedown",function(a){s.onmousedown(a,!0)}),s.bind(s.cursorh,"mouseup",function(a){return s.rail.drag&&2==s.rail.drag.pt?void 0:(s.rail.drag=!1,s.hasmoving=!1,s.hideCursor(),w.hasmousecapture&&document.releaseCapture(),s.cancelEvent(a))})),(s.opt.cursordragontouch||!w.cantouch&&!s.opt.touchbehavior)&&(s.rail.css({cursor:"default"}),s.railh&&s.railh.css({cursor:"default"}),s.jqbind(s.rail,"mouseenter",function(){s.canshowonmouseevent&&s.showCursor(),s.rail.active=!0}),s.jqbind(s.rail,"mouseleave",function(){s.rail.active=!1,s.rail.drag||s.hideCursor()}),s.opt.sensitiverail&&(s.bind(s.rail,"click",function(a){s.doRailClick(a,!1,!1)}),s.bind(s.rail,"dblclick",function(a){s.doRailClick(a,!0,!1)}),s.bind(s.cursor,"click",function(a){s.cancelEvent(a)}),s.bind(s.cursor,"dblclick",function(a){s.cancelEvent(a)})),s.railh&&(s.jqbind(s.railh,"mouseenter",function(){s.canshowonmouseevent&&s.showCursor(),s.rail.active=!0}),s.jqbind(s.railh,"mouseleave",function(){s.rail.active=!1,s.rail.drag||s.hideCursor()}),s.opt.sensitiverail&&(s.bind(s.railh,"click",function(a){s.doRailClick(a,!1,!0)}),s.bind(s.railh,"dblclick",function(a){s.doRailClick(a,!0,!0)}),s.bind(s.cursorh,"click",function(a){s.cancelEvent(a)}),s.bind(s.cursorh,"dblclick",function(a){ s.cancelEvent(a)})))),w.cantouch||s.opt.touchbehavior?(s.bind(w.hasmousecapture?s.win:document,"mouseup",s.ontouchend),s.bind(document,"mousemove",s.ontouchmove),s.onclick&&s.bind(document,"click",s.onclick),s.opt.cursordragontouch&&(s.bind(s.cursor,"mousedown",s.onmousedown),s.bind(s.cursor,"mousemove",s.onmousemove),s.cursorh&&s.bind(s.cursorh,"mousedown",s.onmousedown),s.cursorh&&s.bind(s.cursorh,"mousemove",s.onmousemove))):(s.bind(w.hasmousecapture?s.win:document,"mouseup",s.onmouseup),s.bind(document,"mousemove",s.onmousemove),s.onclick&&s.bind(document,"click",s.onclick),!s.ispage&&s.opt.enablescrollonselection&&(s.bind(s.win[0],"mousedown",s.onselectionstart),s.bind(document,"mouseup",s.onselectionend),s.bind(s.cursor,"mouseup",s.onselectionend),s.cursorh&&s.bind(s.cursorh,"mouseup",s.onselectionend),s.bind(document,"mousemove",s.onselectiondrag)),s.zoom&&(s.jqbind(s.zoom,"mouseenter",function(){s.canshowonmouseevent&&s.showCursor(),s.rail.active=!0}),s.jqbind(s.zoom,"mouseleave",function(){s.rail.active=!1,s.rail.drag||s.hideCursor()}))),s.opt.enablemousewheel&&(s.isiframe||s.bind(w.isie&&s.ispage?document:s.win,"mousewheel",s.onmousewheel),s.bind(s.rail,"mousewheel",s.onmousewheel),s.railh&&s.bind(s.railh,"mousewheel",s.onmousewheelhr)),s.ispage||w.cantouch||/HTML|BODY/.test(s.win[0].nodeName)||(s.win.attr("tabindex")||s.win.attr({tabindex:g++}),s.jqbind(s.win,"focus",function(a){e=s.getTarget(a).id||!0,s.hasfocus=!0,s.canshowonmouseevent&&s.noticeCursor()}),s.jqbind(s.win,"blur",function(a){e=!1,s.hasfocus=!1}),s.jqbind(s.win,"mouseenter",function(a){f=s.getTarget(a).id||!0,s.hasmousefocus=!0,s.canshowonmouseevent&&s.noticeCursor()}),s.jqbind(s.win,"mouseleave",function(){f=!1,s.hasmousefocus=!1}))}if(s.onkeypress=function(a){if(s.locked&&0==s.page.maxh)return!0;a=a?a:window.e;var b=s.getTarget(a);if(b&&/INPUT|TEXTAREA|SELECT|OPTION/.test(b.nodeName)){var c=b.getAttribute("type")||b.type||!1;if(!c||!/submit|button|cancel/i.tp)return!0}if(s.hasfocus||s.hasmousefocus&&!e||s.ispage&&!e&&!f){var d=a.keyCode;if(s.locked&&27!=d)return s.cancelEvent(a);var g=a.ctrlKey||!1,h=a.shiftKey||!1,i=!1;switch(d){case 38:case 63233:s.doScrollBy(72),i=!0;break;case 40:case 63235:s.doScrollBy(-72),i=!0;break;case 37:case 63232:s.railh&&(g?s.doScrollLeft(0):s.doScrollLeftBy(72),i=!0);break;case 39:case 63234:s.railh&&(g?s.doScrollLeft(s.page.maxw):s.doScrollLeftBy(-72),i=!0);break;case 33:case 63276:s.doScrollBy(s.view.h),i=!0;break;case 34:case 63277:s.doScrollBy(-s.view.h),i=!0;break;case 36:case 63273:s.railh&&g?s.doScrollPos(0,0):s.doScrollTo(0),i=!0;break;case 35:case 63275:s.railh&&g?s.doScrollPos(s.page.maxw,s.page.maxh):s.doScrollTo(s.page.maxh),i=!0;break;case 32:s.opt.spacebarenabled&&(s.doScrollBy(h?s.view.h:-s.view.h),i=!0);break;case 27:s.zoomactive&&(s.doZoom(),i=!0)}if(i)return s.cancelEvent(a)}},s.opt.enablekeyboard&&s.bind(document,w.isopera&&!w.isopera12?"keypress":"keydown",s.onkeypress),s.bind(window,"resize",s.lazyResize),s.bind(window,"orientationchange",s.lazyResize),s.bind(window,"load",s.lazyResize),w.ischrome&&!s.ispage&&!s.haswrapper){var B=s.win.attr("style"),C=parseFloat(s.win.css("width"))+1;s.win.css("width",C),s.synched("chromefix",function(){s.win.attr("style",B)})}s.onAttributeChange=function(a){s.lazyResize(250)},s.ispage||s.haswrapper||(q!==!1?(s.observer=new q(function(a){a.forEach(s.onAttributeChange)}),s.observer.observe(s.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),s.observerremover=new q(function(a){a.forEach(function(a){if(a.removedNodes.length>0)for(var b in a.removedNodes)if(a.removedNodes[b]==s.win[0])return s.remove()})}),s.observerremover.observe(s.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(s.bind(s.win,w.isie&&!w.isie9?"propertychange":"DOMAttrModified",s.onAttributeChange),w.isie9&&s.win[0].attachEvent("onpropertychange",s.onAttributeChange),s.bind(s.win,"DOMNodeRemoved",function(a){a.target==s.win[0]&&s.remove()}))),!s.ispage&&s.opt.boxzoom&&s.bind(window,"resize",s.resizeZoom),s.istextarea&&s.bind(s.win,"mouseup",s.lazyResize),s.checkrtlmode=!0,s.lazyResize(30)}"IFRAME"==this.doc[0].nodeName&&(this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){b.call(s.doc[0],!1)},500),s.bind(this.doc,"load",b))},this.showCursor=function(a,b){s.cursortimeout&&(clearTimeout(s.cursortimeout),s.cursortimeout=0),s.rail&&(s.autohidedom&&(s.autohidedom.stop().css({opacity:s.opt.cursoropacitymax}),s.cursoractive=!0),s.rail.drag&&1==s.rail.drag.pt||("undefined"!=typeof a&&a!==!1&&(s.scroll.y=Math.round(1*a/s.scrollratio.y)),"undefined"!=typeof b&&(s.scroll.x=Math.round(1*b/s.scrollratio.x))),s.cursor.css({height:s.cursorheight,top:s.scroll.y}),s.cursorh&&(s.cursorh.css(!s.rail.align&&s.rail.visibility?{width:s.cursorwidth,left:s.scroll.x+s.rail.width}:{width:s.cursorwidth,left:s.scroll.x}),s.cursoractive=!0),s.zoom&&s.zoom.stop().css({opacity:s.opt.cursoropacitymax}))},this.hideCursor=function(a){s.cursortimeout||s.rail&&s.autohidedom&&(s.cursortimeout=setTimeout(function(){s.rail.active&&s.showonmouseevent||(s.autohidedom.stop().animate({opacity:s.opt.cursoropacitymin}),s.zoom&&s.zoom.stop().animate({opacity:s.opt.cursoropacitymin}),s.cursoractive=!1),s.cursortimeout=0},a||s.opt.hidecursordelay))},this.noticeCursor=function(a,b,c){s.showCursor(b,c),s.rail.active||s.hideCursor(a)},this.getContentSize=s.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:s.haswrapper?function(){return{w:s.doc.outerWidth()+parseInt(s.win.css("paddingLeft"))+parseInt(s.win.css("paddingRight")),h:s.doc.outerHeight()+parseInt(s.win.css("paddingTop"))+parseInt(s.win.css("paddingBottom"))}}:function(){return{w:s.docscroll[0].scrollWidth,h:s.docscroll[0].scrollHeight}},this.onResize=function(a,b){if(!s.win)return!1;if(!s.haswrapper&&!s.ispage){if("none"==s.win.css("display"))return s.visibility&&s.hideRail().hideRailHr(),!1;s.hidden||s.visibility||s.showRail().showRailHr()}var c=s.page.maxh,d=s.page.maxw,e={h:s.view.h,w:s.view.w};if(s.view={w:s.ispage?s.win.width():parseInt(s.win[0].clientWidth),h:s.ispage?s.win.height():parseInt(s.win[0].clientHeight)},s.page=b?b:s.getContentSize(),s.page.maxh=Math.max(0,s.page.h-s.view.h),s.page.maxw=Math.max(0,s.page.w-s.view.w),s.page.maxh==c&&s.page.maxw==d&&s.view.w==e.w){if(s.ispage)return s;var f=s.win.offset();if(s.lastposition){var g=s.lastposition;if(g.top==f.top&&g.left==f.left)return s}s.lastposition=f}if(0==s.page.maxh?(s.hideRail(),s.scrollvaluemax=0,s.scroll.y=0,s.scrollratio.y=0,s.cursorheight=0,s.setScrollTop(0),s.rail.scrollable=!1):s.rail.scrollable=!0,0==s.page.maxw?(s.hideRailHr(),s.scrollvaluemaxw=0,s.scroll.x=0,s.scrollratio.x=0,s.cursorwidth=0,s.setScrollLeft(0),s.railh.scrollable=!1):s.railh.scrollable=!0,s.locked=0==s.page.maxh&&0==s.page.maxw,s.locked)return s.ispage||s.updateScrollBar(s.view),!1;s.hidden||s.visibility?s.hidden||s.railh.visibility||s.showRailHr():s.showRail().showRailHr(),s.istextarea&&s.win.css("resize")&&"none"!=s.win.css("resize")&&(s.view.h-=20),s.cursorheight=Math.min(s.view.h,Math.round(s.view.h*(s.view.h/s.page.h))),s.cursorheight=s.opt.cursorfixedheight?s.opt.cursorfixedheight:Math.max(s.opt.cursorminheight,s.cursorheight),s.cursorwidth=Math.min(s.view.w,Math.round(s.view.w*(s.view.w/s.page.w))),s.cursorwidth=s.opt.cursorfixedheight?s.opt.cursorfixedheight:Math.max(s.opt.cursorminheight,s.cursorwidth),s.scrollvaluemax=s.view.h-s.cursorheight-s.cursor.hborder,s.railh&&(s.railh.width=s.page.maxh>0?s.view.w-s.rail.width:s.view.w,s.scrollvaluemaxw=s.railh.width-s.cursorwidth-s.cursorh.wborder),s.checkrtlmode&&s.railh&&(s.checkrtlmode=!1,s.opt.rtlmode&&0==s.scroll.x&&s.setScrollLeft(s.page.maxw)),s.ispage||s.updateScrollBar(s.view),s.scrollratio={x:s.page.maxw/s.scrollvaluemaxw,y:s.page.maxh/s.scrollvaluemax};var h=s.getScrollTop();return h>s.page.maxh?s.doScrollTop(s.page.maxh):(s.scroll.y=Math.round(s.getScrollTop()*(1/s.scrollratio.y)),s.scroll.x=Math.round(s.getScrollLeft()*(1/s.scrollratio.x)),s.cursoractive&&s.noticeCursor()),s.scroll.y&&0==s.getScrollTop()&&s.doScrollTo(Math.floor(s.scroll.y*s.scrollratio.y)),s},this.resize=s.onResize,this.lazyResize=function(a){return a=isNaN(a)?30:a,s.delayed("resize",s.resize,a),s},this._bind=function(a,b,c,d){s.events.push({e:a,n:b,f:c,b:d,q:!1}),a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},this.jqbind=function(a,b,c){s.events.push({e:a,n:b,f:c,q:!0}),j(a).bind(b,c)},this.bind=function(a,b,c,d){var e="jquery"in a?a[0]:a;if(void 0==e&&(e=a),"mousewheel"==b)if("onwheel"in s.win)s._bind(e,"wheel",c,d||!1);else{var f="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll";o(e,f,c,d||!1),"DOMMouseScroll"==f&&o(e,"MozMousePixelScroll",c,d||!1)}else if(e.addEventListener){if(w.cantouch&&/mouseup|mousedown|mousemove/.test(b)){var g="mousedown"==b?"touchstart":"mouseup"==b?"touchend":"touchmove";s._bind(e,g,function(a){if(a.touches){if(a.touches.length<2){var b=a.touches.length?a.touches[0]:a;b.original=a,c.call(this,b)}}else if(a.changedTouches){var b=a.changedTouches[0];b.original=a,c.call(this,b)}},d||!1)}s._bind(e,b,c,d||!1),w.cantouch&&"mouseup"==b&&s._bind(e,"touchcancel",c,d||!1)}else s._bind(e,b,function(a){return a=a||window.event||!1,a&&a.srcElement&&(a.target=a.srcElement),"pageY"in a||(a.pageX=a.clientX+document.documentElement.scrollLeft,a.pageY=a.clientY+document.documentElement.scrollTop),c.call(e,a)===!1||d===!1?s.cancelEvent(a):!0})},this._unbind=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=!1},this.unbindAll=function(){for(var a=0;a0)return c;b=b.parentNode?b.parentNode:!1}return!1},this.onmousewheel=function(a){if(s.locked)return s.debounced("checkunlock",s.resize,250),!0;if(s.rail.drag)return s.cancelEvent(a);if("auto"==s.opt.oneaxismousemode&&0!=a.deltaX&&(s.opt.oneaxismousemode=!1),s.opt.oneaxismousemode&&0==a.deltaX&&!s.rail.scrollable)return s.railh&&s.railh.scrollable?s.onmousewheelhr(a):!0;var b=+new Date,c=!1;if(s.opt.preservenativescrolling&&s.checkarea+60020?c:0},s.opt.smoothscroll?s.ishwscroll&&w.hastransition&&s.opt.usetransition?(this.prepareTransition=function(a,b){var c=b?a>20?a:0:s.getTransitionSpeed(a),d=c?w.prefixstyle+"transform "+c+"ms ease-out":"";return s.lasttransitionstyle&&s.lasttransitionstyle==d||(s.lasttransitionstyle=d,s.doc.css(w.transitionstyle,d)),c},this.doScrollLeft=function(a,b){var c=s.scrollrunning?s.newscrolly:s.getScrollTop();s.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=s.scrollrunning?s.newscrollx:s.getScrollLeft();s.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=s.getScrollTop(),e=s.getScrollLeft();return((s.newscrolly-d)*(b-d)<0||(s.newscrollx-e)*(a-e)<0)&&s.cancelScroll(),0==s.opt.bouncescroll&&(0>b?b=0:b>s.page.maxh&&(b=s.page.maxh),0>a?a=0:a>s.page.maxw&&(a=s.page.maxw)),s.scrollrunning&&a==s.newscrollx&&b==s.newscrolly?!1:(s.newscrolly=b,s.newscrollx=a,s.newscrollspeed=c||!1,s.timer?!1:void(s.timer=setTimeout(function(){var c=s.getScrollTop(),d=s.getScrollLeft(),e={};e.x=a-d,e.y=b-c,e.px=d,e.py=c;var f=Math.round(Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))),g=s.newscrollspeed&&s.newscrollspeed>1?s.newscrollspeed:s.getTransitionSpeed(f);if(s.newscrollspeed&&s.newscrollspeed<=1&&(g*=s.newscrollspeed),s.prepareTransition(g,!0),s.timerscroll&&s.timerscroll.tm&&clearInterval(s.timerscroll.tm),g>0){if(!s.scrollrunning&&s.onscrollstart){var h={type:"scrollstart",current:{x:d,y:c},request:{x:a,y:b},end:{x:s.newscrollx,y:s.newscrolly},speed:g};s.onscrollstart.call(s,h)}w.transitionend?s.scrollendtrapped||(s.scrollendtrapped=!0,s.bind(s.doc,w.transitionend,s.onScrollEnd,!1)):(s.scrollendtrapped&&clearTimeout(s.scrollendtrapped),s.scrollendtrapped=setTimeout(s.onScrollEnd,g));var i=c,j=d;s.timerscroll={bz:new BezierClass(i,s.newscrolly,g,0,0,.58,1),bh:new BezierClass(j,s.newscrollx,g,0,0,.58,1)},s.cursorfreezed||(s.timerscroll.tm=setInterval(function(){s.showCursor(s.getScrollTop(),s.getScrollLeft())},60))}s.synched("doScroll-set",function(){s.timer=0,s.scrollendtrapped&&(s.scrollrunning=!0),s.setScrollTop(s.newscrolly),s.setScrollLeft(s.newscrollx),s.scrollendtrapped||s.onScrollEnd()})},50)))},this.cancelScroll=function(){if(!s.scrollendtrapped)return!0;var a=s.getScrollTop(),b=s.getScrollLeft();return s.scrollrunning=!1,w.transitionend||clearTimeout(w.transitionend),s.scrollendtrapped=!1,s._unbind(s.doc,w.transitionend,s.onScrollEnd),s.prepareTransition(0),s.setScrollTop(a),s.railh&&s.setScrollLeft(b),s.timerscroll&&s.timerscroll.tm&&clearInterval(s.timerscroll.tm),s.timerscroll=!1,s.cursorfreezed=!1,s.showCursor(a,b),s},this.onScrollEnd=function(){s.scrollendtrapped&&s._unbind(s.doc,w.transitionend,s.onScrollEnd),s.scrollendtrapped=!1,s.prepareTransition(0),s.timerscroll&&s.timerscroll.tm&&clearInterval(s.timerscroll.tm),s.timerscroll=!1;var a=s.getScrollTop(),b=s.getScrollLeft();if(s.setScrollTop(a),s.railh&&s.setScrollLeft(b),s.noticeCursor(!1,a,b),s.cursorfreezed=!1,0>a?a=0:a>s.page.maxh&&(a=s.page.maxh),0>b?b=0:b>s.page.maxw&&(b=s.page.maxw),a!=s.newscrolly||b!=s.newscrollx)return s.doScrollPos(b,a,s.opt.snapbackspeed);if(s.onscrollend&&s.scrollrunning){var c={type:"scrollend",current:{x:b,y:a},end:{x:s.newscrollx,y:s.newscrolly}};s.onscrollend.call(s,c)}s.scrollrunning=!1}):(this.doScrollLeft=function(a,b){var c=s.scrollrunning?s.newscrolly:s.getScrollTop();s.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=s.scrollrunning?s.newscrollx:s.getScrollLeft();s.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){function d(){if(s.cancelAnimationFrame)return!0;if(s.scrollrunning=!0,k=1-k)return s.timer=m(d)||1;var a=0,b=sy=s.getScrollTop();if(s.dst.ay){b=s.bzscroll?s.dst.py+s.bzscroll.getNow()*s.dst.ay:s.newscrolly;var c=b-sy;(0>c&&b0&&b>s.newscrolly)&&(b=s.newscrolly),s.setScrollTop(b),b==s.newscrolly&&(a=1)}else a=1;var e=sx=s.getScrollLeft();if(s.dst.ax){e=s.bzscroll?s.dst.px+s.bzscroll.getNow()*s.dst.ax:s.newscrollx;var c=e-sx;(0>c&&e0&&e>s.newscrollx)&&(e=s.newscrollx),s.setScrollLeft(e),e==s.newscrollx&&(a+=1)}else a+=1;if(2==a){if(s.timer=0,s.cursorfreezed=!1,s.bzscroll=!1,s.scrollrunning=!1,0>b?b=0:b>s.page.maxh&&(b=s.page.maxh),0>e?e=0:e>s.page.maxw&&(e=s.page.maxw),e!=s.newscrollx||b!=s.newscrolly)s.doScrollPos(e,b);else if(s.onscrollend){var f={type:"scrollend",current:{x:sx,y:sy},end:{x:s.newscrollx,y:s.newscrolly}};s.onscrollend.call(s,f)}}else s.timer=m(d)||1}var b="undefined"==typeof b||b===!1?s.getScrollTop(!0):b;if(s.timer&&s.newscrolly==b&&s.newscrollx==a)return!0;s.timer&&n(s.timer),s.timer=0;var e=s.getScrollTop(),f=s.getScrollLeft();((s.newscrolly-e)*(b-e)<0||(s.newscrollx-f)*(a-f)<0)&&s.cancelScroll(),s.newscrolly=b,s.newscrollx=a,s.bouncescroll&&s.rail.visibility||(s.newscrolly<0?s.newscrolly=0:s.newscrolly>s.page.maxh&&(s.newscrolly=s.page.maxh)),s.bouncescroll&&s.railh.visibility||(s.newscrollx<0?s.newscrollx=0:s.newscrollx>s.page.maxw&&(s.newscrollx=s.page.maxw)),s.dst={},s.dst.x=a-f,s.dst.y=b-e,s.dst.px=f,s.dst.py=e;var g=Math.round(Math.sqrt(Math.pow(s.dst.x,2)+Math.pow(s.dst.y,2)));s.dst.ax=s.dst.x/g,s.dst.ay=s.dst.y/g;var h=0,i=g;0==s.dst.x?(h=e,i=b,s.dst.ay=1,s.dst.py=0):0==s.dst.y&&(h=f,i=a,s.dst.ax=1,s.dst.px=0);var j=s.getTransitionSpeed(g);if(c&&1>=c&&(j*=c),j>0?s.bzscroll=s.bzscroll?s.bzscroll.update(i,j):new BezierClass(h,i,j,0,1,0,1):s.bzscroll=!1,!s.timer){(e==s.page.maxh&&b>=s.page.maxh||f==s.page.maxw&&a>=s.page.maxw)&&s.checkContentSize();var k=1;if(s.cancelAnimationFrame=!1,s.timer=1,s.onscrollstart&&!s.scrollrunning){var l={type:"scrollstart",current:{x:f,y:e},request:{x:a,y:b},end:{x:s.newscrollx,y:s.newscrolly},speed:j};s.onscrollstart.call(s,l)}d(),(e==s.page.maxh&&b>=e||f==s.page.maxw&&a>=f)&&s.checkContentSize(),s.noticeCursor()}},this.cancelScroll=function(){return s.timer&&n(s.timer),s.timer=0,s.bzscroll=!1,s.scrollrunning=!1,s}):(this.doScrollLeft=function(a,b){var c=s.getScrollTop();s.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=s.getScrollLeft();s.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=a>s.page.maxw?s.page.maxw:a;0>d&&(d=0);var e=b>s.page.maxh?s.page.maxh:b;0>e&&(e=0),s.synched("scroll",function(){s.setScrollTop(e),s.setScrollLeft(d)})},this.cancelScroll=function(){}),this.doScrollBy=function(a,b){var c=0;if(b)c=Math.floor((s.scroll.y-a)*s.scrollratio.y);else{var d=s.timer?s.newscrolly:s.getScrollTop(!0);c=d-a}if(s.bouncescroll){var e=Math.round(s.view.h/2);-e>c?c=-e:c>s.page.maxh+e&&(c=s.page.maxh+e)}return s.cursorfreezed=!1,py=s.getScrollTop(!0),0>c&&py<=0?s.noticeCursor():c>s.page.maxh&&py>=s.page.maxh?(s.checkContentSize(),s.noticeCursor()):void s.doScrollTop(c)},this.doScrollLeftBy=function(a,b){var c=0;if(b)c=Math.floor((s.scroll.x-a)*s.scrollratio.x);else{var d=s.timer?s.newscrollx:s.getScrollLeft(!0);c=d-a}if(s.bouncescroll){var e=Math.round(s.view.w/2);-e>c?c=-e:c>s.page.maxw+e&&(c=s.page.maxw+e)}return s.cursorfreezed=!1,px=s.getScrollLeft(!0),0>c&&px<=0?s.noticeCursor():c>s.page.maxw&&px>=s.page.maxw?s.noticeCursor():void s.doScrollLeft(c)},this.doScrollTo=function(a,b){var c=b?Math.round(a*s.scrollratio.y):a;0>c?c=0:c>s.page.maxh&&(c=s.page.maxh),s.cursorfreezed=!1,s.doScrollTop(a)},this.checkContentSize=function(){var a=s.getContentSize();(a.h!=s.page.h||a.w!=s.page.w)&&s.resize(!1,a)},s.onscroll=function(a){s.rail.drag||s.cursorfreezed||s.synched("scroll",function(){s.scroll.y=Math.round(s.getScrollTop()*(1/s.scrollratio.y)),s.railh&&(s.scroll.x=Math.round(s.getScrollLeft()*(1/s.scrollratio.x))),s.noticeCursor()})},s.bind(s.docscroll,"scroll",s.onscroll),this.doZoomIn=function(a){if(!s.zoomactive){s.zoomactive=!0,s.zoomrestore={style:{}};var b=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],c=s.win[0].style;for(var d in b){var e=b[d];s.zoomrestore.style[e]="undefined"!=typeof c[e]?c[e]:""}s.zoomrestore.style.width=s.win.css("width"),s.zoomrestore.style.height=s.win.css("height"),s.zoomrestore.padding={w:s.win.outerWidth()-s.win.width(),h:s.win.outerHeight()-s.win.height()},w.isios4&&(s.zoomrestore.scrollTop=j(window).scrollTop(),j(window).scrollTop(0)),s.win.css({position:w.isios4?"absolute":"fixed",top:0,left:0,"z-index":i+100,margin:"0px"});var f=s.win.css("backgroundColor");return(""==f||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(f))&&s.win.css("backgroundColor","#fff"),s.rail.css({"z-index":i+101}),s.zoom.css({"z-index":i+102}),s.zoom.css("backgroundPosition","0px -18px"),s.resizeZoom(),s.onzoomin&&s.onzoomin.call(s),s.cancelEvent(a)}},this.doZoomOut=function(a){return s.zoomactive?(s.zoomactive=!1,s.win.css("margin",""),s.win.css(s.zoomrestore.style),w.isios4&&j(window).scrollTop(s.zoomrestore.scrollTop),s.rail.css({"z-index":s.zindex}),s.zoom.css({"z-index":s.zindex}),s.zoomrestore=!1,s.zoom.css("backgroundPosition","0px 0px"),s.onResize(),s.onzoomout&&s.onzoomout.call(s),s.cancelEvent(a)):void 0},this.doZoom=function(a){return s.zoomactive?s.doZoomOut(a):s.doZoomIn(a)},this.resizeZoom=function(){if(s.zoomactive){var a=s.getScrollTop();s.win.css({width:j(window).width()-s.zoomrestore.padding.w+"px",height:j(window).height()-s.zoomrestore.padding.h+"px"}),s.onResize(),s.setScrollTop(Math.min(s.page.maxh,a))}},this.init(),j.nicescroll.push(this)},v=function(a){var b=this;this.nc=a,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.time=function(){return+new Date},this.reset=function(a,c){b.stop();var d=b.time();b.steptime=0,b.lasttime=d,b.speedx=0,b.speedy=0,b.lastx=a,b.lasty=c,b.lastscrollx=-1,b.lastscrolly=-1},this.update=function(a,c){var d=b.time();b.steptime=d-b.lasttime,b.lasttime=d;var e=c-b.lasty,f=a-b.lastx,g=b.nc.getScrollTop(),h=b.nc.getScrollLeft(),i=g+e,j=h+f;b.snapx=0>j||j>b.nc.page.maxw,b.snapy=0>i||i>b.nc.page.maxh,b.speedx=f,b.speedy=e,b.lastx=a,b.lasty=c},this.stop=function(){b.nc.unsynched("domomentum2d"),b.timer&&clearTimeout(b.timer),b.timer=0,b.lastscrollx=-1,b.lastscrolly=-1},this.doSnapy=function(a,c){var d=!1;0>c?(c=0,d=!0):c>b.nc.page.maxh&&(c=b.nc.page.maxh,d=!0),0>a?(a=0,d=!0):a>b.nc.page.maxw&&(a=b.nc.page.maxw,d=!0),d&&b.nc.doScrollPos(a,c,b.nc.opt.snapbackspeed)},this.doMomentum=function(a){var c=b.time(),d=a?c+a:b.lasttime,e=b.nc.getScrollLeft(),f=b.nc.getScrollTop(),g=b.nc.page.maxh,h=b.nc.page.maxw;b.speedx=h>0?Math.min(60,b.speedx):0,b.speedy=g>0?Math.min(60,b.speedy):0;var i=d&&60>=c-d;(0>f||f>g||0>e||e>h)&&(i=!1);var j=b.speedy&&i?b.speedy:!1,k=b.speedx&&i?b.speedx:!1;if(j||k){var l=Math.max(16,b.steptime);if(l>50){var m=l/50;b.speedx*=m,b.speedy*=m,l=50}b.demulxy=0,b.lastscrollx=b.nc.getScrollLeft(),b.chkx=b.lastscrollx,b.lastscrolly=b.nc.getScrollTop(),b.chky=b.lastscrolly;var n=b.lastscrollx,o=b.lastscrolly,p=function(){var a=b.time()-c>600?.04:.02;b.speedx&&(n=Math.floor(b.lastscrollx-b.speedx*(1-b.demulxy)),b.lastscrollx=n,(0>n||n>h)&&(a=.1)),b.speedy&&(o=Math.floor(b.lastscrolly-b.speedy*(1-b.demulxy)),b.lastscrolly=o,(0>o||o>g)&&(a=.1)),b.demulxy=Math.min(1,b.demulxy+a),b.nc.synched("domomentum2d",function(){if(b.speedx){var a=b.nc.getScrollLeft();a!=b.chkx&&b.stop(),b.chkx=n,b.nc.setScrollLeft(n)}if(b.speedy){var c=b.nc.getScrollTop();c!=b.chky&&b.stop(),b.chky=o,b.nc.setScrollTop(o)}b.timer||(b.nc.hideCursor(),b.doSnapy(n,o))}),b.demulxy<1?b.timer=setTimeout(p,l):(b.stop(),b.nc.hideCursor(),b.doSnapy(n,o))};p()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},w=b.fn.scrollTop;b.cssHooks.pageYOffset={get:function(a,b,c){var d=j.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.getScrollTop():w.call(a)},set:function(a,b){var c=j.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.setScrollTop(parseInt(b)):w.call(a,b),this}},b.fn.scrollTop=function(a){if("undefined"==typeof a){var b=this[0]?j.data(this[0],"__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollTop():w.call(this)}return this.each(function(){var b=j.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollTop(parseInt(a)):w.call(j(this),a)})};var x=b.fn.scrollLeft;j.cssHooks.pageXOffset={get:function(a,b,c){var d=j.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.getScrollLeft():x.call(a)},set:function(a,b){var c=j.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.setScrollLeft(parseInt(b)):x.call(a,b),this}},b.fn.scrollLeft=function(a){if("undefined"==typeof a){var b=this[0]?j.data(this[0],"__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollLeft():x.call(this)}return this.each(function(){var b=j.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollLeft(parseInt(a)):x.call(j(this),a)})};var y=function(b){var c=this;if(this.length=0,this.name="nicescrollarray",this.each=function(a){for(var b=0,d=0;b0,n="fade"===d.vars.animation,o=""!==d.vars.asNavFor,p={},q=!0;a.data(b,"flexslider",d),p={init:function(){d.animating=!1,d.currentSlide=parseInt(d.vars.startAt?d.vars.startAt:0,10),isNaN(d.currentSlide)&&(d.currentSlide=0),d.animatingTo=d.currentSlide,d.atEnd=0===d.currentSlide||d.currentSlide===d.last,d.containerSelector=d.vars.selector.substr(0,d.vars.selector.search(" ")),d.slides=a(d.vars.selector,d),d.container=a(d.containerSelector,d),d.count=d.slides.length,d.syncExists=a(d.vars.sync).length>0,"slide"===d.vars.animation&&(d.vars.animation="swing"),d.prop=k?"top":"marginLeft",d.args={},d.manualPause=!1,d.stopped=!1,d.started=!1,d.startTimeout=null,d.transitions=!d.vars.video&&!n&&d.vars.useCSS&&function(){var a=document.createElement("div"),b=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(void 0!==a.style[b[c]])return d.pfx=b[c].replace("Perspective","").toLowerCase(),d.prop="-"+d.pfx+"-transform",!0;return!1}(),d.ensureAnimationEnd="",""!==d.vars.controlsContainer&&(d.controlsContainer=a(d.vars.controlsContainer).length>0&&a(d.vars.controlsContainer)),""!==d.vars.manualControls&&(d.manualControls=a(d.vars.manualControls).length>0&&a(d.vars.manualControls)),d.vars.randomize&&(d.slides.sort(function(){return Math.round(Math.random())-.5}),d.container.empty().append(d.slides)),d.doMath(),d.setup("init"),d.vars.controlNav&&p.controlNav.setup(),d.vars.directionNav&&p.directionNav.setup(),d.vars.keyboard&&(1===a(d.containerSelector).length||d.vars.multipleKeyboard)&&a(document).bind("keyup",function(a){var b=a.keyCode;if(!d.animating&&(39===b||37===b)){var c=39===b?d.getTarget("next"):37===b?d.getTarget("prev"):!1;d.flexAnimate(c,d.vars.pauseOnAction)}}),d.vars.mousewheel&&d.bind("mousewheel",function(a,b,c,e){a.preventDefault();var f=d.getTarget(0>b?"next":"prev");d.flexAnimate(f,d.vars.pauseOnAction)}),d.vars.pausePlay&&p.pausePlay.setup(),d.vars.slideshow&&d.vars.pauseInvisible&&p.pauseInvisible.init(),d.vars.slideshow&&(d.vars.pauseOnHover&&d.hover(function(){d.manualPlay||d.manualPause||d.pause()},function(){d.manualPause||d.manualPlay||d.stopped||d.play()}),d.vars.pauseInvisible&&p.pauseInvisible.isHidden()||(d.vars.initDelay>0?d.startTimeout=setTimeout(d.play,d.vars.initDelay):d.play())),o&&p.asNav.setup(),h&&d.vars.touch&&p.touch(),(!n||n&&d.vars.smoothHeight)&&a(window).bind("resize orientationchange focus",p.resize),d.find("img").attr("draggable","false"),setTimeout(function(){d.vars.start(d)},200)},asNav:{setup:function(){d.asNav=!0,d.animatingTo=Math.floor(d.currentSlide/d.move),d.currentItem=d.currentSlide,d.slides.removeClass(f+"active-slide").eq(d.currentItem).addClass(f+"active-slide"),g?(b._slider=d,d.slides.each(function(){var b=this;b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",function(a){a.preventDefault(),a.currentTarget._gesture&&a.currentTarget._gesture.addPointer(a.pointerId)},!1),b.addEventListener("MSGestureTap",function(b){b.preventDefault();var c=a(this),e=c.index();a(d.vars.asNavFor).data("flexslider").animating||c.hasClass("active")||(d.direction=d.currentItem=g&&c.hasClass(f+"active-slide")?d.flexAnimate(d.getTarget("prev"),!0):a(d.vars.asNavFor).data("flexslider").animating||c.hasClass(f+"active-slide")||(d.direction=d.currentItem'),d.pagingCount>1)for(var h=0;h':""+g+"","thumbnails"===d.vars.controlNav&&!0===d.vars.thumbCaptions){var k=c.attr("data-thumbcaption");""!=k&&void 0!=k&&(b+=''+k+"")}d.controlNavScaffold.append("
  • "+b+"
  • "),g++}d.controlsContainer?a(d.controlsContainer).append(d.controlNavScaffold):d.append(d.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),d.controlNavScaffold.delegate("a, img",i,function(b){if(b.preventDefault(),""===j||j===b.type){var c=a(this),e=d.controlNav.index(c);c.hasClass(f+"active")||(d.direction=e>d.currentSlide?"next":"prev",d.flexAnimate(e,d.vars.pauseOnAction))}""===j&&(j=b.type),p.setToClearWatchedEvent()})},setupManual:function(){d.controlNav=d.manualControls,p.controlNav.active(),d.controlNav.bind(i,function(b){if(b.preventDefault(),""===j||j===b.type){var c=a(this),e=d.controlNav.index(c);c.hasClass(f+"active")||(e>d.currentSlide?d.direction="next":d.direction="prev",d.flexAnimate(e,d.vars.pauseOnAction))}""===j&&(j=b.type),p.setToClearWatchedEvent()})},set:function(){var b="thumbnails"===d.vars.controlNav?"img":"a";d.controlNav=a("."+f+"control-nav li "+b,d.controlsContainer?d.controlsContainer:d)},active:function(){d.controlNav.removeClass(f+"active").eq(d.animatingTo).addClass(f+"active")},update:function(b,c){d.pagingCount>1&&"add"===b?d.controlNavScaffold.append(a("
  • "+d.count+"
  • ")):1===d.pagingCount?d.controlNavScaffold.find("li").remove():d.controlNav.eq(c).closest("li").remove(),p.controlNav.set(),d.pagingCount>1&&d.pagingCount!==d.controlNav.length?d.update(c,b):p.controlNav.active()}},directionNav:{setup:function(){var b=a('");d.controlsContainer?(a(d.controlsContainer).append(b),d.directionNav=a("."+f+"direction-nav li a",d.controlsContainer)):(d.append(b),d.directionNav=a("."+f+"direction-nav li a",d)),p.directionNav.update(),d.directionNav.bind(i,function(b){b.preventDefault();var c;(""===j||j===b.type)&&(c=d.getTarget(a(this).hasClass(f+"next")?"next":"prev"),d.flexAnimate(c,d.vars.pauseOnAction)),""===j&&(j=b.type),p.setToClearWatchedEvent()})},update:function(){var a=f+"disabled";1===d.pagingCount?d.directionNav.addClass(a).attr("tabindex","-1"):d.vars.animationLoop?d.directionNav.removeClass(a).removeAttr("tabindex"):0===d.animatingTo?d.directionNav.removeClass(a).filter("."+f+"prev").addClass(a).attr("tabindex","-1"):d.animatingTo===d.last?d.directionNav.removeClass(a).filter("."+f+"next").addClass(a).attr("tabindex","-1"):d.directionNav.removeClass(a).removeAttr("tabindex")}},pausePlay:{setup:function(){var b=a('
    ');d.controlsContainer?(d.controlsContainer.append(b),d.pausePlay=a("."+f+"pauseplay a",d.controlsContainer)):(d.append(b),d.pausePlay=a("."+f+"pauseplay a",d)),p.pausePlay.update(d.vars.slideshow?f+"pause":f+"play"),d.pausePlay.bind(i,function(b){b.preventDefault(),(""===j||j===b.type)&&(a(this).hasClass(f+"pause")?(d.manualPause=!0,d.manualPlay=!1,d.pause()):(d.manualPause=!1,d.manualPlay=!0,d.play())),""===j&&(j=b.type),p.setToClearWatchedEvent()})},update:function(a){"play"===a?d.pausePlay.removeClass(f+"pause").addClass(f+"play").html(d.vars.playText):d.pausePlay.removeClass(f+"play").addClass(f+"pause").html(d.vars.pauseText)}},touch:function(){function a(a){d.animating?a.preventDefault():(window.navigator.msPointerEnabled||1===a.touches.length)&&(d.pause(),q=k?d.h:d.w,s=Number(new Date),u=a.touches[0].pageX,v=a.touches[0].pageY,p=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*q:(d.currentSlide+d.cloneOffset)*q,j=k?v:u,o=k?u:v,b.addEventListener("touchmove",c,!1),b.addEventListener("touchend",e,!1))}function c(a){u=a.touches[0].pageX,v=a.touches[0].pageY,r=k?j-v:j-u,t=k?Math.abs(r)b)&&(a.preventDefault(),!n&&d.transitions&&(d.vars.animationLoop||(r/=0===d.currentSlide&&0>r||d.currentSlide===d.last&&r>0?Math.abs(r)/q+2:1),d.setProps(p+r,"setTouch")))}function e(a){if(b.removeEventListener("touchmove",c,!1),d.animatingTo===d.currentSlide&&!t&&null!==r){var f=l?-r:r,g=d.getTarget(f>0?"next":"prev");d.canAdvance(g)&&(Number(new Date)-s<550&&Math.abs(f)>50||Math.abs(f)>q/2)?d.flexAnimate(g,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}b.removeEventListener("touchend",e,!1),j=null,o=null,r=null,p=null}function f(a){a.stopPropagation(),d.animating?a.preventDefault():(d.pause(),b._gesture.addPointer(a.pointerId),w=0,q=k?d.h:d.w,s=Number(new Date),p=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*q:(d.currentSlide+d.cloneOffset)*q)}function h(a){a.stopPropagation();var c=a.target._slider;if(c){var d=-a.translationX,e=-a.translationY;return w+=k?e:d,r=w,t=k?Math.abs(w)500)&&(a.preventDefault(),!n&&c.transitions&&(c.vars.animationLoop||(r=w/(0===c.currentSlide&&0>w||c.currentSlide===c.last&&w>0?Math.abs(w)/q+2:1)),c.setProps(p+r,"setTouch"))))}}function i(a){a.stopPropagation();var b=a.target._slider;if(b){if(b.animatingTo===b.currentSlide&&!t&&null!==r){var c=l?-r:r,d=b.getTarget(c>0?"next":"prev");b.canAdvance(d)&&(Number(new Date)-s<550&&Math.abs(c)>50||Math.abs(c)>q/2)?b.flexAnimate(d,b.vars.pauseOnAction):n||b.flexAnimate(b.currentSlide,b.vars.pauseOnAction,!0)}j=null,o=null,r=null,p=null,w=0}}var j,o,p,q,r,s,t=!1,u=0,v=0,w=0;g?(b.style.msTouchAction="pan-y",b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",f,!1),b._slider=d,b.addEventListener("MSGestureChange",h,!1),b.addEventListener("MSGestureEnd",i,!1)):b.addEventListener("touchstart",a,!1)},resize:function(){!d.animating&&d.is(":visible")&&(m||d.doMath(),n?p.smoothHeight():m?(d.slides.width(d.computedW),d.update(d.pagingCount),d.setProps()):k?(d.viewport.height(d.h),d.setProps(d.h,"setTotal")):(d.vars.smoothHeight&&p.smoothHeight(),d.newSlides.width(d.computedW),d.setProps(d.computedW,"setTotal")))},smoothHeight:function(a){if(!k||n){var b=n?d:d.viewport;a?b.animate({height:d.slides.eq(d.animatingTo).height()},a):b.height(d.slides.eq(d.animatingTo).height())}},sync:function(b){var c=a(d.vars.sync).data("flexslider"),e=d.animatingTo;switch(b){case"animate":c.flexAnimate(e,d.vars.pauseOnAction,!1,!0);break;case"play":c.playing||c.asNav||c.play();break;case"pause":c.pause()}},uniqueID:function(b){return b.find("[id]").each(function(){var b=a(this);b.attr("id",b.attr("id")+"_clone")}),b},pauseInvisible:{visProp:null,init:function(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b0?setTimeout(d.play,d.vars.initDelay):d.play()})}},isHidden:function(){return document[p.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(e),e=setTimeout(function(){j=""},3e3)}},d.flexAnimate=function(b,c,e,g,i){if(d.vars.animationLoop||b===d.currentSlide||(d.direction=b>d.currentSlide?"next":"prev"),o&&1===d.pagingCount&&(d.direction=d.currentItemd.limit&&1!==d.visible?d.limit:s):r=0===d.currentSlide&&b===d.count-1&&d.vars.animationLoop&&"next"!==d.direction?l?(d.count+d.cloneOffset)*t:0:d.currentSlide===d.last&&0===b&&d.vars.animationLoop&&"prev"!==d.direction?l?0:(d.count+1)*t:l?(d.count-1-b+d.cloneOffset)*t:(b+d.cloneOffset)*t,d.setProps(r,"",d.vars.animationSpeed),d.transitions?(d.vars.animationLoop&&d.atEnd||(d.animating=!1,d.currentSlide=d.animatingTo),d.container.unbind("webkitTransitionEnd transitionend"),d.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(d.ensureAnimationEnd),d.wrapup(t)}),clearTimeout(d.ensureAnimationEnd),d.ensureAnimationEnd=setTimeout(function(){d.wrapup(t)},d.vars.animationSpeed+100)):d.container.animate(d.args,d.vars.animationSpeed,d.vars.easing,function(){d.wrapup(t)})}d.vars.smoothHeight&&p.smoothHeight(d.vars.animationSpeed)}},d.wrapup=function(a){n||m||(0===d.currentSlide&&d.animatingTo===d.last&&d.vars.animationLoop?d.setProps(a,"jumpEnd"):d.currentSlide===d.last&&0===d.animatingTo&&d.vars.animationLoop&&d.setProps(a,"jumpStart")),d.animating=!1,d.currentSlide=d.animatingTo,d.vars.after(d)},d.animateSlides=function(){!d.animating&&q&&d.flexAnimate(d.getTarget("next"))},d.pause=function(){clearInterval(d.animatedSlides),d.animatedSlides=null,d.playing=!1,d.vars.pausePlay&&p.pausePlay.update("play"),d.syncExists&&p.sync("pause")},d.play=function(){d.playing&&clearInterval(d.animatedSlides),d.animatedSlides=d.animatedSlides||setInterval(d.animateSlides,d.vars.slideshowSpeed),d.started=d.playing=!0,d.vars.pausePlay&&p.pausePlay.update("pause"),d.syncExists&&p.sync("play")},d.stop=function(){d.pause(),d.stopped=!0},d.canAdvance=function(a,b){var c=o?d.pagingCount-1:d.last;return b?!0:o&&d.currentItem===d.count-1&&0===a&&"prev"===d.direction?!0:o&&0===d.currentItem&&a===d.pagingCount-1&&"next"!==d.direction?!1:a!==d.currentSlide||o?d.vars.animationLoop?!0:d.atEnd&&0===d.currentSlide&&a===c&&"next"!==d.direction?!1:d.atEnd&&d.currentSlide===c&&0===a&&"next"===d.direction?!1:!0:!1},d.getTarget=function(a){return d.direction=a,"next"===a?d.currentSlide===d.last?0:d.currentSlide+1:0===d.currentSlide?d.last:d.currentSlide-1},d.setProps=function(a,b,c){var e=function(){var c=a?a:(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo,e=function(){if(m)return"setTouch"===b?a:l&&d.animatingTo===d.last?0:l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:d.animatingTo===d.last?d.limit:c;switch(b){case"setTotal":return l?(d.count-1-d.currentSlide+d.cloneOffset)*a:(d.currentSlide+d.cloneOffset)*a;case"setTouch":return l?a:a;case"jumpEnd":return l?a:d.count*a;case"jumpStart":return l?d.count*a:a;default:return a}}();return-1*e+"px"}();d.transitions&&(e=k?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",c=void 0!==c?c/1e3+"s":"0s",d.container.css("-"+d.pfx+"-transition-duration",c),d.container.css("transition-duration",c)),d.args[d.prop]=e,(d.transitions||void 0===c)&&d.container.css(d.args),d.container.css("transform",e)},d.setup=function(b){if(n)d.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(h?d.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+d.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(d.currentSlide).css({opacity:1,zIndex:2}):d.slides.css({opacity:0,display:"block",zIndex:1}).eq(d.currentSlide).css({zIndex:2}).animate({opacity:1},d.vars.animationSpeed,d.vars.easing)),d.vars.smoothHeight&&p.smoothHeight();else{var c,e;"init"===b&&(d.viewport=a('
    ').css({overflow:"hidden",position:"relative"}).appendTo(d).append(d.container),d.cloneCount=0,d.cloneOffset=0,l&&(e=a.makeArray(d.slides).reverse(),d.slides=a(e),d.container.empty().append(d.slides))),d.vars.animationLoop&&!m&&(d.cloneCount=2,d.cloneOffset=1,"init"!==b&&d.container.find(".clone").remove(),p.uniqueID(d.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(d.container),p.uniqueID(d.slides.last().clone().addClass("clone").attr("aria-hidden","true")).prependTo(d.container)),d.newSlides=a(d.vars.selector,d),c=l?d.count-1-d.currentSlide+d.cloneOffset:d.currentSlide+d.cloneOffset,k&&!m?(d.container.height(200*(d.count+d.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){d.newSlides.css({display:"block"}),d.doMath(),d.viewport.height(d.h),d.setProps(c*d.h,"init")},"init"===b?100:0)):(d.container.width(200*(d.count+d.cloneCount)+"%"),d.setProps(c*d.computedW,"init"),setTimeout(function(){d.doMath(),d.newSlides.css({width:d.computedW,"float":"left",display:"block"}),d.vars.smoothHeight&&p.smoothHeight()},"init"===b?100:0))}m||d.slides.removeClass(f+"active-slide").eq(d.currentSlide).addClass(f+"active-slide"),d.vars.init(d)},d.doMath=function(){var a=d.slides.first(),b=d.vars.itemMargin,c=d.vars.minItems,e=d.vars.maxItems;d.w=void 0===d.viewport?d.width():d.viewport.width(),d.h=a.height(),d.boxPadding=a.outerWidth()-a.width(),m?(d.itemT=d.vars.itemWidth+b,d.minW=c?c*d.itemT:d.w,d.maxW=e?e*d.itemT-b:d.w,d.itemW=d.minW>d.w?(d.w-b*(c-1))/c:d.maxWd.w?d.w:d.vars.itemWidth,d.visible=Math.floor(d.w/d.itemW),d.move=d.vars.move>0&&d.vars.moved.w?d.itemW*(d.count-1)+b*(d.count-1):(d.itemW+b)*d.count-d.w-b):(d.itemW=d.w,d.pagingCount=d.count,d.last=d.count-1),d.computedW=d.itemW-d.boxPadding},d.update=function(a,b){d.doMath(),m||(ad.controlNav.length?p.controlNav.update("add"):("remove"===b&&!m||d.pagingCountd.last&&(d.currentSlide-=1,d.animatingTo-=1),p.controlNav.update("remove",d.last))),d.vars.directionNav&&p.directionNav.update()},d.addSlide=function(b,c){var e=a(b);d.count+=1,d.last=d.count-1,k&&l?void 0!==c?d.slides.eq(d.count-c).after(e):d.container.prepend(e):void 0!==c?d.slides.eq(c).before(e):d.container.append(e),d.update(c,"add"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.added(d)},d.removeSlide=function(b){var c=isNaN(b)?d.slides.index(a(b)):b;d.count-=1,d.last=d.count-1,isNaN(b)?a(b,d.slides).remove():k&&l?d.slides.eq(d.last).remove():d.slides.eq(b).remove(),d.doMath(),d.update(c,"remove"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.removed(d)},d.destroy=function(){var b="."+d.vars.namespace;d.vars.controlNav&&d.controlNav.closest(b+"control-nav").remove(),d.vars.directionNav&&d.directionNav.closest(b+"direction-nav").remove(),d.vars.pausePlay&&d.pausePlay.closest(b+"pauseplay").remove(),d.find(".clone").remove(),d.unbind(d.vars.eventNamespace),"fade"!=d.vars.animation&&d.container.unwrap(),d.container.removeAttr("style"),d.container.unbind(d.vars.eventNamespace),d.slides.removeAttr("style"),d.slides.filter(b+"active-slide").removeClass(d.vars.namespace+"active-slide"),d.slides.unbind(d.vars.eventNamespace),a(document).unbind(d.vars.eventNamespace+"-"+d.id),a(window).unbind(d.vars.eventNamespace+"-"+d.id),d.stop(),d.removeData("flexslider")},p.init()},a(window).blur(function(a){focused=!1}).focus(function(a){focused=!0}),a.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},a.fn.flexslider=function(b){if(void 0===b&&(b={}),"object"==typeof b)return this.each(function(){var c=a(this),d=b.selector?b.selector:".slides > li",e=c.find(d);1===e.length&&b.allowOneSlide===!0||0===e.length?(e.fadeIn(400),b.start&&b.start(c)):void 0===c.data("flexslider")&&new a.flexslider(this,b)});var c=a(this).data("flexslider");switch(b){case"play":c.play();break;case"pause":c.pause();break;case"stop":c.stop();break;case"next":c.flexAnimate(c.getTarget("next"),!0);break;case"prev":case"previous":c.flexAnimate(c.getTarget("prev"),!0);break;case"destroy":c.destroy();break;default:"number"==typeof b&&c.flexAnimate(b,!0)}}}(jQuery),function(a,b,c,d){"use strict";function e(b,c){this.element=b,this.settings=a.extend({},g,c),this._defaults=g,this._name=f,this.geocoder=new google.maps.Geocoder,this.next_address=0,this.infowindow=new google.maps.InfoWindow,this.markers=[],this.query_sent=!1,this.last_cache_index="none",this.bounds=new google.maps.LatLngBounds,this.init()}var f="fusion_maps",g={addresses:{},address_pin:!0,animations:!0,delay:10,infobox_background_color:!1,infobox_styling:"default",infobox_text_color:!1,map_style:"default",map_type:"roadmap",marker_icon:!1,overlay_color:!1,overlay_color_hsl:{},pan_control:!0,show_address:!0,scale_control:!0,scrollwheel:!0,zoom:9,zoom_control:!0};a.extend(e.prototype,{init:function(){var b,d,e={zoom:this.settings.zoom,mapTypeId:this.settings.map_type,scrollwheel:this.settings.scrollwheel,scaleControl:this.settings.scale_control,panControl:this.settings.pan_control,zoomControl:this.settings.zoom_control},f=a(c).width()>640?!0:!1,g=this;this.settings.scrollwheel||(e.draggable=f),this.settings.address_pin||(this.settings.addresses=[this.settings.addresses[0]]),jQuery.each(this.settings.addresses,function(a){0==this.cache&&(g.last_cache_index=a)}),this.settings.addresses[0].coordinates&&(b=new google.maps.LatLng(this.settings.addresses[0].latitude,this.settings.addresses[0].longitude),e.center=b),this.map=new google.maps.Map(this.element,e),this.settings.overlay_color&&"custom"==this.settings.map_style&&(d=[{stylers:[{hue:this.settings.overlay_color},{lightness:2*this.settings.overlay_color_hsl.lum-100},{saturation:2*this.settings.overlay_color_hsl.sat-100}]},{featureType:"road",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"road",elementType:"labels"}],this.map.setOptions({styles:d}));var h=google.maps.event.addListener(this.map,"bounds_changed",function(){var a=new google.maps.LatLng(g.settings.addresses[0].latitude,g.settings.addresses[0].longitude);g.map.setZoom(g.settings.zoom),g.map.setCenter(a),google.maps.event.removeListener(h)});this.next_geocode_request()},geocode_address:function(a,b){var c,d,e,f,g,h=this,i=!0;"object"==typeof a&&0==a.cache?(i=!1,a.coordinates===!0?(c=new google.maps.LatLng(a.latitude,a.longitude),d={latLng:c}):d={address:a.address},this.geocoder.geocode(d,function(d,e){var f,g,j;if(e==google.maps.GeocoderStatus.OK?(a.coordinates===!0?(j=c,f=jQuery.trim(a.latitude),g=jQuery.trim(a.longitude)):(j=d[0].geometry.location,f=j.lat(),g=j.lng()),h.settings.addresses[b].latitude=f,h.settings.addresses[b].longitude=g,a.coordinates===!0&&""===a.infobox_content&&(a.geocoded_address=d[0].formatted_address),1!=h.next_address||a.coordinates||h.map.setCenter(j),h.settings.address_pin&&h.create_marker(a,f,g),0==h.next_address&&h.map.setCenter(j)):e==google.maps.GeocoderStatus.OVER_QUERY_LIMIT&&(h.next_address--,h.settings.delay++),0==i&&0==h.query_sent&&h.last_cache_index==b){var k={action:"fusion_cache_map",addresses:h.settings.addresses,security:js_local_vars.admin_ajax_nonce};jQuery.post(js_local_vars.admin_ajax,k),h.query_sent=!0}h.next_geocode_request()})):"object"==typeof a&&1==a.cache&&(e=jQuery.trim(a.latitude),f=jQuery.trim(a.longitude),g=new google.maps.LatLng(e,f),a.coordinates===!0&&""===a.infobox_content&&(a.geocoded_address=a.geocoded_address),h.settings.address_pin&&h.create_marker(a,e,f),0==h.next_address&&h.map.setCenter(g),h.next_geocode_request())},create_marker:function(a,b,c,d){var e,f,g={position:new google.maps.LatLng(b,c),map:this.map};this.bounds.extend(g.position),a.infobox_content?e=a.infobox_content:(e=a.address,a.coordinates===!0&&a.geocoded_address&&(e=a.geocoded_address)),this.settings.animations&&(g.animation=google.maps.Animation.DROP),"custom"==this.settings.map_style&&"theme"==this.settings.marker_icon?g.icon=new google.maps.MarkerImage(a.marker,null,null,null,new google.maps.Size(37,55)):"custom"==this.settings.map_style&&a.marker&&(g.icon=a.marker),f=new google.maps.Marker(g),this.markers.push(f),this.create_infowindow(e,f),this.next_address>=this.settings.addresses.length&&this.map.fitBounds(this.bounds)},create_infowindow:function(a,b){var d,e,f,g=this;"custom"==this.settings.infobox_styling&&"custom"==this.settings.map_style?(e=c.createElement("div"),f={content:e,disableAutoPan:!0,maxWidth:150,pixelOffset:new google.maps.Size(-125,10),zIndex:null,boxStyle:{background:"none",opacity:1,width:"250px"},closeBoxMargin:"2px 2px 2px 2px",closeBoxURL:"//www.google.com/intl/en_us/mapfiles/close.gif",infoBoxClearance:new google.maps.Size(1,1)},e.className="fusion-info-box",e.style.cssText="background-color:"+this.settings.infobox_background_color+";color:"+this.settings.infobox_text_color+";",e.innerHTML=a,d=new InfoBox(f),d.open(this.map,b),this.settings.show_address||d.close(this.map,b),google.maps.event.addListener(b,"click",function(){var a=d.getMap();null===a||"undefined"==typeof a?d.open(g.map,this):d.close(g.map,this)})):(d=new google.maps.InfoWindow({disableAutoPan:!0,content:a}),this.settings.show_address&&(d.show=!0,d.open(this.map,b)),google.maps.event.addListener(b,"click",function(){var a=d.getMap();null===a||"undefined"==typeof a?d.open(g.map,this):d.close(g.map,this)}))},next_geocode_request:function(){var a=this;a.next_addressCongratulations, you've reached the end of the internet.",img:"data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBFAJNv1DVV01MAdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJghQSwT40PgfAl4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA40AqVCIhG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAUKABwALAcABADOAAsAAAX/IPd0D2dyRCoUp/k8gpHOKtseR9yiSmGbuBykler9XLAhkbDavXTL5k2oqFqNOxzUZPU5YYZd1XsD72rZpBjbeh52mSNnMSC8lwblKZGwi+0QfIJ8CncnCoCDgoVnBHmKfByGJimPkIwtiAeBkH6ZHJaKmCeVnKKTHIihg5KNq4uoqmEtcRUtEREMBggtEr4QDrjCuRC8h7/BwxENeicSF8DKy82pyNLMOxzWygzFmdvD2L3P0dze4+Xh1Arkyepi7dfFvvTtLQkZBC0T/FX3CRgCMOBHsJ+EHYQY7OinAGECgQsB+Lu3AOK+CewcWjwxQeJBihtNGHSoQOE+iQ3//4XkwBBhRZMcUS6YSXOAwIL8PGqEaSJCiYt9SNoCmnJPAgUVLChdaoFBURN8MAzl2PQphwQLfDFd6lTowglHve6rKpbjhK7/pG5VinZP1qkiz1rl4+tr2LRwWU64cFEihwEtZgbgR1UiHaMVvxpOSwBA37kzGz9e8G+B5MIEKLutOGEsAH2ATQwYfTmuX8aETWdGPZmiZcccNSzeTCA1Sw0bdiitC7LBWgu8jQr8HRzqgpK6gX88QbrB14z/kF+ELpwB8eVQj/JkqdylAudji/+ts3039vEEfK8Vz2dlvxZKG0CmbkKDBvllRd6fCzDvBLKBDSCeffhRJEFebFk1k/Mv9jVIoIJZSeBggwUaNeB+Qk34IE0cXlihcfRxkOAJFFhwGmKlmWDiakZhUJtnLBpnWWcnKaAZcxI0piFGGLBm1mc90kajSCveeBVWKeYEoU2wqeaQi0PetoE+rr14EpVC7oAbAUHqhYExbn2XHHsVqbcVew9tx8+XJKk5AZsqqdlddGpqAKdbAYBn1pcczmSTdWvdmZ17c1b3FZ99vnTdCRFM8OEcAhLwm1NdXnWcBBSMRWmfkWZqVlsmLIiAp/o1gGV2vpS4lalGYsUOqXrddcKCmK61aZ8SjEpUpVFVoCpTj4r661Km7kBHjrDyc1RAIQAAIfkEBQoAGwAsBwAEAM4ACwAABf/gtmUCd4goQQgFKj6PYKi0yrrbc8i4ohQt12EHcal+MNSQiCP8gigdz7iCioaCIvUmZLp8QBzW0EN2vSlCuDtFKaq4RyHzQLEKZNdiQDhRDVooCwkbfm59EAmKi4SGIm+AjIsKjhsqB4mSjT2IOIOUnICeCaB/mZKFNTSRmqVpmJqklSqskq6PfYYCDwYHDC4REQwGCBLGxxIQDsHMwhAIX8bKzcENgSLGF9PU1j3Sy9zX2NrgzQziChLk1BHWxcjf7N046tvN82715czn9Pryz6Ilc4ACj4EBOCZM8KEnAYYADBRKnACAYUMFv1wotIhCEcaJCisqwJFgAUSQGyX/kCSVUUTIdKMwJlyo0oXHlhskwrTJciZHEXsgaqS4s6PJiCAr1uzYU8kBBSgnWFqpoMJMUjGtDmUwkmfVmVypakWhEKvXsS4nhLW5wNjVroJIoc05wSzTr0PtiigpYe4EC2vj4iWrFu5euWIMRBhacaVJhYQBEFjA9jHjyQ0xEABwGceGAZYjY0YBOrRLCxUp29QM+bRkx5s7ZyYgVbTqwwti2ybJ+vLtDYpycyZbYOlptxdx0kV+V7lC5iJAyyRrwYKxAdiz82ng0/jnAdMJFz0cPi104Ec1Vj9/M6F173vKL/feXv156dw11tlqeMMnv4V5Ap53GmjQQH97nFfg+IFiucfgRX5Z8KAgbUlQ4IULIlghhhdOSB6AgX0IVn8eReghen3NRIBsRgnH4l4LuEidZBjwRpt6NM5WGwoW0KSjCwX6yJSMab2GwwAPDXfaBCtWpluRTQqC5JM5oUZAjUNS+VeOLWpJEQ7VYQANW0INJSZVDFSnZphjSikfmzE5N4EEbQI1QJmnWXCmHulRp2edwDXF43txukenJwvI9xyg9Q26Z3MzGUcBYFEChZh6DVTq34AU8Iflh51Sd+CnKFYQ6mmZkhqfBKfSxZWqA9DZanWjxmhrWwi0qtCrt/43K6WqVjjpmhIqgEGvculaGKklKstAACEAACH5BAUKABwALAcABADOAAsAAAX/ICdyQmaMYyAUqPgIBiHPxNpy79kqRXH8wAPsRmDdXpAWgWdEIYm2llCHqjVHU+jjJkwqBTecwItShMXkEfNWSh8e1NGAcLgpDGlRgk7EJ/6Ae3VKfoF/fDuFhohVeDeCfXkcCQqDVQcQhn+VNDOYmpSWaoqBlUSfmowjEA+iEAEGDRGztAwGCDcXEA60tXEiCrq8vREMEBLIyRLCxMWSHMzExnbRvQ2Sy7vN0zvVtNfU2tLY3rPgLdnDvca4VQS/Cpk3ABwSLQkYAQwT/P309vcI7OvXr94jBQMJ/nskkGA/BQBRLNDncAIAiDcG6LsxAWOLiQzmeURBKWSLCQbv/1F0eDGinJUKR47YY1IEgQASKk7Yc7ACRwZm7mHweRJoz59BJUogisKCUaFMR0x4SlJBVBFTk8pZivTR0K73rN5wqlXEAq5Fy3IYgHbEzQ0nLy4QSoCjXLoom96VOJEeCosK5n4kkFfqXjl94wa+l1gvAcGICbewAOAxY8l/Ky/QhAGz4cUkGxu2HNozhwMGBnCUqUdBg9UuW9eUynqSwLHIBujePef1ZGQZXcM+OFuEBeBhi3OYgLyqcuaxbT9vLkf4SeqyWxSQpKGB2gQpm1KdWbu72rPRzR9Ne2Nu9Kzr/1Jqj0yD/fvqP4aXOt5sW/5qsXXVcv1Nsp8IBUAmgswGF3llGgeU1YVXXKTN1FlhWFXW3gIE+DVChApysACHHo7Q4A35lLichh+ROBmLKAzgYmYEYDAhCgxKGOOMn4WR4kkDaoBBOxJtdNKQxFmg5JIWIBnQc07GaORfUY4AEkdV6jHlCEISSZ5yTXpp1pbGZbkWmcuZmQCaE6iJ0FhjMaDjTMsgZaNEHFRAQVp3bqXnZED1qYcECOz5V6BhSWCoVJQIKuKQi2KFKEkEFAqoAo7uYSmO3jk61wUUMKmknJ4SGimBmAa0qVQBhAAAIfkEBQoAGwAsBwAEAM4ACwAABf/gJm5FmRlEqhJC+bywgK5pO4rHI0D3pii22+Mg6/0Ej96weCMAk7cDkXf7lZTTnrMl7eaYoy10JN0ZFdco0XAuvKI6qkgVFJXYNwjkIBcNBgR8TQoGfRsJCRuCYYQQiI+ICosiCoGOkIiKfSl8mJkHZ4U9kZMbKaI3pKGXmJKrngmug4WwkhA0lrCBWgYFCCMQFwoQDRHGxwwGCBLMzRLEx8iGzMMO0cYNeCMKzBDW19lnF9DXDIY/48Xg093f0Q3s1dcR8OLe8+Y91OTv5wrj7o7B+7VNQqABIoRVCMBggsOHE36kSoCBIcSH3EbFangxogJYFi8CkJhqQciLJEf/LDDJEeJIBT0GsOwYUYJGBS0fjpQAMidGmyVP6sx4Y6VQhzs9VUwkwqaCCh0tmKoFtSMDmBOf9phg4SrVrROuasRQAaxXpVUhdsU6IsECZlvX3kwLUWzRt0BHOLTbNlbZG3vZinArge5Dvn7wbqtQkSYAAgtKmnSsYKVKo2AfW048uaPmG386i4Q8EQMBAIAnfB7xBxBqvapJ9zX9WgRS2YMpnvYMGdPK3aMjt/3dUcNI4blpj7iwkMFWDXDvSmgAlijrt9RTR78+PS6z1uAJZIe93Q8g5zcsWCi/4Y+C8bah5zUv3vv89uft30QP23punGCx5954oBBwnwYaNCDY/wYrsYeggnM9B2Fpf8GG2CEUVWhbWAtGouEGDy7Y4IEJVrbSiXghqGKIo7z1IVcXIkKWWR361QOLWWnIhwERpLaaCCee5iMBGJQmJGyPFTnbkfHVZGRtIGrg5HALEJAZbu39BuUEUmq1JJQIPtZilY5hGeSWsSk52G9XqsmgljdIcABytq13HyIM6RcUA+r1qZ4EBF3WHWB29tBgAzRhEGhig8KmqKFv8SeCeo+mgsF7YFXa1qWSbkDpom/mqR1PmHCqJ3fwNRVXjC7S6CZhFVCQ2lWvZiirhQq42SACt25IK2hv8TprriUV1usGgeka7LFcNmCldMLi6qZMgFLgpw16Cipb7bC1knXsBiEAACH5BAUKABsALAcABADOAAsAAAX/4FZsJPkUmUGsLCEUTywXglFuSg7fW1xAvNWLF6sFFcPb42C8EZCj24EJdCp2yoegWsolS0Uu6fmamg8n8YYcLU2bXSiRaXMGvqV6/KAeJAh8VgZqCX+BexCFioWAYgqNi4qAR4ORhRuHY408jAeUhAmYYiuVlpiflqGZa5CWkzc5fKmbbhIpsAoQDRG8vQwQCBLCwxK6vb5qwhfGxxENahvCEA7NzskSy7vNzzzK09W/PNHF1NvX2dXcN8K55cfh69Luveol3vO8zwi4Yhj+AQwmCBw4IYclDAAJDlQggVOChAoLKkgFkSCAHDwWLKhIEOONARsDKryogFPIiAUb/95gJNIiw4wnI778GFPhzBKFOAq8qLJEhQpiNArjMcHCmlTCUDIouTKBhApELSxFWiGiVKY4E2CAekPgUphDu0742nRrVLJZnyrFSqKQ2ohoSYAMW6IoDpNJ4bLdILTnAj8KUF7UeENjAKuDyxIgOuGiOI0EBBMgLNew5AUrDTMGsFixwBIaNCQuAXJB57qNJ2OWm2Aj4skwCQCIyNkhhtMkdsIuodE0AN4LJDRgfLPtn5YDLdBlraAByuUbBgxQwICxMOnYpVOPej074OFdlfc0TqC62OIbcppHjV4o+LrieWhfT8JC/I/T6W8oCl29vQ0XjLdBaA3s1RcPBO7lFvpX8BVoG4O5jTXRQRDuJ6FDTzEWF1/BCZhgbyAKE9qICYLloQYOFtahVRsWYlZ4KQJHlwHS/IYaZ6sZd9tmu5HQm2xi1UaTbzxYwJk/wBF5g5EEYOBZeEfGZmNdFyFZmZIR4jikbLThlh5kUUVJGmRT7sekkziRWUIACABk3T4qCsedgO4xhgGcY7q5pHJ4klBBTQRJ0CeHcoYHHUh6wgfdn9uJdSdMiebGJ0zUPTcoS286FCkrZxnYoYYKWLkBowhQoBeaOlZAgVhLidrXqg2GiqpQpZ4apwSwRtjqrB3muoF9BboaXKmshlqWqsWiGt2wphJkQbAU5hoCACH5BAUKABsALAcABADOAAsAAAX/oGFw2WZuT5oZROsSQnGaKjRvilI893MItlNOJ5v5gDcFrHhKIWcEYu/xFEqNv6B1N62aclysF7fsZYe5aOx2yL5aAUGSaT1oTYMBwQ5VGCAJgYIJCnx1gIOBhXdwiIl7d0p2iYGQUAQBjoOFSQR/lIQHnZ+Ue6OagqYzSqSJi5eTpTxGcjcSChANEbu8DBAIEsHBChe5vL13G7fFuscRDcnKuM3H0La3EA7Oz8kKEsXazr7Cw9/Gztar5uHHvte47MjktznZ2w0G1+D3BgirAqJmJMAQgMGEgwgn5Ei0gKDBhBMALGRYEOJBb5QcWlQo4cbAihZz3GgIMqFEBSM1/4ZEOWPAgpIIJXYU+PIhRG8ja1qU6VHlzZknJNQ6UanCjQkWCIGSUGEjAwVLjc44+DTqUQtPPS5gejUrTa5TJ3g9sWCr1BNUWZI161StiQUDmLYdGfesibQ3XMq1OPYthrwuA2yU2LBs2cBHIypYQPPlYAKFD5cVvNPtW8eVGbdcQADATsiNO4cFAPkvHpedPzc8kUcPgNGgZ5RNDZG05reoE9s2vSEP79MEGiQGy1qP8LA4ZcdtsJE48ONoLTBtTV0B9LsTnPceoIDBDQvS7W7vfjVY3q3eZ4A339J4eaAmKqU/sV58HvJh2RcnIBsDUw0ABqhBA5aV5V9XUFGiHfVeAiWwoFgJJrIXRH1tEMiDFV4oHoAEGlaWhgIGSGBO2nFomYY3mKjVglidaNYJGJDkWW2xxTfbjCbVaOGNqoX2GloR8ZeTaECS9pthRGJH2g0b3Agbk6hNANtteHD2GJUucfajCQBy5OOTQ25ZgUPvaVVQmbKh9510/qQpwXx3SQdfk8tZJOd5b6JJFplT3ZnmmX3qd5l1eg5q00HrtUkUn0AKaiGjClSAgKLYZcgWXwocGRcCFGCKwSB6ceqphwmYRUFYT/1WKlOdUpipmxW0mlCqHjYkAaeoZlqrqZ4qd+upQKaapn/AmgAegZ8KUtYtFAQQAgAh+QQFCgAbACwHAAQAzgALAAAF/+C2PUcmiCiZGUTrEkKBis8jQEquKwU5HyXIbEPgyX7BYa5wTNmEMwWsSXsqFbEh8DYs9mrgGjdK6GkPY5GOeU6ryz7UFopSQEzygOGhJBjoIgMDBAcBM0V/CYqLCQqFOwobiYyKjn2TlI6GKC2YjJZknouaZAcQlJUHl6eooJwKooobqoewrJSEmyKdt59NhRKFMxLEEA4RyMkMEAjDEhfGycqAG8TQx9IRDRDE3d3R2ctD1RLg0ttKEnbY5wZD3+zJ6M7X2RHi9Oby7u/r9g38UFjTh2xZJBEBMDAboogAgwkQI07IMUORwocSJwCgWDFBAIwZOaJIsOBjRogKJP8wTODw5ESVHVtm3AhzpEeQElOuNDlTZ0ycEUWKWFASqEahGwYUPbnxoAgEdlYSqDBkgoUNClAlIHbSAoOsqCRQnQHxq1axVb06FWFxLIqyaze0Tft1JVqyE+pWXMD1pF6bYl3+HTqAWNW8cRUFzmih0ZAAB2oGKukSAAGGRHWJgLiR6AylBLpuHKKUMlMCngMpDSAa9QIUggZVVvDaJobLeC3XZpvgNgCmtPcuwP3WgmXSq4do0DC6o2/guzcseECtUoO0hmcsGKDgOt7ssBd07wqesAIGZC1YIBa7PQHvb1+SFo+++HrJSQfB33xfav3i5eX3Hnb4CTJgegEq8tH/YQEOcIJzbm2G2EoYRLgBXFpVmFYDcREV4HIcnmUhiGBRouEMJGJGzHIspqgdXxK0yCKHRNXoIX4uorCdTyjkyNtdPWrA4Up82EbAbzMRxxZRR54WXVLDIRmRcag5d2R6ugl3ZXzNhTecchpMhIGVAKAYpgJjjsSklBEd99maZoo535ZvdamjBEpusJyctg3h4X8XqodBMx0tiNeg/oGJaKGABpogS40KSqiaEgBqlQWLUtqoVQnytekEjzo0hHqhRorppOZt2p923M2AAV+oBtpAnnPNoB6HaU6mAAIU+IXmi3j2mtFXuUoHKwXpzVrsjcgGOauKEjQrwq157hitGq2NoWmjh7z6Wmxb0m5w66+2VRAuXN/yFUAIACH5BAUKABsALAcABADOAAsAAAX/4CZuRiaM45MZqBgIRbs9AqTcuFLE7VHLOh7KB5ERdjJaEaU4ClO/lgKWjKKcMiJQ8KgumcieVdQMD8cbBeuAkkC6LYLhOxoQ2PF5Ys9PKPBMen17f0CCg4VSh32JV4t8jSNqEIOEgJKPlkYBlJWRInKdiJdkmQlvKAsLBxdABA4RsbIMBggtEhcQsLKxDBC2TAS6vLENdJLDxMZAubu8vjIbzcQRtMzJz79S08oQEt/guNiyy7fcvMbh4OezdAvGrakLAQwyABsELQkY9BP+//ckyPDD4J9BfAMh1GsBoImMeQUN+lMgUJ9CiRMa5msxoB9Gh/o8GmxYMZXIgxtR/yQ46S/gQAURR0pDwYDfywoyLPip5AdnCwsMFPBU4BPFhKBDi444quCmDKZOfwZ9KEGpCKgcN1jdALSpPqIYsabS+nSqvqplvYqQYAeDPgwKwjaMtiDl0oaqUAyo+3TuWwUAMPpVCfee0cEjVBGQq2ABx7oTWmQk4FglZMGN9fGVDMCuiH2AOVOu/PmyxM630gwM0CCn6q8LjVJ8GXvpa5Uwn95OTC/nNxkda1/dLSK475IjCD6dHbK1ZOa4hXP9DXs5chJ00UpVm5xo2qRpoxptwF2E4/IbJpB/SDz9+q9b1aNfQH08+p4a8uvX8B53fLP+ycAfemjsRUBgp1H20K+BghHgVgt1GXZXZpZ5lt4ECjxYR4ScUWiShEtZqBiIInRGWnERNnjiBglw+JyGnxUmGowsyiiZg189lNtPGACjV2+S9UjbU0JWF6SPvEk3QZEqsZYTk3UAaRSUnznJI5LmESCdBVSyaOWUWLK4I5gDUYVeV1T9l+FZClCAUVA09uSmRHBCKAECFEhW51ht6rnmWBXkaR+NjuHpJ40D3DmnQXt2F+ihZxlqVKOfQRACACH5BAUKABwALAcABADOAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7", msg:null,msgText:"Loading the next set of posts...",selector:null,speed:"fast",start:b},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:b,binder:a(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:b,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:b,path:b,prefill:!1,maxPage:b},a.infinitescroll.prototype={_binding:function(a){var c=this,d=c.options;return d.v="2.0b2.120520",d.behavior&&this["_binding_"+d.behavior]!==b?void this["_binding_"+d.behavior].call(this):"bind"!==a&&"unbind"!==a?(this._debug("Binding value "+a+" not valid"),!1):("unbind"===a?this.options.binder.unbind("smartscroll.infscr."+c.options.infid):this.options.binder[a]("smartscroll.infscr."+c.options.infid,function(){c.scroll()}),void this._debug("Binding",a))},_create:function(c,d){var e=a.extend(!0,{},a.infinitescroll.defaults,c);this.options=e;var f=a(window),g=this;if(!g._validate(c))return!1;var h=a(e.nextSelector).attr("href");if(!h)return this._debug("Navigation selector not found"),!1;e.path=e.path||this._determinepath(h),e.contentSelector=e.contentSelector||this.element,e.loading.selector=e.loading.selector||e.contentSelector,e.loading.msg=e.loading.msg||a('
    Loading...
    '+e.loading.msgText+"
    "),(new Image).src=e.loading.img,e.pixelsFromNavToBottom===b&&(e.pixelsFromNavToBottom=a(document).height()-a(e.navSelector).offset().top,this._debug("pixelsFromNavToBottom: "+e.pixelsFromNavToBottom));var i=this;return e.loading.start=e.loading.start||function(){a(e.navSelector).hide(),e.loading.msg.insertAfter(e.loading.selector).show(e.loading.speed,a.proxy(function(){this.beginAjax(e)},i))},e.loading.finished=e.loading.finished||function(){e.state.isBeyondMaxPage||e.loading.msg.fadeOut(e.loading.speed)},e.callback=function(c,g,h){e.behavior&&c["_callback_"+e.behavior]!==b&&c["_callback_"+e.behavior].call(a(e.contentSelector)[0],g,h),d&&d.call(a(e.contentSelector)[0],g,e,h),e.prefill&&f.bind("resize.infinite-scroll",c._prefill)},c.debug&&(!Function.prototype.bind||"object"!=typeof console&&"function"!=typeof console||"object"!=typeof console.log||["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.call(console[a],console)},Function.prototype.bind)),this._setup(),e.prefill&&this._prefill(),!0},_prefill:function(){function b(){return a(c.options.contentSelector).height()<=d.height()}var c=this,d=a(window);this._prefill=function(){b()&&c.scroll(),d.bind("resize.infinite-scroll",function(){b()&&(d.unbind("resize.infinite-scroll"),c.scroll())})},this._prefill()},_debug:function(){!0===this.options.debug&&("undefined"!=typeof console&&"function"==typeof console.log?1===Array.prototype.slice.call(arguments).length&&"string"==typeof Array.prototype.slice.call(arguments)[0]:Function.prototype.bind||"undefined"==typeof console||"object"!=typeof console.log||Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments)))},_determinepath:function(a){var c=this.options;if(c.behavior&&this["_determinepath_"+c.behavior]!==b)return this["_determinepath_"+c.behavior].call(this,a);if(c.pathParse)return this._debug("pathParse manual"),c.pathParse(a,this.options.state.currPage+1);if(a.match(/^(.*2?)\b2\b(.*?$)/))a=a.match(/^(.*2?)\b2\b(.*?$)/).slice(1);else if(a.match(/^(.*?)\b2\b(.*?$)/))a=a.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(a.match(/^(.*?)2(.*?$)/)){if(a.match(/^(.*?page=)2(\/.*|$)/))return a=a.match(/^(.*?page=)2(\/.*|$)/).slice(1);a=a.match(/^(.*?)2(.*?$)/).slice(1)}else{if(a.match(/^(.*?page=)1(\/.*|$)/))return a=a.match(/^(.*?page=)1(\/.*|$)/).slice(1);this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."),c.state.isInvalidPage=!0}return this._debug("determinePath",a),a},_error:function(a){var c=this.options;return c.behavior&&this["_error_"+c.behavior]!==b?void this["_error_"+c.behavior].call(this,a):("destroy"!==a&&"end"!==a&&(a="unknown"),this._debug("Error",a),("end"===a||c.state.isBeyondMaxPage)&&this._showdonemsg(),c.state.isDone=!0,c.state.currPage=1,c.state.isPaused=!1,c.state.isBeyondMaxPage=!1,void this._binding("unbind"))},_loadcallback:function(c,d,e){var f,g=this.options,h=this.options.callback,i=g.state.isDone?"done":g.appendCallback?"append":"no-append";if(g.behavior&&this["_loadcallback_"+g.behavior]!==b)return void this["_loadcallback_"+g.behavior].call(this,c,d,e);switch(i){case"done":return this._showdonemsg(),!1;case"no-append":if("html"===g.dataType&&(d="
    "+d+"
    ",d=a(d).find(g.itemSelector)),0===d.length)return this._error("end");break;case"append":var j=c.children();if(0===j.length)return this._error("end");for(f=document.createDocumentFragment();c[0].firstChild;)f.appendChild(c[0].firstChild);this._debug("contentSelector",a(g.contentSelector)[0]),a(g.contentSelector)[0].appendChild(f),d=j.get()}if(g.loading.finished.call(a(g.contentSelector)[0],g),g.animate){var k=a(window).scrollTop()+a(g.loading.msg).height()+g.extraScrollPx+"px";a("html,body").animate({scrollTop:k},800,function(){g.state.isDuringAjax=!1})}g.animate||(g.state.isDuringAjax=!1),h(this,d,e),g.prefill&&this._prefill()},_nearbottom:function(){var c=this.options,d=0+a(document).height()-c.binder.scrollTop()-a(window).height();return c.behavior&&this["_nearbottom_"+c.behavior]!==b?this["_nearbottom_"+c.behavior].call(this):(this._debug("math:",d,c.pixelsFromNavToBottom),d-c.bufferPx-1&&0===a(b[c]).length)return this._debug("Your "+c+" found no elements."),!1;return!0},bind:function(){this._binding("bind")},destroy:function(){return this.options.state.isDestroyed=!0,this.options.loading.finished(),this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(c){var d,e,f,g,h=this,i=c.path;if(c.state.currPage++,c.maxPage!==b&&c.state.currPage>c.maxPage)return c.state.isBeyondMaxPage=!0,void this.destroy();switch(d=a(a(c.contentSelector).is("table, tbody")?"":"
    "),e="function"==typeof i?i(c.state.currPage):i.join(c.state.currPage),h._debug("heading into ajax",e),f="html"===c.dataType||"json"===c.dataType?c.dataType:"html+callback",c.appendCallback&&"html"===c.dataType&&(f+="+callback"),f){case"html+callback":h._debug("Using HTML via .load() method"),d.load(e+" "+c.itemSelector,b,function(a){h._loadcallback(d,a,e)});break;case"html":h._debug("Using "+f.toUpperCase()+" via $.ajax() method"),a.ajax({url:e,dataType:c.dataType,complete:function(a,b){g="undefined"!=typeof a.isResolved?a.isResolved():"success"===b||"notmodified"===b,g?h._loadcallback(d,a.responseText,e):h._error("end")}});break;case"json":h._debug("Using "+f.toUpperCase()+" via $.ajax() method"),a.ajax({dataType:"json",type:"GET",url:e,success:function(a,f,i){if(g="undefined"!=typeof i.isResolved?i.isResolved():"success"===f||"notmodified"===f,c.appendCallback)if(c.template!==b){var j=c.template(a);d.append(j),g?h._loadcallback(d,j):h._error("end")}else h._debug("template must be defined."),h._error("end");else g?h._loadcallback(d,a,e):h._error("end")},error:function(){h._debug("JSON ajax request failed."),h._error("end")}})}},retrieve:function(c){c=c||null;var d=this,e=d.options;return e.behavior&&this["retrieve_"+e.behavior]!==b?void this["retrieve_"+e.behavior].call(this,c):e.state.isDestroyed?(this._debug("Instance is destroyed"),!1):(e.state.isDuringAjax=!0,void e.loading.start.call(a(e.contentSelector)[0],e))},scroll:function(){var a=this.options,c=a.state;return a.behavior&&this["scroll_"+a.behavior]!==b?void this["scroll_"+a.behavior].call(this):void(c.isDuringAjax||c.isInvalidPage||c.isDone||c.isDestroyed||c.isPaused||this._nearbottom()&&this.retrieve())},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))}},a.fn.infinitescroll=function(b,c){var d=typeof b;switch(d){case"string":var e=Array.prototype.slice.call(arguments,1);this.each(function(){var c=a.data(this,"infinitescroll");return c&&a.isFunction(c[b])&&"_"!==b.charAt(0)?void c[b].apply(c,e):!1});break;case"object":this.each(function(){var d=a.data(this,"infinitescroll");d?d.update(b):(d=new a.infinitescroll(b,c,this),d.failed||a.data(this,"infinitescroll",d))})}return this};var c,d=a.event;d.special.smartscroll={setup:function(){a(this).bind("scroll",d.special.smartscroll.handler)},teardown:function(){a(this).unbind("scroll",d.special.smartscroll.handler)},handler:function(b,d){var e=this,f=arguments;b.type="smartscroll",c&&clearTimeout(c),c=setTimeout(function(){a(e).trigger("smartscroll",f)},"execAsap"===d?0:100)}},a.fn.smartscroll=function(a){return a?this.bind("smartscroll",a):this.trigger("smartscroll",["execAsap"])}}),function(a,b,c){function d(a){var b={},d=/^jQuery\d+$/;return c.each(a.attributes,function(a,c){c.specified&&!d.test(c.name)&&(b[c.name]=c.value)}),b}function e(a,b){var d=this,e=c(d);if(d.value==e.attr("placeholder")&&e.hasClass("placeholder"))if(e.data("placeholder-password")){if(e=e.hide().next().show().attr("id",e.removeAttr("id").data("placeholder-id")),a===!0)return e[0].value=b;e.focus()}else d.value="",e.removeClass("placeholder"),d==g()&&d.select()}function f(){var a,b=this,f=c(b),g=this.id;if(""==b.value){if("password"==b.type){if(!f.data("placeholder-textinput")){try{a=f.clone().attr({type:"text"})}catch(h){a=c("").attr(c.extend(d(this),{type:"text"}))}a.removeAttr("name").data({"placeholder-password":f,"placeholder-id":g}).bind("focus.placeholder",e),f.data({"placeholder-textinput":a,"placeholder-id":g}).before(a)}f=f.removeAttr("id").hide().prev().attr("id",g).show()}f.addClass("placeholder"),f[0].value=f.attr("placeholder")}else f.removeClass("placeholder")}function g(){try{return b.activeElement}catch(a){}}var h,i,j="placeholder"in b.createElement("input"),k="placeholder"in b.createElement("textarea"),l=c.fn,m=c.valHooks,n=c.propHooks;j&&k?(i=l.placeholder=function(){return this},i.input=i.textarea=!0):(i=l.placeholder=function(){var a=this;return a.filter((j?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":f}).data("placeholder-enabled",!0).trigger("blur.placeholder"),a},i.input=j,i.textarea=k,h={get:function(a){var b=c(a),d=b.data("placeholder-password");return d?d[0].value:b.data("placeholder-enabled")&&b.hasClass("placeholder")?"":a.value},set:function(a,b){var d=c(a),h=d.data("placeholder-password");return h?h[0].value=b:d.data("placeholder-enabled")?(""==b?(a.value=b,a!=g()&&f.call(a)):d.hasClass("placeholder")?e.call(a,!0,b)||(a.value=b):a.value=b,d):a.value=b}},j||(m.input=h,n.value=h),k||(m.textarea=h,n.value=h),c(function(){c(b).delegate("form","submit.placeholder",function(){var a=c(".placeholder",this).each(e);setTimeout(function(){a.each(f)},10)})}),c(a).bind("beforeunload.placeholder",function(){c(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),function(a){a.fn.UItoTop=function(b){var c={text:"",min:200,inDelay:600,outDelay:400,containerID:"toTop",containerHoverID:"toTopHover",scrollSpeed:1200,easingType:"linear"},d=a.extend(c,b),e="#"+d.containerID,f="#"+d.containerHoverID;a("body").append('"),a(e).hide().on("click.UItoTop",function(){return a("html, body").animate({scrollTop:0},d.scrollSpeed,d.easingType),a("#"+d.containerHoverID,this).stop().animate({opacity:0},d.inDelay,d.easingType),!1}).prepend('').hover(function(){a(f,this).stop().animate({opacity:1},600,"linear")},function(){a(f,this).stop().animate({opacity:0},700,"linear")}),a(window).scroll(function(){var b=a(window).scrollTop();"undefined"==typeof document.body.style.maxHeight&&a(e).css({position:"absolute",top:b+a(window).height()-50}),b>d.min?a(e).fadeIn(d.inDelay):a(e).fadeOut(d.Outdelay)})}}(jQuery),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},b=[].slice;!function(a,b){return"function"==typeof define&&define.amd?define("waypoints",["jquery"],function(c){return b(c,a)}):b(a.jQuery,a)}(this,function(c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;return e=c(d),l=a.call(d,"ontouchstart")>=0,h={horizontal:{},vertical:{}},i=1,k={},j="waypoints-context-id",o="resize.waypoints",p="scroll.waypoints",q=1,r="waypoints-waypoint-ids",s="waypoint",t="waypoints",f=function(){function a(a){var b=this;this.$element=a,this.element=a[0],this.didResize=!1,this.didScroll=!1,this.id="context"+i++,this.oldScroll={x:a.scrollLeft(),y:a.scrollTop()},this.waypoints={horizontal:{},vertical:{}},a.data(j,this.id),k[this.id]=this,a.bind(p,function(){var a;return b.didScroll||l?void 0:(b.didScroll=!0,a=function(){return b.doScroll(),b.didScroll=!1},d.setTimeout(a,c[t].settings.scrollThrottle))}),a.bind(o,function(){var a;return b.didResize?void 0:(b.didResize=!0,a=function(){return c[t]("refresh"),b.didResize=!1},d.setTimeout(a,c[t].settings.resizeThrottle))})}return a.prototype.doScroll=function(){var a,b=this;return a={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},!l||a.vertical.oldScroll&&a.vertical.newScroll||c[t]("refresh"),c.each(a,function(a,d){var e,f,g;return g=[],f=d.newScroll>d.oldScroll,e=f?d.forward:d.backward,c.each(b.waypoints[a],function(a,b){var c,e;return d.oldScroll<(c=b.offset)&&c<=d.newScroll?g.push(b):d.newScroll<(e=b.offset)&&e<=d.oldScroll?g.push(b):void 0}),g.sort(function(a,b){return a.offset-b.offset}),f||g.reverse(),c.each(g,function(a,b){return b.options.continuous||a===g.length-1?b.trigger([e]):void 0})}),this.oldScroll={x:a.horizontal.newScroll,y:a.vertical.newScroll}},a.prototype.refresh=function(){var a,b,d,e=this;return d=c.isWindow(this.element),b=this.$element.offset(),this.doScroll(),a={horizontal:{contextOffset:d?0:b.left,contextScroll:d?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:d?0:b.top,contextScroll:d?0:this.oldScroll.y,contextDimension:d?c[t]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}},c.each(a,function(a,b){return c.each(e.waypoints[a],function(a,d){var e,f,g,h,i;return e=d.options.offset,g=d.offset,f=c.isWindow(d.element)?0:d.$element.offset()[b.offsetProp],c.isFunction(e)?e=e.apply(d.element):"string"==typeof e&&(e=parseFloat(e),d.options.offset.indexOf("%")>-1&&(e=Math.ceil(b.contextDimension*e/100))),d.offset=f-b.contextOffset+b.contextScroll-e,d.options.onlyOnScroll&&null!=g||!d.enabled?void 0:null!==g&&g<(h=b.oldScroll)&&h<=d.offset?d.trigger([b.backward]):null!==g&&g>(i=b.oldScroll)&&i>=d.offset?d.trigger([b.forward]):null===g&&b.oldScroll>=d.offset?d.trigger([b.forward]):void 0})})},a.prototype.checkEmpty=function(){return c.isEmptyObject(this.waypoints.horizontal)&&c.isEmptyObject(this.waypoints.vertical)?(this.$element.unbind([o,p].join(" ")),delete k[this.id]):void 0},a}(),g=function(){function a(a,b,d){var e,f;d=c.extend({},c.fn[s].defaults,d),"bottom-in-view"===d.offset&&(d.offset=function(){var a;return a=c[t]("viewportHeight"),c.isWindow(b.element)||(a=b.$element.height()),a-c(this).outerHeight()}),this.$element=a,this.element=a[0],this.axis=d.horizontal?"horizontal":"vertical",this.callback=d.handler,this.context=b,this.enabled=d.enabled,this.id="waypoints"+q++,this.offset=null,this.options=d,b.waypoints[this.axis][this.id]=this,h[this.axis][this.id]=this,e=null!=(f=a.data(r))?f:[],e.push(this.id),a.data(r,e)}return a.prototype.trigger=function(a){return this.enabled?(null!=this.callback&&this.callback.apply(this.element,a),this.options.triggerOnce?this.destroy():void 0):void 0},a.prototype.disable=function(){return this.enabled=!1},a.prototype.enable=function(){return this.context.refresh(),this.enabled=!0},a.prototype.destroy=function(){return delete h[this.axis][this.id],delete this.context.waypoints[this.axis][this.id],this.context.checkEmpty()},a.getWaypointsByElement=function(a){var b,d;return(d=c(a).data(r))?(b=c.extend({},h.horizontal,h.vertical),c.map(d,function(a){return b[a]})):[]},a}(),n={init:function(a,b){var d;return null==b&&(b={}),null==(d=b.handler)&&(b.handler=a),this.each(function(){var a,d,e,h;return a=c(this),e=null!=(h=b.context)?h:c.fn[s].defaults.context,c.isWindow(e)||(e=a.closest(e)),e=c(e),d=k[e.data(j)],d||(d=new f(e)),new g(a,d,b)}),c[t]("refresh"),this},disable:function(){return n._invoke(this,"disable")},enable:function(){return n._invoke(this,"enable")},destroy:function(){return n._invoke(this,"destroy")},prev:function(a,b){return n._traverse.call(this,a,b,function(a,b,c){return b>0?a.push(c[b-1]):void 0})},next:function(a,b){return n._traverse.call(this,a,b,function(a,b,c){return ba.oldScroll.y})},left:function(a){return null==a&&(a=d),m._filter(a,"horizontal",function(a,b){return b.offset<=a.oldScroll.x})},right:function(a){return null==a&&(a=d),m._filter(a,"horizontal",function(a,b){return b.offset>a.oldScroll.x})},enable:function(){return m._invoke("enable")},disable:function(){return m._invoke("disable")},destroy:function(){return m._invoke("destroy")},extendFn:function(a,b){return n[a]=b},_invoke:function(a){var b;return b=c.extend({},h.vertical,h.horizontal),c.each(b,function(b,c){return c[a](),!0})},_filter:function(a,b,d){var e,f;return(e=k[c(a).data(j)])?(f=[],c.each(e.waypoints[b],function(a,b){return d(e,b)?f.push(b):void 0}),f.sort(function(a,b){return a.offset-b.offset}),c.map(f,function(a){return a.element})):[]}},c[t]=function(){var a,c;return c=arguments[0],a=2<=arguments.length?b.call(arguments,1):[],m[c]?m[c].apply(null,a):m.aggregate.call(null,c)},c[t].settings={resizeThrottle:100,scrollThrottle:30},e.load(function(){return c[t]("refresh")})})}.call(this),window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function e(a,b){return d(x.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,"-")&&t[e]!==c)return"pfx"==b?e:!0}return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+z.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+A.join(d+" ")+d).split(" "),i(e,b,c))}function k(){o.input=function(c){for(var d=0,e=c.length;e>d;d++)E[c[d]]=!!(c[d]in u);return E.list&&(E.list=!(!b.createElement("datalist")||!a.HTMLDataListElement)),E}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),o.inputtypes=function(a){for(var d,e,f,g=0,h=a.length;h>g;g++)u.setAttribute("type",e=a[g]),d="text"!==u.type,d&&(u.value=v,u.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(e)&&u.style.WebkitAppearance!==c?(q.appendChild(u),f=b.defaultView,d=f.getComputedStyle&&"textfield"!==f.getComputedStyle(u,null).WebkitAppearance&&0!==u.offsetHeight,q.removeChild(u)):/^(search|tel)$/.test(e)||(d=/^(url|email)$/.test(e)?u.checkValidity&&u.checkValidity()===!1:u.value!=v)),D[a[g]]=!!d;return D}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var l,m,n="2.6.2",o={},p=!0,q=b.documentElement,r="modernizr",s=b.createElement(r),t=s.style,u=b.createElement("input"),v=":)",w={}.toString,x=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",z=y.split(" "),A=y.toLowerCase().split(" "),B={svg:"http://www.w3.org/2000/svg"},C={},D={},E={},F=[],G=F.slice,H=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:r+(d+1),j.appendChild(h);return f=["­",'"].join(""),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=q.style.overflow,q.style.overflow="hidden",q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},I=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return H("@media "+b+" { #"+r+" { position: absolute; } }",function(b){d="absolute"==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},J=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var g=a in e;return g||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),g=f(e[a],"function"),f(e[a],"undefined")||(e[a]=c),e.removeAttribute(a))),e=null,g}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),K={}.hasOwnProperty;m=f(K,"undefined")||f(K.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return K.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=G.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(G.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(G.call(arguments)))};return d}),C.flexbox=function(){return j("flexWrap")},C.canvas=function(){var a=b.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))},C.canvastext=function(){return!(!o.canvas||!f(b.createElement("canvas").getContext("2d").fillText,"function"))},C.webgl=function(){return!!a.WebGLRenderingContext},C.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:H(["@media (",x.join("touch-enabled),("),r,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},C.geolocation=function(){return"geolocation"in navigator},C.postmessage=function(){return!!a.postMessage},C.websqldatabase=function(){return!!a.openDatabase},C.indexedDB=function(){return!!j("indexedDB",a)},C.hashchange=function(){return J("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},C.history=function(){return!(!a.history||!history.pushState)},C.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},C.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},C.rgba=function(){return d("background-color:rgba(150,255,150,.5)"),g(t.backgroundColor,"rgba")},C.hsla=function(){return d("background-color:hsla(120,40%,100%,.5)"),g(t.backgroundColor,"rgba")||g(t.backgroundColor,"hsla")},C.multiplebgs=function(){return d("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(t.background)},C.backgroundsize=function(){return j("backgroundSize")},C.borderimage=function(){return j("borderImage")},C.borderradius=function(){return j("borderRadius")},C.boxshadow=function(){return j("boxShadow")},C.textshadow=function(){return""===b.createElement("div").style.textShadow},C.opacity=function(){return e("opacity:.55"),/^0.55$/.test(t.opacity)},C.cssanimations=function(){return j("animationName")},C.csscolumns=function(){return j("columnCount")},C.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)+x.join(c+a)).slice(0,-a.length)),g(t.backgroundImage,"gradient")},C.cssreflections=function(){return j("boxReflect")},C.csstransforms=function(){return!!j("transform")},C.csstransforms3d=function(){var a=!!j("perspective");return a&&"webkitPerspective"in q.style&&H("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=9===b.offsetLeft&&3===b.offsetHeight}),a},C.csstransitions=function(){return j("transition")},C.fontface=function(){var a;return H('@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)&&0===g.indexOf(d.split(" ")[0])}),a},C.generatedcontent=function(){var a;return H(["#",r,"{font:0/0 a}#",r,':after{content:"',v,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},C.video=function(){var a=b.createElement("video"),c=!1;try{(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},C.audio=function(){var a=b.createElement("audio"),c=!1;try{(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},C.localstorage=function(){try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(a){return!1}},C.sessionstorage=function(){try{return sessionStorage.setItem(r,r),sessionStorage.removeItem(r),!0}catch(a){return!1}},C.webworkers=function(){return!!a.Worker},C.applicationcache=function(){return!!a.applicationCache},C.svg=function(){return!!b.createElementNS&&!!b.createElementNS(B.svg,"svg").createSVGRect},C.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==B.svg},C.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(w.call(b.createElementNS(B.svg,"animate")))},C.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(w.call(b.createElementNS(B.svg,"clipPath")))};for(var L in C)m(C,L)&&(l=L.toLowerCase(),o[l]=C[L](),F.push((o[l]?"":"no-")+l));return o.input||k(),o.addTest=function(a,b){if("object"==typeof a)for(var d in a)m(a,d)&&o.addTest(d,a[d]);else{if(a=a.toLowerCase(),o[a]!==c)return o;b="function"==typeof b?b():b,"undefined"!=typeof p&&p&&(q.className+=" "+(b?"":"no-")+a),o[a]=b}return o},d(""),s=u=null,o._version=n,o._prefixes=x,o._domPrefixes=A,o._cssomPrefixes=z,o.mq=I,o.hasEvent=J,o.testProp=function(a){return h([a])},o.testAllProps=j,o.testStyles=H,o.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},q.className=q.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+F.join(" "):""),o}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==q.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=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[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,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;g>c;c++)d=a[c].split("="),(b=B[d.shift()])&&(f=b(f,d));for(c=0;e>c;c++)f=z[c](f);return f}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(A[i.url]?i.noexec=!0:A[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),A[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}),g(a,l,b,0,j);else if(Object(a)===a)for(i in h=function(){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++; return c}(),a)a.hasOwnProperty(i)&&(!c&&!--h&&(d(l)?l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}:l[i]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),n()}}(m[i])),g(a[i],l,b,i,j))}else!c&&n()}var h,i,j=!!a.test,k=a.load||a.both,l=a.callback||f,m=l,n=a.complete||f;c(j?a.yep:a.nope,!!k),k&&c(k)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(y(a))for(i=0;ih&&!b.requestAnimationFrame;++h)b.requestAnimationFrame=b[g[h]+"RequestAnimationFrame"],b.cancelAnimationFrame=b[g[h]+"CancelAnimationFrame"]||b[g[h]+"CancelRequestAnimationFrame"];b.requestAnimationFrame||(b.requestAnimationFrame=function(a,c){var d=(new Date).getTime(),f=d-e,g=Math.max(0,16-f),h=b.setTimeout(function(){a(d+g)},g);return e=d+g,h}),b.cancelAnimationFrame||(b.cancelAnimationFrame=function(a){clearTimeout(a)}),jQuery.fx.timer=function(a){a()&&jQuery.timers.push(a)&&!d&&(d=!0,f(a.elem))},jQuery.fx.stop=function(){d=!1}}(jQuery,this),function(a){function b(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),g=e,void 0!==c.axis&&c.axis===c.HORIZONTAL_AXIS&&(g=0,f=-1*e),void 0!==c.wheelDeltaY&&(g=c.wheelDeltaY/120),void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX/120),d.unshift(b,e,f,g),(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=c.length;d;)a.event.fixHooks[c[--d]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}(jQuery),function($,window,undefined){function getPixel(a,b){return parseInt(a.css(b),10)||0}function within(a,b,c){return b>a?b:a>c?c:a}function getViewport(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}}function removeHash(){history&&history.pushState&&history.pushState("",document.title,window.location.pathname+window.location.search)}function doAjax(a,b){var a="http://ilightbox.net/getSource/jsonp.php?url="+encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");$.ajax({url:a,dataType:"jsonp"}),iLCallback=function(a){b.call(this,a)}}function findImageInElement(a){var b=$("*",a),c=new Array;return b.each(function(){var a="",b=this;if("none"!=$(b).css("background-image")?a=$(b).css("background-image"):"undefined"!=typeof $(b).attr("src")&&"img"==b.nodeName.toLowerCase()&&(a=$(b).attr("src")),-1==a.indexOf("gradient")){a=a.replace(/url\(\"/g,""),a=a.replace(/url\(/g,""),a=a.replace(/\"\)/g,""),a=a.replace(/\)/g,"");for(var d=a.split(","),e=0;e0&&-1==$.inArray(d[e],c)){var f="";browser.msie&&browser.version<9&&(f="?"+floor(3e3*random())),c.push(d[e]+f)}}}),c}function getExtension(a){var b=a?a.split(".").pop().toLowerCase():"",c=-1!==b.indexOf("?")?"?"+b.split("?").pop():"";return b.replace(c,"")}function getTypeByExtension(a){var b,c=getExtension(a);return b=-1!==extensions.image.indexOf(c)?"image":-1!==extensions.flash.indexOf(c)?"flash":-1!==extensions.video.indexOf(c)?"video":"iframe"}function percentToValue(a,b){return parseInt(b/100*a)}function parseURI(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function absolutizeURI(a,b){function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}return b=parseURI(b||""),a=parseURI(a||""),b&&a?(b.protocol||a.protocol)+(b.protocol||b.authority?b.authority:a.authority)+c(b.protocol||b.authority||"/"===b.pathname.charAt(0)?b.pathname:b.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+b.pathname:a.pathname)+(b.protocol||b.authority||b.pathname?b.search:b.search||a.search)+b.hash:null}function version_compare(a,b,c){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var d=0,e=0,f=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},h=function(a){return a=(""+a).replace(/[_\-+]/g,"."),a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),a.length?a.split("."):[-8]},i=function(a){return a?isNaN(a)?g[a]||-7:parseInt(a,10):0};for(a=h(a),b=h(b),e=max(a.length,b.length),d=0;e>d;d++)if(a[d]!=b[d]){if(a[d]=i(a[d]),b[d]=i(b[d]),a[d]b[d]){f=1;break}}if(!c)return f;switch(c){case">":case"gt":return f>0;case">=":case"ge":return f>=0;case"<=":case"le":return 0>=f;case"==":case"=":case"eq":return 0===f;case"<>":case"!=":case"ne":return 0!==f;case"":case"<":case"lt":return 0>f;default:return null}}function getScrollXY(){var a=0,b=0;return"number"==typeof window.pageYOffset?(b=window.pageYOffset,a=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(b=document.body.scrollTop,a=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(b=document.documentElement.scrollTop,a=document.documentElement.scrollLeft),{x:a,y:b}}function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(a,b){b=b.replace("%%",a),alert(b)}function _QTAddAttribute(a,b,c){var d;return d=gTagAttrs[a+b],null==d&&(d=gTagAttrs[b]),null!=d?(0==b.indexOf(a)&&null==c&&(c=b.substring(a.length)),null==c&&(c=b),c+'="'+d+'" '):""}function _QTAddObjectAttr(a,b){return 0==a.indexOf("emb#")?"":(0==a.indexOf("obj#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("obj#",a,b))}function _QTAddEmbedAttr(a,b){return 0==a.indexOf("obj#")?"":(0==a.indexOf("emb#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("emb#",a,b))}function _QTAddObjectParam(a,b){var c,d="",e=b?" />":">";return-1==a.indexOf("emb#")&&(c=gTagAttrs["obj#"+a],null==c&&(c=gTagAttrs[a]),0==a.indexOf("obj#")&&(a=a.substring(4)),null!=c&&(d=' c.length||0!=c.length%2)return _QTComplain(a,gArgCountErr),"";gTagAttrs=[],gTagAttrs.src=c[0],gTagAttrs.width=c[1],gTagAttrs.height=c[2],gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/",a=c[3],(null==a||""==a)&&(a="6,0,2,0"),gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+a;for(var d,e=4;e\n"+_QTAddObjectParam("src",b),e=" \n"}function QT_GenerateOBJECTText(){return _QTGenerate("QT_GenerateOBJECTText",!1,arguments)}var extensions={flash:["swf"],image:["bmp","gif","jpeg","jpg","png","tiff","tif","jfif","jpe"],iframe:["asp","aspx","cgi","cfm","htm","html","jsp","php","pl","php3","php4","php5","phtml","rb","rhtml","shtml","txt"],video:["avi","mov","mpg","mpeg","movie","mp4","webm","ogv","ogg","3gp","m4v"]},$win=$(window),$doc=$(document),browser,transform,gpuAcceleration,fullScreenApi="",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(a,b,c,d){var e=this;if(e.options=b,e.selector=a.selector||a,e.context=a.context,e.instant=d,c.length<1?e.attachItems():e.items=c,e.vars={total:e.items.length,start:0,current:null,next:null,prev:null,BODY:$("body"),loadRequests:0,overlay:$('
    '),loader:$('
    '),toolbar:$('
    '),innerToolbar:$('
    '),title:$('
    '),closeButton:$(''),fullScreenButton:$(''),innerPlayButton:$(''),innerNextButton:$(''),innerPrevButton:$(''),holder:$('
    '),nextPhoto:$('
    '),prevPhoto:$('
    '),nextButton:$(''),prevButton:$(''),thumbnails:$('
    '),thumbs:!1,nextLock:!1,prevLock:!1,hashLock:!1,isMobile:!1,mobileMaxWidth:980,isInFullScreen:!1,isSwipe:!1,mouseID:0,cycleID:0,isPaused:0},e.vars.hideableElements=e.vars.nextButton.add(e.vars.prevButton),e.normalizeItems(),e.availPlugins(),e.options.startFrom=e.options.startFrom>0&&e.options.startFrom>=e.vars.total?e.vars.total-1:e.options.startFrom,e.options.startFrom=e.options.randomStart?floor(random()*e.vars.total):e.options.startFrom,e.vars.start=e.options.startFrom,d?e.instantCall():e.patchItemsEvents(),e.options.linkId&&(e.hashChangeHandler(),$win.iLightBoxHashChange(function(){e.hashChangeHandler()})),supportTouch){var f=/(click|mouseenter|mouseleave|mouseover|mouseout)/gi,g="itap";e.options.caption.show=e.options.caption.show.replace(f,g),e.options.caption.hide=e.options.caption.hide.replace(f,g),e.options.social.show=e.options.social.show.replace(f,g),e.options.social.hide=e.options.social.hide.replace(f,g)}e.options.controls.arrows&&$.extend(e.options.styles,{nextOffsetX:0,prevOffsetX:0,nextOpacity:0,prevOpacity:0})};iLightBox.prototype={showLoader:function(){var a=this;a.vars.loadRequests+=1,"horizontal"==a.options.path.toLowerCase()?a.vars.loader.stop().animate({top:"-30px"},a.options.show.speed,"easeOutCirc"):a.vars.loader.stop().animate({left:"-30px"},a.options.show.speed,"easeOutCirc")},hideLoader:function(){var a=this;a.vars.loadRequests-=1,a.vars.loadRequests=a.vars.loadRequests<0?0:a.vars.loadRequests,"horizontal"==a.options.path.toLowerCase()?a.vars.loadRequests<=0&&a.vars.loader.stop().animate({top:"-192px"},a.options.show.speed,"easeInCirc"):a.vars.loadRequests<=0&&a.vars.loader.stop().animate({left:"-192px"},a.options.show.speed,"easeInCirc")},createUI:function(){var a=this;a.ui={currentElement:a.vars.holder,nextElement:a.vars.nextPhoto,prevElement:a.vars.prevPhoto,currentItem:a.vars.current,nextItem:a.vars.next,prevItem:a.vars.prev,hide:function(){a.closeAction()},refresh:function(){arguments.length>0?a.repositionPhoto(!0):a.repositionPhoto()},fullscreen:function(){a.fullScreenAction()}}},attachItems:function(){var iL=this,itemsObject=new Array,items=new Array;$(iL.selector,iL.context).each(function(){var t=$(this),URL=t.attr(iL.options.attr)||null,options=t.data("options")&&eval("({"+t.data("options")+"})")||{},caption=t.data("caption"),title=t.data("title"),type=t.data("type")||getTypeByExtension(URL);items.push({URL:URL,caption:caption,title:title,type:type,options:options}),iL.instant||itemsObject.push(t)}),iL.items=items,iL.itemsObject=itemsObject,iL.vars&&(iL.vars.total=items.length)},normalizeItems:function(){var a=this,b=new Array;$.each(a.items,function(c,d){"string"==typeof d&&(d={url:d});var e=d.url||d.URL||null,f=d.options||{},g=d.caption||null,h=d.title||null,i=d.type?d.type.toLowerCase():getTypeByExtension(e),j="object"!=typeof e?getExtension(e):"";f.thumbnail=f.thumbnail||("image"==i?e:null),f.videoType=f.videoType||null,f.skin=f.skin||a.options.skin,f.width=f.width||null,f.height=f.height||null,f.mousewheel="undefined"!=typeof f.mousewheel?f.mousewheel:!0,f.swipe="undefined"!=typeof f.swipe?f.swipe:!0,f.social="undefined"!=typeof f.social?f.social:a.options.social.buttons&&$.extend({},{},a.options.social.buttons),"video"==i&&(f.html5video="undefined"!=typeof f.html5video?f.html5video:{},f.html5video.webm=f.html5video.webm||f.html5video.WEBM||null,f.html5video.controls="undefined"!=typeof f.html5video.controls?f.html5video.controls:"controls",f.html5video.preload=f.html5video.preload||"metadata",f.html5video.autoplay="undefined"!=typeof f.html5video.autoplay?f.html5video.autoplay:!1),f.width&&f.height||("video"==i?(f.width=js_local_vars.lightbox_video_width,f.height=js_local_vars.lightbox_video_height):"iframe"==i?(f.width=js_local_vars.lightbox_video_width,f.height=js_local_vars.lightbox_video_height):"flash"==i&&(f.width=js_local_vars.lightbox_video_width,f.height=js_local_vars.lightbox_video_height)),delete d.url,d.index=c,d.URL=e,d.caption=g,d.title=h,d.type=i,d.options=f,d.ext=j,b.push(d)}),a.items=b},instantCall:function(){var a=this,b=a.vars.start;a.vars.current=b,a.vars.next=a.items[b+1]?b+1:null,a.vars.prev=a.items[b-1]?b-1:null,a.addContents(),a.patchEvents()},addContents:function(){var a=this,b=a.vars,c=a.options,d=getViewport(),e=c.path.toLowerCase(),f=b.total>0&&a.items.filter(function(a,b,d){return-1===["image","flash","video"].indexOf(a.type)&&"undefined"==typeof a.recognized&&(c.smartRecognition||a.options.smartRecognition)}),g=f.length>0;c.mobileOptimizer&&!c.innerToolbar&&(b.isMobile=d.width<=b.mobileMaxWidth),b.overlay.addClass(c.skin).hide().css("opacity",c.overlay.opacity),c.linkId&&b.overlay[0].setAttribute("linkid",c.linkId),c.controls.toolbar&&(b.toolbar.addClass(c.skin).append(b.closeButton),c.controls.fullscreen&&b.toolbar.append(b.fullScreenButton),c.controls.slideshow&&b.toolbar.append(b.innerPlayButton),b.total>1&&b.toolbar.append(b.innerPrevButton).append(b.innerNextButton)),b.BODY.addClass("ilightbox-noscroll").append(b.overlay).append(b.loader).append(b.holder).append(b.nextPhoto).append(b.prevPhoto),c.innerToolbar||b.BODY.append(b.toolbar),c.controls.arrows&&b.BODY.append(b.nextButton).append(b.prevButton),c.controls.thumbnail&&b.total>1&&(b.BODY.append(b.thumbnails),b.thumbnails.addClass(c.skin).addClass("ilightbox-"+e),$("div.ilightbox-thumbnails-grid",b.thumbnails).empty(),b.thumbs=!0);var h="horizontal"==c.path.toLowerCase()?{left:parseInt(d.width/2-b.loader.outerWidth()/2)}:{top:parseInt(d.height/2-b.loader.outerHeight()/2)};b.loader.addClass(c.skin).css(h),b.nextButton.add(b.prevButton).addClass(c.skin),"horizontal"==e&&b.loader.add(b.nextButton).add(b.prevButton).addClass("horizontal"),b.BODY[b.isMobile?"addClass":"removeClass"]("isMobile"),c.infinite||(b.prevButton.add(b.prevButton).add(b.innerPrevButton).add(b.innerNextButton).removeClass("disabled"),b.nextButton.add(b.prevButton).add(b.innerPrevButton).add(b.innerNextButton).removeClass("disabled"),0==b.current&&b.prevButton.add(b.innerPrevButton).addClass("disabled"),b.current>=b.total-1&&b.nextButton.add(b.innerNextButton).addClass("disabled")),c.show.effect?(b.overlay.stop().fadeIn(c.show.speed),b.toolbar.stop().fadeIn(c.show.speed)):(b.overlay.show(),b.toolbar.show());var i=f.length;g?(a.showLoader(),$.each(f,function(d,e){var f=function(d){var e=-1,f=(a.items.filter(function(a,b,c){return a.URL==d.url&&(e=b),a.URL==d.url}),a.items[e]);d&&$.extend(!0,f,{URL:d.source,type:d.type,recognized:!0,options:{html5video:d.html5video,width:"image"==d.type?0:d.width||f.width,height:"image"==d.type?0:d.height||f.height,thumbnail:f.options.thumbnail||d.thumbnail}}),i--,0==i&&(a.hideLoader(),b.dontGenerateThumbs=!1,a.generateThumbnails(),c.show.effect?setTimeout(function(){a.generateBoxes()},c.show.speed):a.generateBoxes())};a.ogpRecognition(this,f)})):c.show.effect?setTimeout(function(){a.generateBoxes()},c.show.speed):a.generateBoxes(),a.createUI(),window.iLightBox={close:function(){a.closeAction()},fullscreen:function(){a.fullScreenAction()},moveNext:function(){a.moveTo("next")},movePrev:function(){a.moveTo("prev")},goTo:function(b){a.goTo(b)},refresh:function(){a.refresh()},reposition:function(){arguments.length>0?a.repositionPhoto(!0):a.repositionPhoto()},setOption:function(b){a.setOption(b)},destroy:function(){a.closeAction(),a.dispatchItemsEvents()}},c.linkId&&(b.hashLock=!0,window.location.hash=c.linkId+"/"+b.current,setTimeout(function(){b.hashLock=!1},55)),c.slideshow.startPaused||(a.resume(),b.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")),"function"==typeof a.options.callback.onOpen&&a.options.callback.onOpen.call(a)},loadContent:function(a,b,c){var d,e,f=this;switch(f.createUI(),a.speed=c||f.options.effects.loadedFadeSpeed,"current"==b&&(a.options.mousewheel?f.vars.lockWheel=!1:f.vars.lockWheel=!0,a.options.swipe?f.vars.lockSwipe=!1:f.vars.lockSwipe=!0),b){case"current":d=f.vars.holder,e=f.vars.current;break;case"next":d=f.vars.nextPhoto,e=f.vars.next;break;case"prev":d=f.vars.prevPhoto,e=f.vars.prev}if(d.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")).addClass(a.options.skin),$("div.ilightbox-inner-toolbar",d).remove(),a.title||f.options.innerToolbar){var g=f.vars.innerToolbar.clone();if(a.title&&f.options.show.title){var h=f.vars.title.clone();h.empty().html(a.title),g.append(h)}f.options.innerToolbar&&g.append(f.vars.total>1?f.vars.toolbar.clone():f.vars.toolbar),d.prepend(g)}f.loadSwitcher(a,d,e,b)},loadSwitcher:function(a,b,c,d){var e=this,g=e.options,h={element:b,position:c};switch(a.type){case"image":"function"==typeof g.callback.onBeforeLoad&&g.callback.onBeforeLoad.call(e,e.ui,c),"function"==typeof a.options.onBeforeLoad&&a.options.onBeforeLoad.call(e,h),e.loadImage(a.URL,function(f){"function"==typeof g.callback.onAfterLoad&&g.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,h);var i=f?f.width:400,j=f?f.height:200;b.data({naturalWidth:i,naturalHeight:j}),$("div.ilightbox-container",b).empty().append(f?'':''+g.errors.loadImage+""),"function"==typeof g.callback.onRender&&g.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,h),e.configureHolder(a,d,b)});break;case"video":b.data({naturalWidth:a.options.width,naturalHeight:a.options.height}),e.addContent(b,a),"function"==typeof g.callback.onRender&&g.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,h),e.configureHolder(a,d,b);break;case"iframe":for(var i=a.URL.substring(a.URL.indexOf("?")+1).split("&"),j={},k=0;k
    ').css(o).html(k)),b.show().data({naturalWidth:m||l.outerWidth(),naturalHeight:n||l.outerHeight()}).hide(),"function"==typeof g.callback.onRender&&g.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,h);var q=findImageInElement(b);e.loadImage(q,function(){"function"==typeof g.callback.onAfterLoad&&g.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,h),e.configureHolder(a,d,b)}),g.ajaxSetup.success(f,i,j),"function"==typeof p.success&&p.success(f,i,j)},error:function(i,j,k){"function"==typeof g.callback.onAfterLoad&&g.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,h),f,e.hideLoader(),$("div.ilightbox-container",b).empty().append(''+g.errors.loadContents+""),e.configureHolder(a,d,b),g.ajaxSetup.error(i,j,k),"function"==typeof p.error&&p.error(i,j,k)}});break;case"html":var m,q=a.URL;if(container=$("div.ilightbox-container",b),q[0].nodeName)m=q.clone();else{var r=$(q);m=r.selector?$("
    "+r+"
    "):r}var s=e.items[c].options.width||parseInt(m.attr("width")),t=e.items[c].options.height||parseInt(m.attr("height"));e.addContent(b,a),m.appendTo(document.documentElement).hide(),"function"==typeof g.callback.onRender&&g.callback.onRender.call(e,e.ui,c),"function"==typeof a.options.onRender&&a.options.onRender.call(e,h);var o=findImageInElement(b);"function"==typeof g.callback.onBeforeLoad&&g.callback.onBeforeLoad.call(e,e.ui,c),"function"==typeof a.options.onBeforeLoad&&a.options.onBeforeLoad.call(e,h),e.loadImage(o,function(){"function"==typeof g.callback.onAfterLoad&&g.callback.onAfterLoad.call(e,e.ui,c),"function"==typeof a.options.onAfterLoad&&a.options.onAfterLoad.call(e,h),b.show().data({naturalWidth:s||container.outerWidth(),naturalHeight:t||container.outerHeight()}).hide(),m.remove(),e.configureHolder(a,d,b)})}},configureHolder:function(a,b,c){var d=this,e=d.vars,f=d.options;if("current"!=b&&c.addClass("next"==b?"ilightbox-next":"ilightbox-prev"),"current"==b)var g=e.current;else if("next"==b)var h=f.styles.nextOpacity,g=e.next;else var h=f.styles.prevOpacity,g=e.prev;var i={element:c,position:g};d.items[g].options.width=d.items[g].options.width||0,d.items[g].options.height=d.items[g].options.height||0,"current"==b?f.show.effect?c.css(transform,gpuAcceleration).fadeIn(a.speed,function(){if(c.css(transform,""),a.caption){d.setCaption(a,c);var b=$("div.ilightbox-caption",c),e=parseInt(b.outerHeight()/c.outerHeight()*100);f.caption.start&50>=e&&b.fadeIn(f.effects.fadeSpeed)}var h=a.options.social;h&&(d.setSocial(h,a.URL,c),f.social.start&&$("div.ilightbox-social",c).fadeIn(f.effects.fadeSpeed)),d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)}):(c.show(),d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)):f.show.effect?c.fadeTo(a.speed,h,function(){"next"==b?e.nextLock=!1:e.prevLock=!1,d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)}):(c.css({opacity:h}).show(),"next"==b?e.nextLock=!1:e.prevLock=!1,d.generateThumbnails(),"function"==typeof f.callback.onShow&&f.callback.onShow.call(d,d.ui,g),"function"==typeof a.options.onShow&&a.options.onShow.call(d,i)),setTimeout(function(){d.repositionPhoto()},0)},generateBoxes:function(){var a=this,b=a.vars,c=a.options;c.infinite&&b.total>=3?(b.current==b.total-1&&(b.next=0),0==b.current&&(b.prev=b.total-1)):c.infinite=!1,a.loadContent(a.items[b.current],"current",c.show.speed),a.items[b.next]&&a.loadContent(a.items[b.next],"next",c.show.speed),a.items[b.prev]&&a.loadContent(a.items[b.prev],"prev",c.show.speed)},generateThumbnails:function(){var a=this,b=a.vars,c=a.options,d=null;if(b.thumbs&&!a.vars.dontGenerateThumbs){var e=b.thumbnails,f=$("div.ilightbox-thumbnails-container",e),g=$("div.ilightbox-thumbnails-grid",f),h=0;g.removeAttr("style").empty(),$.each(a.items,function(i,j){var k=b.current==i?"ilightbox-active":"",l=b.current==i?c.thumbnails.activeOpacity:c.thumbnails.normalOpacity,m=j.options.thumbnail,n=$('
    '),o=$('
    ');n.css({opacity:0}).addClass(k),"video"!=j.type&&"flash"!=j.type||"undefined"!=typeof j.options.icon?j.options.icon&&(o.addClass("ilightbox-thumbnail-"+j.options.icon),n.append(o)):(o.addClass("ilightbox-thumbnail-video"),n.append(o)),m&&a.loadImage(m,function(b){h++,b?n.data({naturalWidth:b.width,naturalHeight:b.height}).append(''):n.data({naturalWidth:c.thumbnails.maxWidth,naturalHeight:c.thumbnails.maxHeight}),clearTimeout(d),d=setTimeout(function(){a.positionThumbnails(e,f,g)},20),setTimeout(function(){n.fadeTo(c.effects.loadedFadeSpeed,l)},20*h)}),g.append(n)}),a.vars.dontGenerateThumbs=!0}},positionThumbnails:function(a,b,c){var d=this,e=d.vars,f=d.options,g=getViewport(),h=f.path.toLowerCase();a||(a=e.thumbnails),b||(b=$("div.ilightbox-thumbnails-container",a)),c||(c=$("div.ilightbox-thumbnails-grid",b));var i=$(".ilightbox-thumbnail",c),j="horizontal"==h?g.width-f.styles.pageOffsetX:i.eq(0).outerWidth()-f.styles.pageOffsetX,k="horizontal"==h?i.eq(0).outerHeight()-f.styles.pageOffsetY:g.height-f.styles.pageOffsetY,l="horizontal"==h?0:j,m="horizontal"==h?k:0,n=$(".ilightbox-active",c),o={};arguments.length<3&&(i.css({opacity:f.thumbnails.normalOpacity}),n.css({opacity:f.thumbnails.activeOpacity})),i.each(function(a){var b=$(this),c=b.data(),e="horizontal"==h?0:f.thumbnails.maxWidth;height="horizontal"==h?f.thumbnails.maxHeight:0,dims=d.getNewDimenstions(e,height,c.naturalWidth,c.naturalHeight,!0),b.css({width:dims.width,height:dims.height}),"horizontal"==h&&b.css({"float":"left"}),"horizontal"==h?l+=b.outerWidth():m+=b.outerHeight()}),o={width:l,height:m},c.css(o),o={};var p=c.offset(),q=n.length?n.offset():{top:parseInt(k/2),left:parseInt(j/2)};p.top=p.top-$doc.scrollTop(),p.left=p.left-$doc.scrollLeft(),q.top=q.top-p.top-$doc.scrollTop(),q.left=q.left-p.left-$doc.scrollLeft(),"horizontal"==h?(o.top=0,o.left=parseInt(j/2-q.left-n.outerWidth()/2)):(o.top=parseInt(k/2-q.top-n.outerHeight()/2),o.left=0),arguments.length<3?c.stop().animate(o,f.effects.repositionSpeed,"easeOutCirc"):c.css(o)},loadImage:function(a,b){$.isArray(a)||(a=[a]);var c=this,d=a.length;d>0?(c.showLoader(),$.each(a,function(e,f){var g=new Image;g.onload=function(){d-=1,0==d&&(c.hideLoader(),b(g))},g.onerror=g.onabort=function(){d-=1,0==d&&(c.hideLoader(),b(!1))},g.src=a[e]})):b(!1)},patchItemsEvents:function(){var a=this,b=a.vars,c=supportTouch?"itap.iL":"click.iL",d=supportTouch?"click.iL":"itap.iL"; if(a.context&&a.selector){var e=$(a.selector,a.context);$(a.context).on(c,a.selector,function(){var c=$(this),d=e.index(c);return b.current=d,b.next=a.items[d+1]?d+1:null,b.prev=a.items[d-1]?d-1:null,a.addContents(),a.patchEvents(),!1}).on(d,a.selector,function(){return!1})}else $.each(a.itemsObject,function(e,f){f.on(c,function(){return b.current=e,b.next=a.items[e+1]?e+1:null,b.prev=a.items[e-1]?e-1:null,a.addContents(),a.patchEvents(),!1}).on(d,function(){return!1})})},dispatchItemsEvents:function(){var a=this;a.vars,a.options;a.context&&a.selector?$(a.context).off(".iL",a.selector):$.each(a.itemsObject,function(a,b){b.off(".iL")})},refresh:function(){var a=this;a.dispatchItemsEvents(),a.attachItems(),a.normalizeItems(),a.patchItemsEvents()},patchEvents:function(){function a(a){c.isMobile||(c.mouseID||c.hideableElements.show(),c.mouseID=clearTimeout(c.mouseID),-1===j.indexOf(a.target)&&(c.mouseID=setTimeout(function(){c.hideableElements.hide(),c.mouseID=clearTimeout(c.mouseID)},3e3)))}var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f=$(".ilightbox-holder"),g=fullScreenApi.fullScreenEventName+".iLightBox",h=1e3,i=verticalDistanceThreshold=100,j=[c.nextButton[0],c.prevButton[0],c.nextButton[0].firstChild,c.prevButton[0].firstChild];$win.bind("resize.iLightBox",function(){var a=getViewport();d.mobileOptimizer&&!d.innerToolbar&&(c.isMobile=a.width<=c.mobileMaxWidth),c.BODY[c.isMobile?"addClass":"removeClass"]("isMobile"),b.repositionPhoto(null),supportTouch&&(clearTimeout(c.setTime),c.setTime=setTimeout(function(){var a=getScrollXY().y;window.scrollTo(0,a-30),window.scrollTo(0,a+30),window.scrollTo(0,a)},2e3)),c.thumbs&&b.positionThumbnails()}).bind("keydown.iLightBox",function(a){if(d.controls.keyboard)switch(a.keyCode){case 13:a.shiftKey&&d.keyboard.shift_enter&&b.fullScreenAction();break;case 27:d.keyboard.esc&&b.closeAction();break;case 37:d.keyboard.left&&!c.lockKey&&b.moveTo("prev");break;case 38:d.keyboard.up&&!c.lockKey&&b.moveTo("prev");break;case 39:d.keyboard.right&&!c.lockKey&&b.moveTo("next");break;case 40:d.keyboard.down&&!c.lockKey&&b.moveTo("next")}}),fullScreenApi.supportsFullScreen&&$win.bind(g,function(){b.doFullscreen()});var k=[d.caption.show+".iLightBox",d.caption.hide+".iLightBox",d.social.show+".iLightBox",d.social.hide+".iLightBox"].filter(function(a,b,c){return c.lastIndexOf(a)===b}),l="";$.each(k,function(a,b){0!=a&&(l+=" "),l+=b}),$doc.on(clickEvent,".ilightbox-overlay",function(){d.overlay.blur&&b.closeAction()}).on(clickEvent,".ilightbox-next, .ilightbox-next-button",function(){b.moveTo("next")}).on(clickEvent,".ilightbox-prev, .ilightbox-prev-button",function(){b.moveTo("prev")}).on(clickEvent,".ilightbox-thumbnail",function(){var a=$(this),d=$(".ilightbox-thumbnail",c.thumbnails),e=d.index(a);e!=c.current&&b.goTo(e)}).on(l,".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(a){var b=$("div.ilightbox-caption",c.holder),e=$("div.ilightbox-social",c.holder),f=d.effects.fadeSpeed;c.nextLock||c.prevLock?(a.type!=d.caption.show||b.is(":visible")?a.type==d.caption.hide&&b.is(":visible")&&b.fadeOut(f):b.fadeIn(f),a.type!=d.social.show||e.is(":visible")?a.type==d.social.hide&&e.is(":visible")&&e.fadeOut(f):e.fadeIn(f)):(a.type!=d.caption.show||b.is(":visible")?a.type==d.caption.hide&&b.is(":visible")&&b.stop().fadeOut(f):b.stop().fadeIn(f),a.type!=d.social.show||e.is(":visible")?a.type==d.social.hide&&e.is(":visible")&&e.stop().fadeOut(f):e.stop().fadeIn(f))}).on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-wrapper",function(a){"mouseenter"==a.type?c.lockWheel=!0:c.lockWheel=!1}).on(clickEvent,".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause",function(){var a=$(this);a.hasClass("ilightbox-fullscreen")?b.fullScreenAction():a.hasClass("ilightbox-play")?(b.resume(),a.addClass("ilightbox-pause").removeClass("ilightbox-play")):a.hasClass("ilightbox-pause")?(b.pause(),a.addClass("ilightbox-play").removeClass("ilightbox-pause")):b.closeAction()}).on(touchMoveEvent,".ilightbox-overlay, .ilightbox-thumbnails-container",function(a){a.preventDefault()}),d.controls.arrows&&!supportTouch&&$doc.on("mousemove.iLightBox",a),d.controls.slideshow&&d.slideshow.pauseOnHover&&$doc.on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(a){"mouseenter"==a.type&&c.cycleID?b.pause():"mouseleave"==a.type&&c.isPaused&&b.resume()});var m=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails");d.controls.mousewheel&&m.on("mousewheel.iLightBox",function(a,d){c.lockWheel||(a.preventDefault(),0>d?b.moveTo("next"):d>0&&b.moveTo("prev"))}),d.controls.swipe&&f.on(touchStartEvent,function(a){function g(a){var b=$(this),c=q[a],d=[r.coords[0]-l.coords[0],r.coords[1]-l.coords[1]];b[0].style["horizontal"==e?"left":"top"]=("horizontal"==e?c.left-d[0]:c.top-d[1])+"px"}function j(a){if(r){var b=a.originalEvent.touches?a.originalEvent.touches[0]:a;l={time:(new Date).getTime(),coords:[b.pageX-o,b.pageY-n]},f.each(g),a.preventDefault()}}function k(){f.each(function(){var a=$(this),b=a.data("offset")||{top:a.offset().top-n,left:a.offset().left-o},c=b.top,d=b.left;a.css(transform,gpuAcceleration).stop().animate({top:c,left:d},500,"easeOutCirc",function(){a.css(transform,"")})})}if(!(c.nextLock||c.prevLock||1==c.total||c.lockSwipe)){c.BODY.addClass("ilightbox-closedhand");var l,m=a.originalEvent.touches?a.originalEvent.touches[0]:a,n=$doc.scrollTop(),o=$doc.scrollLeft(),p=[f.eq(0).offset(),f.eq(1).offset(),f.eq(2).offset()],q=[{top:p[0].top-n,left:p[0].left-o},{top:p[1].top-n,left:p[1].left-o},{top:p[2].top-n,left:p[2].left-o}],r={time:(new Date).getTime(),coords:[m.pageX-o,m.pageY-n]};f.bind(touchMoveEvent,j),$doc.one(touchStopEvent,function(a){f.unbind(touchMoveEvent,j),c.BODY.removeClass("ilightbox-closedhand"),r&&l&&("horizontal"==e&&l.time-r.timei&&abs(r.coords[1]-l.coords[1])l.coords[0]?c.current!=c.total-1||d.infinite?(c.isSwipe=!0,b.moveTo("next")):k():0!=c.current||d.infinite?(c.isSwipe=!0,b.moveTo("prev")):k():"vertical"==e&&l.time-r.timei&&abs(r.coords[0]-l.coords[0])l.coords[1]?c.current!=c.total-1||d.infinite?(c.isSwipe=!0,b.moveTo("next")):k():0!=c.current||d.infinite?(c.isSwipe=!0,b.moveTo("prev")):k():k()),r=l=undefined})}})},goTo:function(a){var b=this,c=b.vars,d=b.options,e=a-c.current;if(d.infinite&&(a==c.total-1&&0==c.current&&(e=-1),c.current==c.total-1&&0==a&&(e=1)),1==e)b.moveTo("next");else if(-1==e)b.moveTo("prev");else{if(c.nextLock||c.prevLock)return!1;"function"==typeof d.callback.onBeforeChange&&d.callback.onBeforeChange.call(b,b.ui),d.linkId&&(c.hashLock=!0,window.location.hash=d.linkId+"/"+a),b.items[a]&&(b.items[a].options.mousewheel?b.vars.lockWheel=!1:c.lockWheel=!0,b.items[a].options.swipe?c.lockSwipe=!1:c.lockSwipe=!0),$.each([c.holder,c.nextPhoto,c.prevPhoto],function(a,b){b.css(transform,gpuAcceleration).fadeOut(d.effects.loadedFadeSpeed)}),c.current=a,c.next=a+1,c.prev=a-1,b.createUI(),setTimeout(function(){b.generateBoxes()},d.effects.loadedFadeSpeed+50),$(".ilightbox-thumbnail",c.thumbnails).removeClass("ilightbox-active").eq(a).addClass("ilightbox-active"),b.positionThumbnails(),d.linkId&&setTimeout(function(){c.hashLock=!1},55),d.infinite||(c.nextButton.add(c.prevButton).add(c.innerPrevButton).add(c.innerNextButton).removeClass("disabled"),0==c.current&&c.prevButton.add(c.innerPrevButton).addClass("disabled"),c.current>=c.total-1&&c.nextButton.add(c.innerNextButton).addClass("disabled")),b.resetCycle(),"function"==typeof d.callback.onAfterChange&&d.callback.onAfterChange.call(b,b.ui)}},moveTo:function(a){var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f=getViewport(),g=d.effects.switchSpeed;if(c.nextLock||c.prevLock)return!1;var h="next"==a?c.next:c.prev;if(d.linkId&&(c.hashLock=!0,window.location.hash=d.linkId+"/"+h),"next"==a){if(!b.items[h])return!1;var i=c.nextPhoto,j=c.holder,k=c.prevPhoto,l="ilightbox-prev",m="ilightbox-next"}else if("prev"==a){if(!b.items[h])return!1;var i=c.prevPhoto,j=c.holder,k=c.nextPhoto,l="ilightbox-next",m="ilightbox-prev"}"function"==typeof d.callback.onBeforeChange&&d.callback.onBeforeChange.call(b,b.ui),"next"==a?c.nextLock=!0:c.prevLock=!0;var n=$("div.ilightbox-caption",j),o=$("div.ilightbox-social",j);if(n.length&&n.stop().fadeOut(g,function(){$(this).remove()}),o.length&&o.stop().fadeOut(g,function(){$(this).remove()}),b.items[h].caption){b.setCaption(b.items[h],i);var p=$("div.ilightbox-caption",i),q=parseInt(p.outerHeight()/i.outerHeight()*100);d.caption.start&&50>=q&&p.fadeIn(g)}var r=b.items[h].options.social;r&&(b.setSocial(r,b.items[h].URL,i),d.social.start&&$("div.ilightbox-social",i).fadeIn(d.effects.fadeSpeed)),$.each([i,j,k],function(a,b){b.removeClass("ilightbox-next ilightbox-prev")});var s=i.data("offset"),t=f.width-d.styles.pageOffsetX,u=f.height-d.styles.pageOffsetY,v=s.newDims.width,w=s.newDims.height,x=s.thumbsOffset,y=s.diff,z=parseInt(u/2-w/2-y.H-x.H/2),A=parseInt(t/2-v/2-y.W-x.W/2);i.css(transform,gpuAcceleration).animate({top:z,left:A,opacity:1},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){i.css(transform,"")}),$("div.ilightbox-container",i).animate({width:v,height:w},g,c.isSwipe?"easeOutCirc":"easeInOutCirc");var B=j.data("offset"),C=B.object;y=B.diff,v=B.newDims.width,w=B.newDims.height,v=parseInt(v*d.styles["next"==a?"prevScale":"nextScale"]),w=parseInt(w*d.styles["next"==a?"prevScale":"nextScale"]),z=parseInt("horizontal"==e?u/2-C.offsetY-w/2-y.H-x.H/2:u-C.offsetX-y.H-x.H/2),"prev"==a?A=parseInt("horizontal"==e?t-C.offsetX-y.W-x.W/2:t/2-v/2-y.W-C.offsetY-x.W/2):(z="horizontal"==e?z:parseInt(C.offsetX-y.H-w-x.H/2),A=parseInt("horizontal"==e?C.offsetX-y.W-v-x.W/2:t/2-C.offsetY-v/2-y.W-x.W/2)),$("div.ilightbox-container",j).animate({width:v,height:w},g,c.isSwipe?"easeOutCirc":"easeInOutCirc"),j.addClass(l).css(transform,gpuAcceleration).animate({top:z,left:A,opacity:d.styles.prevOpacity},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){j.css(transform,""),$(".ilightbox-thumbnail",c.thumbnails).removeClass("ilightbox-active").eq(h).addClass("ilightbox-active"),b.positionThumbnails(),b.items[h]&&(b.items[h].options.mousewheel?c.lockWheel=!1:c.lockWheel=!0,b.items[h].options.swipe?c.lockSwipe=!1:c.lockSwipe=!0),c.isSwipe=!1,"next"==a?(c.nextPhoto=k,c.prevPhoto=j,c.holder=i,c.nextPhoto.hide(),c.next=c.next+1,c.prev=c.current,c.current=c.current+1,d.infinite&&(c.current>c.total-1&&(c.current=0),c.current==c.total-1&&(c.next=0),0==c.current&&(c.prev=c.total-1)),b.createUI(),b.items[c.next]?b.loadContent(b.items[c.next],"next"):c.nextLock=!1):(c.prevPhoto=k,c.nextPhoto=j,c.holder=i,c.prevPhoto.hide(),c.next=c.current,c.current=c.prev,c.prev=c.current-1,d.infinite&&(c.current==c.total-1&&(c.next=0),0==c.current&&(c.prev=c.total-1)),b.createUI(),b.items[c.prev]?b.loadContent(b.items[c.prev],"prev"):c.prevLock=!1),d.linkId&&setTimeout(function(){c.hashLock=!1},55),d.infinite||(c.nextButton.add(c.prevButton).add(c.innerPrevButton).add(c.innerNextButton).removeClass("disabled"),0==c.current&&c.prevButton.add(c.innerPrevButton).addClass("disabled"),c.current>=c.total-1&&c.nextButton.add(c.innerNextButton).addClass("disabled")),b.repositionPhoto(),b.resetCycle(),"function"==typeof d.callback.onAfterChange&&d.callback.onAfterChange.call(b,b.ui)}),z="horizontal"==e?getPixel(k,"top"):parseInt("next"==a?-(u/2)-k.outerHeight():2*z),A="horizontal"==e?parseInt("next"==a?-(t/2)-k.outerWidth():2*A):getPixel(k,"left"),k.css(transform,gpuAcceleration).animate({top:z,left:A,opacity:d.styles.nextOpacity},g,c.isSwipe?"easeOutCirc":"easeInOutCirc",function(){k.css(transform,"")}).addClass(m)},setCaption:function(a,b){var c=$('
    ');a.caption&&(c.html(a.caption),$("div.ilightbox-container",b).append(c))},normalizeSocial:function(a,b){var c=this,d=(c.vars,c.options),e=window.location.href;return $.each(a,function(c,f){if(!f)return!0;var g,h,i=c.toLowerCase();switch(i){case"facebook":g="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",h="Share on Facebook";break;case"twitter":g="http://twitter.com/home?status={URL}",h="Share on Twitter";break;case"googleplus":g="https://plus.google.com/share?url={URL}",h="Share on Google+";break;case"delicious":g="http://delicious.com/post?url={URL}",h="Share on Delicious";break;case"digg":g="http://digg.com/submit?phase=2&url={URL}",h="Share on Digg";break;case"reddit":g="http://reddit.com/submit?url={URL}",h="Share on reddit"}a[c]={URL:f.URL&&absolutizeURI(e,f.URL)||d.linkId&&window.location.href||"string"!=typeof b&&e||b&&absolutizeURI(e,b)||e,source:f.source||g||f.URL&&absolutizeURI(e,f.URL)||b&&absolutizeURI(e,b),text:f.text||h||"Share on "+c,width:"undefined"==typeof f.width||isNaN(f.width)?640:parseInt(f.width),height:f.height||360}}),a},setSocial:function(a,b,c){var d=this,e=$('
    '),f="
      ";a=d.normalizeSocial(a,b),$.each(a,function(a,b){var c=(a.toLowerCase(),b.source.replace(/\{URL\}/g,encodeURIComponent(b.URL).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")));f+='
    • '}),f+="
    ",e.html(f),$("div.ilightbox-container",c).append(e)},fullScreenAction:function(){var a=this;a.vars;fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen(document.documentElement):fullScreenApi.requestFullScreen(document.documentElement):a.doFullscreen()},doFullscreen:function(){var a=this,b=a.vars,c=getViewport(),d=a.options;if(d.fullAlone){var e=b.holder,f=a.items[b.current],g=c.width,h=c.height,i=[e,b.nextPhoto,b.prevPhoto,b.nextButton,b.prevButton,b.overlay,b.toolbar,b.thumbnails,b.loader],j=[b.loader,b.thumbnails];if(b.isInFullScreen)b.isInFullScreen=b.lockKey=b.lockWheel=b.lockSwipe=!1,b.overlay.css({opacity:a.options.overlay.opacity}),$.each(j,function(a,b){b.show()}),b.fullScreenButton.attr("title",d.text.enterFullscreen),e.data({naturalWidth:e.data("naturalWidthOld"),naturalHeight:e.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null}),$.each(i,function(a,b){b.removeClass("ilightbox-fullscreen")}),"function"==typeof d.callback.onExitFullScreen&&d.callback.onExitFullScreen.call(a,a.ui);else{if(b.isInFullScreen=b.lockKey=b.lockWheel=b.lockSwipe=!0,b.overlay.css({opacity:1}),$.each(j,function(a,b){b.hide()}),b.fullScreenButton.attr("title",d.text.exitFullscreen),-1!=d.fullStretchTypes.indexOf(f.type))e.data({naturalWidthOld:e.data("naturalWidth"),naturalHeightOld:e.data("naturalHeight"),naturalWidth:g,naturalHeight:h});else{var c=f.options.fullViewPort||d.fullViewPort||"",k=g,l=h,m=e.data("naturalWidth"),n=e.data("naturalHeight");if("fill"==c.toLowerCase())l=k/m*n,h>l&&(k=h/n*m,l=h);else if("fit"==c.toLowerCase()){var o=a.getNewDimenstions(k,l,m,n,!0);k=o.width,l=o.height}else if("stretch"==c.toLowerCase())k=k,l=l;else{var p=m>k||n>l?!0:!1,o=a.getNewDimenstions(k,l,m,n,p);k=o.width,l=o.height}e.data({naturalWidthOld:e.data("naturalWidth"),naturalHeightOld:e.data("naturalHeight"),naturalWidth:k,naturalHeight:l})}$.each(i,function(a,b){b.addClass("ilightbox-fullscreen")}),"function"==typeof d.callback.onEnterFullScreen&&d.callback.onEnterFullScreen.call(a,a.ui)}}else b.isInFullScreen?b.isInFullScreen=!1:b.isInFullScreen=!0;a.repositionPhoto(!0)},closeAction:function(){var a=this,b=a.vars,c=a.options;$win.unbind(".iLightBox"),$doc.off(".iLightBox"),b.isInFullScreen&&fullScreenApi.cancelFullScreen(document.documentElement),$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox"),c.hide.effect?b.overlay.stop().fadeOut(c.hide.speed,function(){b.overlay.remove(),b.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}):(b.overlay.remove(),b.BODY.removeClass("ilightbox-noscroll").off(".iLightBox"));var d=[b.toolbar,b.holder,b.nextPhoto,b.prevPhoto,b.nextButton,b.prevButton,b.loader,b.thumbnails];$.each(d,function(a,b){b.removeAttr("style").remove()}),b.dontGenerateThumbs=b.isInFullScreen=!1,window.iLightBox=null,c.linkId&&(b.hashLock=!0,removeHash(),setTimeout(function(){b.hashLock=!1},55)),"function"==typeof c.callback.onHide&&c.callback.onHide.call(a,a.ui)},repositionPhoto:function(){var a=this,b=a.vars,c=a.options,d=c.path.toLowerCase(),e=getViewport(),f=e.width,g=e.height,h=b.isInFullScreen&&c.fullAlone||b.isMobile?0:"horizontal"==d?0:b.thumbnails.outerWidth(),i=b.isMobile?b.toolbar.outerHeight():b.isInFullScreen&&c.fullAlone?0:"horizontal"==d?b.thumbnails.outerHeight():0,j=b.isInFullScreen&&c.fullAlone?f:f-c.styles.pageOffsetX,k=b.isInFullScreen&&c.fullAlone?g:g-c.styles.pageOffsetY,l="horizontal"==d?parseInt(a.items[b.next]||a.items[b.prev]?2*(c.styles.nextOffsetX+c.styles.prevOffsetX):30>=j/10?30:j/10):parseInt(30>=j/10?30:j/10)+h,m="horizontal"==d?parseInt(30>=k/10?30:k/10)+i:parseInt(a.items[b.next]||a.items[b.prev]?2*(c.styles.nextOffsetX+c.styles.prevOffsetX):30>=k/10?30:k/10),n={type:"current",width:j,height:k,item:a.items[b.current],offsetW:l,offsetH:m,thumbsOffsetW:h,thumbsOffsetH:i,animate:arguments.length,holder:b.holder};a.repositionEl(n),a.items[b.next]&&(n=$.extend(n,{type:"next",item:a.items[b.next],offsetX:c.styles.nextOffsetX,offsetY:c.styles.nextOffsetY,holder:b.nextPhoto}),a.repositionEl(n)),a.items[b.prev]&&(n=$.extend(n,{type:"prev",item:a.items[b.prev],offsetX:c.styles.prevOffsetX,offsetY:c.styles.prevOffsetY,holder:b.prevPhoto}),a.repositionEl(n));var o="horizontal"==d?{left:parseInt(j/2-b.loader.outerWidth()/2)}:{top:parseInt(k/2-b.loader.outerHeight()/2)};b.loader.css(o)},repositionEl:function(a){var b=this,c=b.vars,d=b.options,e=d.path.toLowerCase(),f="current"==a.type&&c.isInFullScreen&&d.fullAlone?a.width:a.width-a.offsetW,g="current"==a.type&&c.isInFullScreen&&d.fullAlone?a.height:a.height-a.offsetH,h=a.item,i=a.item.options,j=a.holder,k=a.offsetX||0,l=a.offsetY||0,m=a.thumbsOffsetW,n=a.thumbsOffsetH;"current"==a.type?("number"==typeof i.width&&i.width&&(f=c.isInFullScreen&&d.fullAlone&&(-1!=d.fullStretchTypes.indexOf(h.type)||i.fullViewPort||d.fullViewPort)?f:i.width>f?f:i.width),"number"==typeof i.height&&i.height&&(g=c.isInFullScreen&&d.fullAlone&&(-1!=d.fullStretchTypes.indexOf(h.type)||i.fullViewPort||d.fullViewPort)?g:i.height>g?g:i.height)):("number"==typeof i.width&&i.width&&(f=i.width>f?f:i.width),"number"==typeof i.height&&i.height&&(g=i.height>g?g:i.height)),g=parseInt(g-$(".ilightbox-inner-toolbar",j).outerHeight());var o="string"==typeof i.width&&-1!=i.width.indexOf("%")?percentToValue(parseInt(i.width.replace("%","")),a.width):j.data("naturalWidth"),p="string"==typeof i.height&&-1!=i.height.indexOf("%")?percentToValue(parseInt(i.height.replace("%","")),a.height):j.data("naturalHeight"),q="string"==typeof i.width&&-1!=i.width.indexOf("%")||"string"==typeof i.height&&-1!=i.height.indexOf("%")?{width:o,height:p}:b.getNewDimenstions(f,g,o,p),r=$.extend({},q,{});"prev"==a.type||"next"==a.type?(o=parseInt(q.width*("next"==a.type?d.styles.nextScale:d.styles.prevScale)),p=parseInt(q.height*("next"==a.type?d.styles.nextScale:d.styles.prevScale))):(o=q.width,p=q.height);var s=parseInt((getPixel(j,"padding-left")+getPixel(j,"padding-right")+getPixel(j,"border-left-width")+getPixel(j,"border-right-width"))/2),t=parseInt((getPixel(j,"padding-top")+getPixel(j,"padding-bottom")+getPixel(j,"border-top-width")+getPixel(j,"border-bottom-width")+$(".ilightbox-inner-toolbar",j).outerHeight())/2);switch(a.type){case"current":var u=parseInt(a.height/2-p/2-t-n/2),v=parseInt(a.width/2-o/2-s-m/2);break;case"next":var u=parseInt("horizontal"==e?a.height/2-l-p/2-t-n/2:a.height-k-t-n/2),v=parseInt("horizontal"==e?a.width-k-s-m/2:a.width/2-o/2-s-l-m/2);break;case"prev":var u=parseInt("horizontal"==e?a.height/2-l-p/2-t-n/2:k-t-p-n/2),v=parseInt("horizontal"==e?k-s-o-m/2:a.width/2-l-o/2-s-m/2)}j.data("offset",{top:u,left:v,newDims:r,diff:{W:s,H:t},thumbsOffset:{W:m,H:n},object:a}),a.animate>0&&d.effects.reposition?(j.css(transform,gpuAcceleration).stop().animate({top:u,left:v},d.effects.repositionSpeed,"easeOutCirc",function(){j.css(transform,"")}),$("div.ilightbox-container",j).stop().animate({width:o,height:p},d.effects.repositionSpeed,"easeOutCirc"),$("div.ilightbox-inner-toolbar",j).stop().animate({width:o},d.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})):(j.css({top:u,left:v}),$("div.ilightbox-container",j).css({width:o,height:p}),$("div.ilightbox-inner-toolbar",j).css({width:o}))},resume:function(a){var b=this,c=b.vars,d=b.options;!d.slideshow.pauseTime||d.controls.slideshow&&c.total<=1||af.options.maxScale?factor=f.options.maxScale:factor=0||parseInt(PluginDetect.getVersion("Flash"))>=0?!0:!1,quicktime:parseInt(PluginDetect.getVersion("QuickTime"))>=0?!0:!1,html5H264:!(!b.canPlayType||!b.canPlayType("video/mp4").replace(/no/,"")),html5WebM:!(!b.canPlayType||!b.canPlayType("video/webm").replace(/no/,"")),html5Vorbis:!(!b.canPlayType||!b.canPlayType("video/ogg").replace(/no/,"")),html5QuickTime:!(!b.canPlayType||!b.canPlayType("video/quicktime").replace(/no/,""))}},addContent:function(a,b){var c,d=this;switch(b.type){case"video":var e=!1,f=b.videoType,g=b.options.html5video;("video/mp4"==f||"mp4"==b.ext||"m4v"==b.ext||g.h264)&&d.plugins.html5H264?(b.ext="mp4",b.URL=g.h264||b.URL):g.webm&&d.plugins.html5WebM?(b.ext="webm",b.URL=g.webm||b.URL):g.ogg&&d.plugins.html5Vorbis&&(b.ext="ogv",b.URL=g.ogg||b.URL),!d.plugins.html5H264||"video/mp4"!=f&&"mp4"!=b.ext&&"m4v"!=b.ext?!d.plugins.html5WebM||"video/webm"!=f&&"webm"!=b.ext?!d.plugins.html5Vorbis||"video/ogg"!=f&&"ogv"!=b.ext?!d.plugins.html5QuickTime||"video/quicktime"!=f&&"mov"!=b.ext&&"qt"!=b.ext||(e=!0,f="video/quicktime"):(e=!0,f="video/ogg"):(e=!0,f="video/webm"):(e=!0,f="video/mp4"),e?c=$("