/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):N.apply(this,arguments)},s.fx&&(S=s.Tween.prototype.run,M=function(e){return e},s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=M),S.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}}));var R=s.fn.load,H=s.event.add,C=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=C.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),H.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?R.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function P(e){var t=e.replace(O,"<$1></$2>");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1></$2>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s});!function(r,c){var e="easyTicker",p={direction:"up",easing:"swing",speed:"slow",interval:2e3,height:"auto",visible:0,mousePause:!0,controls:{up:"",down:"",toggle:"",playText:"Play",stopText:"Stop"},callbacks:{before:!1,after:!1}};function i(t,e){var l=this;function i(){0==l.timer&&(l.timer=setInterval(function(){o(l.opts.direction)},l.opts.interval),r(l.opts.controls.toggle).addClass("et-run").html(l.opts.controls.stopText))}function n(){clearInterval(l.timer),l.timer=0,r(l.opts.controls.toggle).removeClass("et-run").html(l.opts.controls.playText)}function o(t){var e,i,n;if(l.elem.is(":visible")){n="up"==t?(e=":first-child",i="-=","appendTo"):(e=":last-child",i="+=","prependTo");var o=l.targ.children(e),s=o.outerHeight();"function"==typeof l.opts.callbacks.before&&l.opts.callbacks.before.call(l,l.targ,o),l.targ.stop(!0,!0).animate({top:i+s+"px"},l.opts.speed,l.opts.easing,function(){o.hide()[n](l.targ).fadeIn(),l.targ.css("top",0),a(!0),"function"==typeof l.opts.callbacks.after&&l.opts.callbacks.after.call(l,l.targ,o)})}}function s(t){n(),o("up"==t?"up":"down")}function a(t){var e,i,n,o,s;"auto"==l.opts.height&&(0<l.opts.visible?(n=t,o=0,s="et-item-visible",l.targ.children().removeClass(s),l.targ.children(":lt("+l.opts.visible+")").each(function(){o+=r(this).outerHeight(),r(this).addClass(s)}),n?l.elem.stop(!0,!0).animate({height:o},l.opts.speed):l.elem.css("height",o)):(e=0,i=l.elem.css("display"),l.elem.css("display","block"),l.targ.children().each(function(){e+=r(this).outerHeight()}),l.elem.css({display:i,height:e}))),t||clearInterval(l.heightTimer)}return l.opts=r.extend({},p,e),l.elem=r(t),l.targ=r(t).children(":first-child"),l.timer=0,l.elem.children().css("margin",0).children().css("margin",0),l.elem.css({position:"relative",height:l.opts.height,overflow:"hidden"}),l.targ.css({position:"absolute",margin:0}),l.heightTimer=setInterval(function(){a(!1)},100),i(),function(){var t,e;void 0!==c.hidden?(t="hidden",e="visibilitychange"):void 0!==c.msHidden?(t="msHidden",e="msvisibilitychange"):void 0!==c.webkitHidden&&(t="webkitHidden",e="webkitvisibilitychange");c.addEventListener(e,function(){(c[t]?n:i)()},!1)}(),l.opts.mousePause&&l.elem.on("mouseenter",function(){l.timerTemp=l.timer,n()}).on("mouseleave",function(){0!==l.timerTemp&&i()}),r(l.opts.controls.up).on("click",function(t){t.preventDefault(),s("up")}),r(l.opts.controls.down).on("click",function(t){t.preventDefault(),s("down")}),r(l.opts.controls.toggle).on("click",function(t){t.preventDefault(),(0==l.timer?i:n)()}),{up:function(){s("up")},down:function(){s("down")},start:i,stop:n,options:l.opts}}r.fn[e]=function(t){return this.each(function(){r.data(this,e)||r.data(this,e,new i(this,t))})}}(jQuery,(window,document));!function(r){r(document).ready(function(){var i=r(".srr-main");i.find(".srr-wrap").hide(),i.find(".srr-wrap:first").show(),i.find(".srr-tab-wrap li:first").addClass("srr-active-tab"),r(".srr-tab-wrap li").click(function(){var i=r(this).attr("data-tab"),t=r(this).parent().parent();if(r(this).parent().children("li").removeClass("srr-active-tab"),r(this).addClass("srr-active-tab"),t.find(".srr-wrap").hide(),$srrTicker=t.find(".srr-wrap[data-id="+i+"]"),$srrTicker.show(),0==$srrTicker.height()){var a=$srrTicker.data("visible"),s=$srrTicker.find(".srr-item:first-child").outerHeight()*a;$srrTicker.height(s)}}),r(".srr-vticker").each(function(){var i=r(this).attr("data-visible"),t=r(this).attr("data-speed"),a=parseInt(i)<=20?"auto":i;r(this).easyTicker({visible:i,height:a,interval:t})})})}(jQuery);var zilla_likes={"ajaxurl":"https:\/\/vhijabe.ru\/wp-admin\/admin-ajax.php"};jQuery(document).ready(function($){$('.zilla-likes').live('click',function(){var link=$(this);if(link.hasClass('active'))return!1;var id=$(this).attr('id'),postfix=link.find('.zilla-likes-postfix').text();$.post(zilla_likes.ajaxurl,{action:'zilla-likes',likes_id:id,postfix:postfix},function(data){link.html(data).addClass('active').attr('title','You already like this')});return!1});if($('body.ajax-zilla-likes').length){$('.zilla-likes').each(function(){var id=$(this).attr('id');$(this).load(zilla_likes.ajaxurl,{action:'zilla-likes',post_id:id})})}});var disqus_shortname="vhijaberu";var disqus_title="Хиджаб: размышления японской мусульманки";var disqus_url="https://vhijabe.ru/hijab/hidzhab-razmy-shleniya-yaponskoj-musul-m/";var disqus_identifier="vhijaberu-32";jQuery(document).ready(function(){jQuery("#post-sidebar-wrap,#post-right-col,#tab-col3,#tab-col2,#arch-right-col").theiaStickySidebar({"containerSelector":"","additionalMarginTop":"60","additionalMarginBottom":"10","updateSidebarHeight":!1,"minWidth":"0"})});(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4";fjs.parentNode.insertBefore(js,fjs)}(document,'script','facebook-jssdk'));jQuery(document).ready(function($){var duration=500;$('.back-to-top').click(function(event){event.preventDefault();$('html, body').animate({scrollTop:0},duration);return!1});$('.menu-item-has-children a').click(function(event){event.stopPropagation();location.href=this.href});$('.menu-item-has-children').click(function(){$(this).addClass('toggled');if($('.menu-item-has-children').hasClass('toggled')){$(this).children('ul').toggle();$('.fly-nav-menu').getNiceScroll().resize()}
$(this).toggleClass('tog-minus');return!1});$(window).load(function(){$('.fly-nav-menu').niceScroll({cursorcolor:"#888",cursorwidth:7,cursorborder:0,zindex:999999})});$(".comment-click-32").on("click",function(){$(".com-click-id-32").show();$(".disqus-thread-32").show();$(".com-but-32").hide()});$('.infinite-content').infinitescroll({navSelector:".nav-links",nextSelector:".nav-links a:first",itemSelector:".infinite-post",loading:{msgText:"Loading more posts...",finishedMsg:"Sorry, no more posts"}});$(window).unbind('.infscr');$(".inf-more-but").click(function(){$('.infinite-content').infinitescroll('retrieve');return!1});$(window).load(function(){$('.post-gallery-bot').flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!1,itemWidth:80,itemMargin:10,asNavFor:'.post-gallery-top'});$('.post-gallery-top').flexslider({animation:"fade",controlNav:!1,animationLoop:!0,slideshow:!1,prevText:"&lt;",nextText:"&gt;",sync:".post-gallery-bot"})})});(function(){var c=document.body.className;c=c.replace(/woocommerce-no-js/,'woocommerce-js');document.body.className=c})();/*! This file is auto-generated */
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1};C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);t=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(n=g(b.commentReplyTitleId))&&n.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),n=t&&t.firstChild.textContent,d=this,o=m(d,"belowelement"),i=m(d,"commentid"),r=m(d,"respondelement"),t=m(d,"postid"),n=m(d,"replyto")||n;o&&i&&r&&t&&!1===v.addComment.moveForm(o,i,r,t,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i=g(e);h=g(n);var r,l,a,m,c,s=g(b.parentIdFieldId),y=g(b.postIdFieldId),p=(c=g(b.commentReplyTitleId))&&c.firstChild,u=p&&p.nextSibling;if(i&&h&&s){void 0===o&&(o=p&&p.textContent),m=h,e=b.temporaryFormId,n=g(e),c=(c=g(b.commentReplyTitleId))?c.firstChild.textContent:"",n||((n=E.createElement("div")).id=e,n.style.display="none",n.textContent=c,m.parentNode.insertBefore(n,m)),d&&y&&(y.value=d),s.value=t,I.style.display="",i.parentNode.insertBefore(h,i.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(r=C.elements[f],l=!1,"getComputedStyle"in v?a=v.getComputedStyle(r):E.documentElement.currentStyle&&(a=r.currentStyle),(r.offsetWidth<=0&&r.offsetHeight<=0||"hidden"===a.visibility)&&(l=!0),"hidden"!==r.type&&!r.disabled&&!l){r.focus();break}}catch(e){}return!1}}}}(window);var countVars={"disqusShortname":"vhijaberu"};var disqus_shortname=countVars.disqusShortname;(function(){var nodes=document.getElementsByTagName('span');for(var i=0,url;i<nodes.length;i++){if(nodes[i].className.indexOf('dsq-postid')!=-1&&nodes[i].parentNode.tagName=='A'){nodes[i].parentNode.setAttribute('data-disqus-identifier',nodes[i].getAttribute('data-dsqidentifier'));url=nodes[i].parentNode.href.split('#',1);if(url.length==1){url=url[0]}else{url=url[1]}
nodes[i].parentNode.href=url+'#disqus_thread'}}
var s=document.createElement('script');s.async=!0;s.type='text/javascript';s.src='https://'+disqus_shortname+'.disqus.com/count.js';(document.getElementsByTagName('HEAD')[0]||document.getElementsByTagName('BODY')[0]).appendChild(s)}());var disqus_url=embedVars.disqusUrl;var disqus_identifier=embedVars.disqusIdentifier;var disqus_container_id='disqus_thread';var disqus_shortname=embedVars.disqusShortname;var disqus_title=embedVars.disqusTitle;var disqus_config_custom=window.disqus_config;var disqus_config=function(){var dsqConfig=embedVars.disqusConfig;this.page.integration=dsqConfig.integration;this.page.remote_auth_s3=dsqConfig.remote_auth_s3;this.page.api_key=dsqConfig.api_key;this.sso=dsqConfig.sso;this.language=dsqConfig.language;if(disqus_config_custom)
disqus_config_custom.call(this)};(function(){if(document.getElementById(disqus_container_id)){var dsq=document.createElement('script');dsq.type='text/javascript';dsq.async=!0;dsq.src='https://'+disqus_shortname+'.disqus.com/embed.js';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(dsq)}})();jQuery(document).ready(function($){"use strict";$('.carousel').elastislide({imageW:130,minItems:1,margin:1});$('.tabber-container').each(function(){$(this).find(".tabber-content").hide();$(this).find(".tabber-content:first").show()});$(".score-nav-menu select").change(function(e){$(this).parents('.tabber-container').find(".tabber-content").hide();var activeTab=$(this).find("option:selected").val();$(this).parents('.tabber-container').find(activeTab).fadeIn();e.preventDefault()});$("select.tabs option a").change(function(e){e.preventDefault()})});/*!
 * Theia Sticky Sidebar v1.2.2
 * https://github.com/WeCodePixels/theia-sticky-sidebar
 *
 * Glues your website's sidebars, making them permanently visible while scrolling.
 *
 * Copyright 2013-2014 WeCodePixels and other contributors
 * Released under the MIT license
 */
(function($){$.fn.theiaStickySidebar=function(options){var defaults={'containerSelector':'','additionalMarginTop':0,'additionalMarginBottom':0,'updateSidebarHeight':!0,'minWidth':0};options=$.extend(defaults,options);options.additionalMarginTop=parseInt(options.additionalMarginTop)||0;options.additionalMarginBottom=parseInt(options.additionalMarginBottom)||0;$('head').append($('<style>.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>'));this.each(function(){var o={};o.sidebar=$(this);o.options=options||{};o.container=$(o.options.containerSelector);if(o.container.size()==0){o.container=o.sidebar.parent()}
o.sidebar.parents().css('-webkit-transform','none');o.sidebar.css({'position':'relative','overflow':'visible','-webkit-box-sizing':'border-box','-moz-box-sizing':'border-box','box-sizing':'border-box'});o.stickySidebar=o.sidebar.find('.theiaStickySidebar');if(o.stickySidebar.length==0){o.sidebar.find('script').remove();o.stickySidebar=$('<div>').addClass('theiaStickySidebar').append(o.sidebar.children());o.sidebar.append(o.stickySidebar)}
o.marginTop=parseInt(o.sidebar.css('margin-top'));o.marginBottom=parseInt(o.sidebar.css('margin-bottom'));o.paddingTop=parseInt(o.sidebar.css('padding-top'));o.paddingBottom=parseInt(o.sidebar.css('padding-bottom'));var collapsedTopHeight=o.stickySidebar.offset().top;var collapsedBottomHeight=o.stickySidebar.outerHeight();o.stickySidebar.css('padding-top',1);o.stickySidebar.css('padding-bottom',1);collapsedTopHeight-=o.stickySidebar.offset().top;collapsedBottomHeight=o.stickySidebar.outerHeight()-collapsedBottomHeight-collapsedTopHeight;if(collapsedTopHeight==0){o.stickySidebar.css('padding-top',0);o.stickySidebarPaddingTop=0}else{o.stickySidebarPaddingTop=1}
if(collapsedBottomHeight==0){o.stickySidebar.css('padding-bottom',0);o.stickySidebarPaddingBottom=0}else{o.stickySidebarPaddingBottom=1}
o.previousScrollTop=null;o.fixedScrollTop=0;resetSidebar();o.onScroll=function(o){if(!o.stickySidebar.is(":visible")){return}
if($('body').width()<o.options.minWidth){resetSidebar();return}
if(o.sidebar.outerWidth(!0)+50>o.container.width()){resetSidebar();return}
var scrollTop=$(document).scrollTop();var position='static';if(scrollTop>=o.container.offset().top+(o.paddingTop+o.marginTop-o.options.additionalMarginTop)){var offsetTop=o.paddingTop+o.marginTop+options.additionalMarginTop;var offsetBottom=o.paddingBottom+o.marginBottom+options.additionalMarginBottom;var containerTop=o.container.offset().top;var containerBottom=o.container.offset().top+getClearedHeight(o.container);var windowOffsetTop=0+options.additionalMarginTop;var windowOffsetBottom;var sidebarSmallerThanWindow=(o.stickySidebar.outerHeight()+offsetTop+offsetBottom)<$(window).height();if(sidebarSmallerThanWindow){windowOffsetBottom=windowOffsetTop+o.stickySidebar.outerHeight()}else{windowOffsetBottom=$(window).height()-o.marginBottom-o.paddingBottom-options.additionalMarginBottom}
var staticLimitTop=containerTop-scrollTop+o.paddingTop+o.marginTop;var staticLimitBottom=containerBottom-scrollTop-o.paddingBottom-o.marginBottom;var top=o.stickySidebar.offset().top-scrollTop;var scrollTopDiff=o.previousScrollTop-scrollTop;if(o.stickySidebar.css('position')=='fixed'){top+=scrollTopDiff}
if(scrollTopDiff>0){top=Math.min(top,windowOffsetTop)}else{top=Math.max(top,windowOffsetBottom-o.stickySidebar.outerHeight())}
top=Math.max(top,staticLimitTop);top=Math.min(top,staticLimitBottom-o.stickySidebar.outerHeight());var sidebarSameHeightAsContainer=o.container.height()==o.stickySidebar.outerHeight();if(!sidebarSameHeightAsContainer&&top==windowOffsetTop){position='fixed'}else if(!sidebarSameHeightAsContainer&&top==windowOffsetBottom-o.stickySidebar.outerHeight()){position='fixed'}else if(scrollTop+top-o.sidebar.offset().top-o.paddingTop<=options.additionalMarginTop){position='static'}else{position='absolute'}}
if(position=='fixed'){o.stickySidebar.css({'position':'fixed','width':o.sidebar.width(),'top':top,'left':o.sidebar.offset().left+parseInt(o.sidebar.css('padding-left'))})}else if(position=='absolute'){var css={};if(o.stickySidebar.css('position')!='absolute'){css.position='absolute';css.top=scrollTop+top-o.sidebar.offset().top-o.stickySidebarPaddingTop-o.stickySidebarPaddingBottom}
css.width=o.sidebar.width();css.left='';o.stickySidebar.css(css)}else if(position=='static'){resetSidebar()}
if(position!='static'){if(o.options.updateSidebarHeight==!0){o.sidebar.css({'min-height':o.stickySidebar.outerHeight()+o.stickySidebar.offset().top-o.sidebar.offset().top+o.paddingBottom})}}
o.previousScrollTop=scrollTop};o.onScroll(o);$(document).scroll(function(o){return function(){o.onScroll(o)}}(o));$(window).resize(function(o){return function(){o.stickySidebar.css({'position':'static'});o.onScroll(o)}}(o));function resetSidebar(){o.fixedScrollTop=0;o.sidebar.css({'min-height':'1px'});o.stickySidebar.css({'position':'static','width':''})}
function getClearedHeight(e){var height=e.height();e.children().each(function(){height=Math.max(height,$(this).height())});return height}})}})(jQuery);/*!
 * jQuery blockUI plugin
 * Version 2.70.0-2014.11.23
 * Requires jQuery v1.7 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2013 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
!function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),y=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression));b.blockUI=function(e){o(window,e)},b.unblockUI=function(e){v(window,e)},b.growlUI=function(e,t,o,n){var i=b('<div class="growlUI"></div>');e&&i.append("<h1>"+e+"</h1>"),t&&i.append("<h2>"+t+"</h2>"),o===undefined&&(o=3e3);var s=function(e){e=e||{},b.blockUI({message:i,fadeIn:"undefined"!=typeof e.fadeIn?e.fadeIn:700,fadeOut:"undefined"!=typeof e.fadeOut?e.fadeOut:1e3,timeout:"undefined"!=typeof e.timeout?e.timeout:o,centerY:!1,showOverlay:!1,onUnblock:n,css:b.blockUI.defaults.growlCSS})};s();i.css("opacity");i.mouseover(function(){s({fadeIn:0,timeout:3e4});var e=b(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){b(".blockMsg").fadeOut(1e3)})},b.fn.block=function(e){if(this[0]===window)return b.blockUI(e),this;var t=b.extend({},b.blockUI.defaults,e||{});return this.each(function(){var e=b(this);t.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==b.css(this,"position")&&(this.style.position="relative",b(this).data("blockUI.static",!0)),this.style.zoom=1,o(this,e)})},b.fn.unblock=function(e){return this[0]===window?(b.unblockUI(e),this):this.each(function(){v(this,e)})},b.blockUI.version=2.7,b.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var m=null,g=[];function o(e,o){var t,n,i,s,l,d,a,c,r,u=e==window,f=o&&o.message!==undefined?o.message:undefined;(o=b.extend({},b.blockUI.defaults,o||{})).ignoreIfBlocked&&b(e).data("blockUI.isBlocked")||(o.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,o.overlayCSS||{}),i=b.extend({},b.blockUI.defaults.css,o.css||{}),o.onOverlayClick&&(o.overlayCSS.cursor="pointer"),s=b.extend({},b.blockUI.defaults.themedCSS,o.themedCSS||{}),f=f===undefined?o.message:f,u&&m&&v(window,{fadeOut:0}),f&&"string"!=typeof f&&(f.parentNode||f.jquery)&&(t=f.jquery?f[0]:f,a={},b(e).data("blockUI.history",a),a.el=t,a.parent=t.parentNode,a.display=t.style.display,a.position=t.style.position,a.parent&&a.parent.removeChild(t)),b(e).data("blockUI.onUnblock",o.onUnblock),r=o.baseZ,a=h||o.forceIframe?b('<iframe class="blockUI" style="z-index:'+r+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+o.iframeSrc+'"></iframe>'):b('<div class="blockUI" style="display:none"></div>'),t=o.theme?b('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+r+++';display:none"></div>'):b('<div class="blockUI blockOverlay" style="z-index:'+r+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),o.theme&&u?(c='<div class="blockUI '+o.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(r+10)+';display:none;position:fixed">',o.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(o.title||"&nbsp;")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div>',c+="</div>"):o.theme?(c='<div class="blockUI '+o.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(r+10)+';display:none;position:absolute">',o.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(o.title||"&nbsp;")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div>',c+="</div>"):c=u?'<div class="blockUI '+o.blockMsgClass+' blockPage" style="z-index:'+(r+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+o.blockMsgClass+' blockElement" style="z-index:'+(r+10)+';display:none;position:absolute"></div>',r=b(c),f&&(o.theme?(r.css(s),r.addClass("ui-widget-content")):r.css(i)),o.theme||t.css(o.overlayCSS),t.css("position",u?"fixed":"absolute"),(h||o.forceIframe)&&a.css("opacity",0),c=[a,t,r],n=b(u?"body":e),b.each(c,function(){this.appendTo(n)}),o.theme&&o.draggable&&b.fn.draggable&&r.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),s=y&&(!b.support.boxModel||0<b("object,embed",u?null:e).length),(k||s)&&(u&&o.allowBodyStretch&&b.support.boxModel&&b("html,body").css("height","100%"),!k&&b.support.boxModel||u||(i=U(e,"borderTopWidth"),s=U(e,"borderLeftWidth"),l=i?"(0 - "+i+")":0,d=s?"(0 - "+s+")":0),b.each(c,function(e,t){t=t[0].style;t.position="absolute",e<2?(u?t.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+o.quirksmodeOffsetHack+') + "px"'):t.setExpression("height",'this.parentNode.offsetHeight + "px"'),u?t.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):t.setExpression("width",'this.parentNode.offsetWidth + "px"'),d&&t.setExpression("left",d),l&&t.setExpression("top",l)):o.centerY?(u&&t.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),t.marginTop=0):!o.centerY&&u&&(e="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(o.css&&o.css.top?parseInt(o.css.top,10):0)+') + "px"',t.setExpression("top",e))})),f&&((o.theme?r.find(".ui-widget-content"):r).append(f),(f.jquery||f.nodeType)&&b(f).show()),(h||o.forceIframe)&&o.showOverlay&&a.show(),o.fadeIn?(c=o.onBlock?o.onBlock:p,a=o.showOverlay&&!f?c:p,c=f?c:p,o.showOverlay&&t._fadeIn(o.fadeIn,a),f&&r._fadeIn(o.fadeIn,c)):(o.showOverlay&&t.show(),f&&r.show(),o.onBlock&&o.onBlock.bind(r)()),I(1,e,o),u?(m=r[0],g=b(o.focusableElements,m),o.focusInput&&setTimeout(w,20)):function(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-U(n,"borderLeftWidth"),n=(n.offsetHeight-e.offsetHeight)/2-U(n,"borderTopWidth");t&&(i.left=0<s?s+"px":"0");o&&(i.top=0<n?n+"px":"0")}(r[0],o.centerX,o.centerY),o.timeout&&(r=setTimeout(function(){u?b.unblockUI(o):b(e).unblock(o)},o.timeout),b(e).data("blockUI.timeout",r)))}function v(e,t){var o,n,i=e==window,s=b(e),l=s.data("blockUI.history"),d=s.data("blockUI.timeout");d&&(clearTimeout(d),s.removeData("blockUI.timeout")),t=b.extend({},b.blockUI.defaults,t||{}),I(0,e,t),null===t.onUnblock&&(t.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),n=i?b(document.body).children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),t.cursorReset&&(1<n.length&&(n[1].style.cursor=t.cursorReset),2<n.length&&(n[2].style.cursor=t.cursorReset)),i&&(m=g=null),t.fadeOut?(o=n.length,n.stop().fadeOut(t.fadeOut,function(){0==--o&&a(n,l,t,e)})):a(n,l,t,e)}function a(e,t,o,n){var i=b(n);i.data("blockUI.isBlocked")||(e.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),t&&t.el&&(t.el.style.display=t.display,t.el.style.position=t.position,t.el.style.cursor="default",t.parent&&t.parent.appendChild(t.el),i.removeData("blockUI.history")),i.data("blockUI.static")&&i.css("position","static"),"function"==typeof o.onUnblock&&o.onUnblock(n,o),n=(i=b(document.body)).width(),o=i[0].style.width,i.width(n-1).width(n),i[0].style.width=o)}function I(e,t,o){var n=t==window,t=b(t);!e&&(n&&!m||!n&&!t.data("blockUI.isBlocked"))||(t.data("blockUI.isBlocked",e),n&&o.bindEvents&&(!e||o.showOverlay)&&(n="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",e?b(document).bind(n,o,i):b(document).unbind(n,i)))}function i(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&m&&e.data.constrainTabKey){var t=!e.shiftKey&&e.target===g[g.length-1],o=e.shiftKey&&e.target===g[0];if(t||o)return setTimeout(function(){w(o)},10),!1}var n=e.data,t=b(e.target);return t.hasClass("blockOverlay")&&n.onOverlayClick&&n.onOverlayClick(e),0<t.parents("div."+n.blockMsgClass).length||0===t.parents().children().filter("div.blockUI").length}function w(e){!g||(e=g[!0===e?g.length-1:0])&&e.focus()}function U(e,t){return parseInt(b.css(e,t),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();jQuery(function(d){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),d(document.body).on("click",".add_to_cart_button",{addToCartHandler:this},this.onAddToCart).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("ajax_request_not_sent.adding_to_cart",this.updateButton).on("added_to_cart removed_from_cart",{addToCartHandler:this},this.updateFragments)};t.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},t.prototype.run=function(){var t=this,a=t.requests[0].complete;t.requests[0].complete=function(){"function"==typeof a&&a(),t.requests.shift(),0<t.requests.length&&t.run()},d.ajax(this.requests[0])},t.prototype.onAddToCart=function(t){var a=d(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;if(t.preventDefault(),a.removeClass("added"),a.addClass("loading"),!1===d(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[a]))return d(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,a]),!0;var e={};d.each(a.data(),function(t,a){e[t]=a}),d.each(a[0].dataset,function(t,a){e[t]=a}),d(document.body).trigger("adding_to_cart",[a,e]),t.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:e,success:function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?d(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)},dataType:"json"})}},t.prototype.onRemoveFromCart=function(t){var a=d(this),e=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),e.block({message:null,overlayCSS:{opacity:.6}}),t.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),data:{cart_item_key:a.data("cart_item_key")},success:function(t){t&&t.fragments?d(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")},error:function(){window.location=a.attr("href")},dataType:"json"})},t.prototype.updateButton=function(t,a,e,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),a&&r.addClass("added"),a&&!wc_add_to_cart_params.is_cart&&0===r.parent().find(".added_to_cart").length&&r.after('<a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),d(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateFragments=function(t,a){a&&(d.each(a,function(t){d(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),d.each(a,function(t,a){d(t).replaceWith(a),d(t).stop(!0).css("opacity","1").unblock()}),d(document.body).trigger("wc_fragments_loaded"))},new t});/*!
 * JavaScript Cookie v2.1.4
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
!function(e){var n,o,t=!1;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),t||(n=window.Cookies,(o=window.Cookies=e()).noConflict=function(){return window.Cookies=n,o})}(function(){function m(){for(var e=0,n={};e<arguments.length;e++){var o,t=arguments[e];for(o in t)n[o]=t[o]}return n}return function e(C){function g(e,n,o){var t,r;if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(o=m({path:"/"},g.defaults,o)).expires&&((r=new Date).setMilliseconds(r.getMilliseconds()+864e5*o.expires),o.expires=r),o.expires=o.expires?o.expires.toUTCString():"";try{t=JSON.stringify(n),/^[\{\[]/.test(t)&&(n=t)}catch(l){}n=C.write?C.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var i,c="";for(i in o)o[i]&&(c+="; "+i,!0!==o[i]&&(c+="="+o[i]));return document.cookie=e+"="+n+c}e||(t={});for(var s=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,p=0;p<s.length;p++){var a=s[p].split("=");'"'===(u=a.slice(1).join("=")).charAt(0)&&(u=u.slice(1,-1));try{var d=a[0].replace(f,decodeURIComponent),u=C.read?C.read(u,d):C(u,d)||u.replace(f,decodeURIComponent);if(this.json)try{u=JSON.parse(u)}catch(l){}if(e===d){t=u;break}e||(t[d]=u)}catch(l){}}return t}}return(g.set=g).get=function(e){return g.call(g,e)},g.getJSON=function(){return g.apply({json:!0},[].slice.call(arguments))},g.defaults={},g.remove=function(e,n){g(e,"",m(n,{expires:-1}))},g.withConverter=e,g}(function(){})});jQuery(function(t){t(".woocommerce-ordering").on("change","select.orderby",function(){t(this).closest("form").submit()}),t("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(t(this).attr("min"));0<=o&&parseFloat(t(this).val())<o&&t(this).val(o)});var e="store_notice"+(t(".woocommerce-store-notice").data("notice-id")||"");"hidden"===Cookies.get(e)?t(".woocommerce-store-notice").hide():t(".woocommerce-store-notice").show(),t(".woocommerce-store-notice__dismiss-link").on("click",function(o){Cookies.set(e,"hidden",{path:"/"}),t(".woocommerce-store-notice").hide(),o.preventDefault()}),t(".woocommerce-input-wrapper span.description").length&&t(document.body).on("click",function(){t(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),t(".woocommerce-input-wrapper").on("click",function(o){o.stopPropagation()}),t(".woocommerce-input-wrapper :input").on("keydown",function(o){var e=t(this).parent().find("span.description");if(27===o.which&&e.length&&e.is(":visible"))return e.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=t(this).parent(),e=o.find("span.description");o.addClass("currentTarget"),t(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),e.length&&e.is(":hidden")&&e.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),t.scroll_to_notices=function(o){o.length&&t("html, body").animate({scrollTop:o.offset().top-100},1e3)},t('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),t(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),t(".password-input").append('<span class="show-password-input"></span>'),t(".show-password-input").on("click",function(){t(this).toggleClass("display-password"),t(this).hasClass("display-password")?t(this).siblings(['input[type="password"]']).prop("type","text"):t(this).siblings('input[type="text"]').prop("type","password")})});jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(w){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=+m+864e5,m=(new Date).getTime();if(d<m)throw"Fragment expired";i=setTimeout(n,d-m)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";r.each(c,function(e,t){r(e).replaceWith(t)}),r(document.body).trigger("wc_fragments_loaded")}catch(w){n()}}else n();0<Cookies.get("woocommerce_items_in_cart")?r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),r(document.body).on("adding_to_cart",function(){r(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){n()})});jQuery(document).ready(function($){"use strict";$(window).load(function(){var aboveHeight=$('#head-main-top').outerHeight();$(window).scroll(function(){if($(window).scrollTop()>aboveHeight){$('#main-nav-wrap').addClass('fixed').css('top','0');$('.nav-logo-fade').addClass('nav-logo-show');$('.nav-logo-out').addClass('nav-logo-out-fade');$('.nav-logo-in').addClass('nav-logo-in-fade');$('.nav-left-wrap').addClass('nav-left-width');$('#wallpaper').addClass('wall-fixed');$('.col-tabs-wrap').addClass('fixed-col').css('top','50px');$('#body-main-wrap').addClass('tabs-top-marg');$('#body-main-wrap').addClass('body-top-pad');$('.fly-to-top').addClass('to-top-trans')}else{$('#main-nav-wrap').removeClass('fixed');$('.nav-logo-fade').removeClass('nav-logo-show');$('.nav-logo-out').removeClass('nav-logo-out-fade');$('.nav-logo-in').removeClass('nav-logo-in-fade');$('.nav-left-wrap').removeClass('nav-left-width');$('#wallpaper').removeClass('wall-fixed');$('.col-tabs-wrap').removeClass('fixed-col').css('top','0');$('#body-main-wrap').removeClass('tabs-top-marg');$('#body-main-wrap').removeClass('body-top-pad');$('.fly-to-top').removeClass('to-top-trans')}})});$(".fly-but-wrap").on('click',function(){$("#fly-wrap").toggleClass("fly-menu");$("#head-main-top").toggleClass("fly-content");$("#wallpaper").toggleClass("fly-content");$(".col-tabs-wrap").toggleClass("fly-content");$("#main-nav-wrap").toggleClass("main-nav-over");$("#soc-nav-wrap").toggleClass("fly-content");$("#body-main-wrap").toggleClass("fly-content");$(".fly-but-wrap").toggleClass("fly-open");$(".fly-fade").toggleClass("fly-fade-trans")});var duration=500;$('.back-to-top').on('click',function(event){event.preventDefault();$('html, body').animate({scrollTop:0},duration);return!1});$(".nav-search-but").on('click',function(){$(".search-fly-wrap").slideToggle()});$('#site-wrap').each(function(){$(this).find("ul.col-tabs li.feat-col-tab").addClass("active").show()});$("ul.col-tabs li").on('click',function(e){$(this).parents('#site-wrap').find("ul.col-tabs li").removeClass("active");$(this).addClass("active");$(this).parents('#site-wrap').find(".tab-col-cont").hide();var activeTab=$(this).find("a").attr("href");$(this).parents('#site-wrap').find(activeTab).fadeIn();$('html, body').animate({scrollTop:0},duration);return!1;e.preventDefault()});$("ul.col-tabs li a").on('click',function(e){e.preventDefault()})
$(".non-feat-tab").on('click',function(e){$("#feat-top-wrap").hide();$("#feat-wide-wrap").hide()});$(".feat-col-tab").on('click',function(e){$("#feat-top-wrap").fadeIn();$("#feat-wide-wrap").fadeIn()})});(function(window,$,undefined){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=!1;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=!1}
function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault()}
if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft()}else{config.wipeRight()}}else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown()}else{config.wipeUp()}}}}
function onTouchStart(e){if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=!0;this.addEventListener('touchmove',onTouchMove,!1)}}
if('ontouchstart' in document.documentElement){this.addEventListener('touchstart',onTouchStart,!1)}});return this};$.elastislide=function(options,element){this.$el=$(element);this._init(options)};$.elastislide.defaults={speed:450,easing:'',imageW:190,margin:0,border:0,minItems:1,current:0,onClick:function(){return!1}};$.elastislide.prototype={_init:function(options){this.options=$.extend(!0,{},$.elastislide.defaults,options);this.$slider=this.$el.find('ul');this.$items=this.$slider.children('li');this.itemsCount=this.$items.length;this.$esCarousel=this.$slider.parent();this._validateOptions();this._configure();this._addControls();this._initEvents();this.$slider.show();this._slideToCurrent(!1)},_validateOptions:function(){if(this.options.speed<0)
this.options.speed=450;if(this.options.margin<0)
this.options.margin=4;if(this.options.border<0)
this.options.border=1;if(this.options.minItems<1||this.options.minItems>this.itemsCount)
this.options.minItems=1;if(this.options.current>this.itemsCount-1)
this.options.current=0},_configure:function(){this.current=this.options.current;this.visibleWidth=this.$esCarousel.width();if(this.visibleWidth<this.options.minItems*(this.options.imageW+2*this.options.border)+(this.options.minItems-1)*this.options.margin){this._setDim((this.visibleWidth-(this.options.minItems-1)*this.options.margin)/this.options.minItems);this._setCurrentValues();this.fitCount=this.options.minItems}else{this._setDim();this._setCurrentValues()}
this.$slider.css({width:this.sliderW})},_setDim:function(elW){this.$items.css({marginRight:this.options.margin,width:(elW)?elW:this.options.imageW+2*this.options.border}).children('a').css({borderWidth:this.options.border})},_setCurrentValues:function(){this.itemW=this.$items.outerWidth(!0);this.sliderW=this.itemW*this.itemsCount;this.visibleWidth=this.$esCarousel.width();this.fitCount=Math.floor(this.visibleWidth/this.itemW)},_addControls:function(){this.$navNext=$('<span class="es-nav-next"><a>&gt;</a></span>');this.$navPrev=$('<span class="es-nav-prev"><a>&lt;</a></span>');$('<div class="es-nav"/>').append(this.$navPrev).append(this.$navNext).appendTo(this.$el)},_toggleControls:function(dir,status){if(dir&&status){if(status===1)(dir==='right')?this.$navNext.show():this.$navPrev.show();else(dir==='right')?this.$navNext.hide():this.$navPrev.hide()}else if(this.current===this.itemsCount-1||this.fitCount>=this.itemsCount)
this.$navNext.hide()},_initEvents:function(){var instance=this;$(window).bind('resize.elastislide',function(event){instance._setCurrentValues();if(instance.visibleWidth<instance.options.minItems*(instance.options.imageW+2*instance.options.border)+(instance.options.minItems-1)*instance.options.margin){instance._setDim((instance.visibleWidth-(instance.options.minItems-1)*instance.options.margin)/instance.options.minItems);instance._setCurrentValues();instance.fitCount=instance.options.minItems}else{instance._setDim();instance._setCurrentValues()}
instance.$slider.css({width:instance.sliderW+10});clearTimeout(instance.resetTimeout);instance.resetTimeout=setTimeout(function(){instance._slideToCurrent()},200)});this.$navNext.bind('click.elastislide',function(event){instance._slide('right')});this.$navPrev.bind('click.elastislide',function(event){instance._slide('left')});this.$items.bind('click.elastislide',function(event){instance.options.onClick($(this))});instance.$slider.touchwipe({wipeLeft:function(){instance._slide('right')},wipeRight:function(){instance._slide('left')}})},_slide:function(dir,val,anim,callback){if(this.$slider.is(':animated'))
return!1;var ml=parseFloat(this.$slider.css('margin-left'));if(val===undefined){var amount=this.fitCount*this.itemW,val;if(amount<0)return!1;if(dir==='right'&&this.sliderW-(Math.abs(ml)+amount)<this.visibleWidth){amount=this.sliderW-(Math.abs(ml)+this.visibleWidth)-this.options.margin;this._toggleControls('right',-1);this._toggleControls('left',1)}else if(dir==='left'&&Math.abs(ml)-amount<0){amount=Math.abs(ml);this._toggleControls('left',-1);this._toggleControls('right',1)}else{var fml;(dir==='right')?fml=Math.abs(ml)+this.options.margin+Math.abs(amount):fml=Math.abs(ml)-this.options.margin-Math.abs(amount);if(fml>0)
this._toggleControls('left',1);else this._toggleControls('left',-1);if(fml<this.sliderW-this.visibleWidth)
this._toggleControls('right',1);else this._toggleControls('right',-1)}(dir==='right')?val='-='+amount:val='+='+amount}else{var fml=Math.abs(val);if(Math.max(this.sliderW,this.visibleWidth)-fml<this.visibleWidth){val=-(Math.max(this.sliderW,this.visibleWidth)-this.visibleWidth);if(val!==0)
val+=this.options.margin;this._toggleControls('right',-1);fml=Math.abs(val)}
if(fml>0)
this._toggleControls('left',1);else this._toggleControls('left',-1);if(Math.max(this.sliderW,this.visibleWidth)-this.visibleWidth>fml+this.options.margin)
this._toggleControls('right',1);else this._toggleControls('right',-1)}
$.fn.applyStyle=(anim===undefined)?$.fn.animate:$.fn.css;var sliderCSS={marginLeft:val};var instance=this;this.$slider.applyStyle(sliderCSS,$.extend(!0,[],{duration:this.options.speed,easing:this.options.easing,complete:function(){if(callback)callback.call()}}))},_slideToCurrent:function(anim){var amount=this.current*this.itemW;this._slide('',-amount,anim)},add:function($newelems,callback){this.$items=this.$items.add($newelems);this.itemsCount=this.$items.length;this._setDim();this._setCurrentValues();this.$slider.css({width:this.sliderW});this._slideToCurrent();if(callback)callback.call($newelems)},destroy:function(callback){this._destroy(callback)},_destroy:function(callback){this.$el.unbind('.elastislide').removeData('elastislide');$(window).unbind('.elastislide');if(callback)callback.call()}};var logError=function(message){if(this.console){console.error(message)}};$.fn.elastislide=function(options){if(typeof options==='string'){var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,'elastislide');if(!instance){logError("cannot call methods on elastislide prior to initialization; "+"attempted to call method '"+options+"'");return}
if(!$.isFunction(instance[options])||options.charAt(0)==="_"){logError("no such method '"+options+"' for elastislide instance");return}
instance[options].apply(instance,args)})}else{this.each(function(){var instance=$.data(this,'elastislide');if(!instance){$.data(this,'elastislide',new $.elastislide(options,this))}})}
return this}})(window,jQuery);(function(jQuery){var domfocus=!1;var mousefocus=!1;var zoomactive=!1;var tabindexcounter=5000;var ascrailcounter=2000;var globalmaxzindex=0;var $=jQuery;function getScriptPath(){var scripts=document.getElementsByTagName('script');var path=scripts[scripts.length-1].src.split('?')[0];return(path.split('/').length>0)?path.split('/').slice(0,-1).join('/')+'/':''}
var scriptpath=getScriptPath();var vendors=['ms','moz','webkit','o'];var setAnimationFrame=window.requestAnimationFrame||!1;var clearAnimationFrame=window.cancelAnimationFrame||!1;if(!setAnimationFrame){for(var vx in vendors){var v=vendors[vx];if(!setAnimationFrame)setAnimationFrame=window[v+'RequestAnimationFrame'];if(!clearAnimationFrame)clearAnimationFrame=window[v+'CancelAnimationFrame']||window[v+'CancelRequestAnimationFrame']}}
var clsMutationObserver=window.MutationObserver||window.WebKitMutationObserver||!1;var _globaloptions={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:8*3,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:0.3,rtlmode:!1,cursordragontouch:!1,oneaxismousemode:"auto"}
var browserdetected=!1;var getBrowserDetection=function(){if(browserdetected)return browserdetected;var domtest=document.createElement('DIV');var d={};d.haspointerlock="pointerLockElement" in document||"mozPointerLockElement" in document||"webkitPointerLockElement" in document;d.isopera=("opera" in window);d.isopera12=(d.isopera&&("getUserMedia" in navigator));d.isoperamini=(Object.prototype.toString.call(window.operamini)==="[object OperaMini]");d.isie=(("all" in document)&&("attachEvent" in domtest)&&!d.isopera);d.isieold=(d.isie&&!("msInterpolationMode" in domtest.style));d.isie7=d.isie&&!d.isieold&&(!("documentMode" in document)||(document.documentMode==7));d.isie8=d.isie&&("documentMode" in document)&&(document.documentMode==8);d.isie9=d.isie&&("performance" in window)&&(document.documentMode>=9);d.isie10=d.isie&&("performance" in window)&&(document.documentMode>=10);d.isie9mobile=/iemobile.9/i.test(navigator.userAgent);if(d.isie9mobile)d.isie9=!1;d.isie7mobile=(!d.isie9mobile&&d.isie7)&&/iemobile/i.test(navigator.userAgent);d.ismozilla=("MozAppearance" in domtest.style);d.iswebkit=("WebkitAppearance" in domtest.style);d.ischrome=("chrome" in window);d.ischrome22=(d.ischrome&&d.haspointerlock);d.ischrome26=(d.ischrome&&("transition" in domtest.style));d.cantouch=("ontouchstart" in document.documentElement)||("ontouchstart" in window);d.hasmstouch=(window.navigator.msPointerEnabled||!1);d.ismac=/^mac$/i.test(navigator.platform);d.isios=(d.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform));d.isios4=((d.isios)&&!("seal" in Object));d.isandroid=(/android/i.test(navigator.userAgent));d.trstyle=!1;d.hastransform=!1;d.hastranslate3d=!1;d.transitionstyle=!1;d.hastransition=!1;d.transitionend=!1;var check=['transform','msTransform','webkitTransform','MozTransform','OTransform'];for(var a=0;a<check.length;a++){if(typeof domtest.style[check[a]]!="undefined"){d.trstyle=check[a];break}}
d.hastransform=(d.trstyle!=!1);if(d.hastransform){domtest.style[d.trstyle]="translate3d(1px,2px,3px)";d.hastranslate3d=/translate3d/.test(domtest.style[d.trstyle])}
d.transitionstyle=!1;d.prefixstyle='';d.transitionend=!1;var check=['transition','webkitTransition','MozTransition','OTransition','OTransition','msTransition','KhtmlTransition'];var prefix=['','-webkit-','-moz-','-o-','-o','-ms-','-khtml-'];var evs=['transitionend','webkitTransitionEnd','transitionend','otransitionend','oTransitionEnd','msTransitionEnd','KhtmlTransitionEnd'];for(var a=0;a<check.length;a++){if(check[a]in domtest.style){d.transitionstyle=check[a];d.prefixstyle=prefix[a];d.transitionend=evs[a];break}}
if(d.ischrome26){d.prefixstyle=prefix[1]}
d.hastransition=(d.transitionstyle);function detectCursorGrab(){var lst=['-moz-grab','-webkit-grab','grab'];if((d.ischrome&&!d.ischrome22)||d.isie)lst=[];for(var a=0;a<lst.length;a++){var p=lst[a];domtest.style.cursor=p;if(domtest.style.cursor==p)return p}
return'url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize'}
d.cursorgrabvalue=detectCursorGrab();d.hasmousecapture=("setCapture" in domtest);d.hasMutationObserver=(clsMutationObserver!==!1);domtest=null;browserdetected=d;return d}
var NiceScrollClass=function(myopt,me){var self=this;this.version='3.5.0 BETA5';this.name='nicescroll';this.me=me;this.opt={doc:$("body"),win:!1};$.extend(this.opt,_globaloptions);this.opt.snapbackspeed=80;if(myopt||!1){for(var a in self.opt){if(typeof myopt[a]!="undefined")self.opt[a]=myopt[a]}}
this.doc=self.opt.doc;this.iddoc=(this.doc&&this.doc[0])?this.doc[0].id||'':'';this.ispage=/BODY|HTML/.test((self.opt.win)?self.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=(self.opt.win!==!1);this.win=self.opt.win||(this.ispage?$(window):this.doc);this.docscroll=(this.ispage&&!this.haswrapper)?$(window):this.win;this.body=$("body");this.viewport=!1;this.isfixed=!1;this.iframe=!1;this.isiframe=((this.doc[0].nodeName=='IFRAME')&&(this.win[0].nodeName=='IFRAME'));this.istextarea=(this.win[0].nodeName=='TEXTAREA');this.forcescreen=!1;this.canshowonmouseevent=(self.opt.autohidemode!="scroll");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"+(ascrailcounter++)}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=self.opt.overflowx;this.overflowy=self.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltax=0;this.lastdeltay=0;this.detected=getBrowserDetection();var cap=$.extend({},this.detected);this.canhwscroll=(cap.hastransform&&self.opt.hwacceleration);this.ishwscroll=(this.canhwscroll&&self.haswrapper);this.istouchcapable=!1;if(cap.cantouch&&cap.ischrome&&!cap.isios&&!cap.isandroid){this.istouchcapable=!0;cap.cantouch=!1}
if(cap.cantouch&&cap.ismozilla&&!cap.isios&&!cap.isandroid){this.istouchcapable=!0;cap.cantouch=!1}
if(!self.opt.enablemouselockapi){cap.hasmousecapture=!1;cap.haspointerlock=!1}
this.delayed=function(name,fn,tm,lazy){var dd=self.delaylist[name];var nw=(new Date()).getTime();if(!lazy&&dd&&dd.tt)return!1;if(dd&&dd.tt)clearTimeout(dd.tt);if(dd&&dd.last+tm>nw&&!dd.tt){self.delaylist[name]={last:nw+tm,tt:setTimeout(function(){self.delaylist[name].tt=0;fn.call()},tm)}}else if(!dd||!dd.tt){self.delaylist[name]={last:nw,tt:0}
setTimeout(function(){fn.call()},0)}};this.debounced=function(name,fn,tm){var dd=self.delaylist[name];var nw=(new Date()).getTime();self.delaylist[name]=fn;if(!dd){setTimeout(function(){var fn=self.delaylist[name];self.delaylist[name]=!1;fn.call()},tm)}}
this.synched=function(name,fn){function requestSync(){if(self.onsync)return;setAnimationFrame(function(){self.onsync=!1;for(name in self.synclist){var fn=self.synclist[name];if(fn)fn.call(self);self.synclist[name]=!1}});self.onsync=!0};self.synclist[name]=fn;requestSync();return name};this.unsynched=function(name){if(self.synclist[name])self.synclist[name]=!1}
this.css=function(el,pars){for(var n in pars){self.saved.css.push([el,n,el.css(n)]);el.css(n,pars[n])}};this.scrollTop=function(val){return(typeof val=="undefined")?self.getScrollTop():self.setScrollTop(val)};this.scrollLeft=function(val){return(typeof val=="undefined")?self.getScrollLeft():self.setScrollLeft(val)};BezierClass=function(st,ed,spd,p1,p2,p3,p4){this.st=st;this.ed=ed;this.spd=spd;this.p1=p1||0;this.p2=p2||1;this.p3=p3||0;this.p4=p4||1;this.ts=(new Date()).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(t){return 3*t*t*(1-t)},B3:function(t){return 3*t*(1-t)*(1-t)},B4:function(t){return(1-t)*(1-t)*(1-t)},getNow:function(){var nw=(new Date()).getTime();var pc=1-((nw-this.ts)/this.spd);var bz=this.B2(pc)+this.B3(pc)+this.B4(pc);return(pc<0)?this.ed:this.st+Math.round(this.df*bz)},update:function(ed,spd){this.st=this.getNow();this.ed=ed;this.spd=spd;this.ts=(new Date()).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};if(cap.hastranslate3d&&cap.isios)this.doc.css("-webkit-backface-visibility","hidden");function getMatrixValues(){var tr=self.doc.css(cap.trstyle);if(tr&&(tr.substr(0,6)=="matrix")){return tr.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,'').split(/, +/)}
return!1}
this.getScrollTop=function(last){if(!last){var mtx=getMatrixValues();if(mtx)return(mtx.length==16)?-mtx[13]:-mtx[5];if(self.timerscroll&&self.timerscroll.bz)return self.timerscroll.bz.getNow()}
return self.doc.translate.y};this.getScrollLeft=function(last){if(!last){var mtx=getMatrixValues();if(mtx)return(mtx.length==16)?-mtx[12]:-mtx[4];if(self.timerscroll&&self.timerscroll.bh)return self.timerscroll.bh.getNow()}
return self.doc.translate.x};if(document.createEvent){this.notifyScrollEvent=function(el){var e=document.createEvent("UIEvents");e.initUIEvent("scroll",!1,!0,window,1);el.dispatchEvent(e)}}else if(document.fireEvent){this.notifyScrollEvent=function(el){var e=document.createEventObject();el.fireEvent("onscroll");e.cancelBubble=!0}}else{this.notifyScrollEvent=function(el,add){}}
if(cap.hastranslate3d&&self.opt.enabletranslate3d){this.setScrollTop=function(val,silent){self.doc.translate.y=val;self.doc.translate.ty=(val*-1)+"px";self.doc.css(cap.trstyle,"translate3d("+self.doc.translate.tx+","+self.doc.translate.ty+",0px)");if(!silent)self.notifyScrollEvent(self.win[0])};this.setScrollLeft=function(val,silent){self.doc.translate.x=val;self.doc.translate.tx=(val*-1)+"px";self.doc.css(cap.trstyle,"translate3d("+self.doc.translate.tx+","+self.doc.translate.ty+",0px)");if(!silent)self.notifyScrollEvent(self.win[0])}}else{this.setScrollTop=function(val,silent){self.doc.translate.y=val;self.doc.translate.ty=(val*-1)+"px";self.doc.css(cap.trstyle,"translate("+self.doc.translate.tx+","+self.doc.translate.ty+")");if(!silent)self.notifyScrollEvent(self.win[0])};this.setScrollLeft=function(val,silent){self.doc.translate.x=val;self.doc.translate.tx=(val*-1)+"px";self.doc.css(cap.trstyle,"translate("+self.doc.translate.tx+","+self.doc.translate.ty+")");if(!silent)self.notifyScrollEvent(self.win[0])}}}else{this.getScrollTop=function(){return self.docscroll.scrollTop()};this.setScrollTop=function(val){return self.docscroll.scrollTop(val)};this.getScrollLeft=function(){return self.docscroll.scrollLeft()};this.setScrollLeft=function(val){return self.docscroll.scrollLeft(val)}}
this.getTarget=function(e){if(!e)return!1;if(e.target)return e.target;if(e.srcElement)return e.srcElement;return!1};this.hasParent=function(e,id){if(!e)return!1;var el=e.target||e.srcElement||e||!1;while(el&&el.id!=id){el=el.parentNode||!1}
return(el!==!1)};function getZIndex(){var dom=self.win;if("zIndex" in dom)return dom.zIndex();while(dom.length>0){if(dom[0].nodeType==9)return!1;var zi=dom.css('zIndex');if(!isNaN(zi)&&zi!=0)return parseInt(zi);dom=dom.parent()}
return!1};var _convertBorderWidth={"thin":1,"medium":3,"thick":5};function getWidthToPixel(dom,prop,chkheight){var wd=dom.css(prop);var px=parseFloat(wd);if(isNaN(px)){px=_convertBorderWidth[wd]||0;var brd=(px==3)?((chkheight)?(self.win.outerHeight()-self.win.innerHeight()):(self.win.outerWidth()-self.win.innerWidth())):1;if(self.isie8&&px)px+=1;return(brd)?px:0}
return px};this.getOffset=function(){if(self.isfixed)return{top:parseFloat(self.win.css('top')),left:parseFloat(self.win.css('left'))};if(!self.viewport)return self.win.offset();var ww=self.win.offset();var vp=self.viewport.offset();return{top:ww.top-vp.top+self.viewport.scrollTop(),left:ww.left-vp.left+self.viewport.scrollLeft()}};this.updateScrollBar=function(len){if(self.ishwscroll){self.rail.css({height:self.win.innerHeight()});if(self.railh)self.railh.css({width:self.win.innerWidth()})}else{var wpos=self.getOffset();var pos={top:wpos.top,left:wpos.left};pos.top+=getWidthToPixel(self.win,'border-top-width',!0);var brd=(self.win.outerWidth()-self.win.innerWidth())/2;pos.left+=(self.rail.align)?self.win.outerWidth()-getWidthToPixel(self.win,'border-right-width')-self.rail.width:getWidthToPixel(self.win,'border-left-width');var off=self.opt.railoffset;if(off){if(off.top)pos.top+=off.top;if(self.rail.align&&off.left)pos.left+=off.left}
if(!self.locked)self.rail.css({top:pos.top,left:pos.left,height:(len)?len.h:self.win.innerHeight()});if(self.zoom){self.zoom.css({top:pos.top+1,left:(self.rail.align==1)?pos.left-20:pos.left+self.rail.width+4})}
if(self.railh&&!self.locked){var pos={top:wpos.top,left:wpos.left};var y=(self.railh.align)?pos.top+getWidthToPixel(self.win,'border-top-width',!0)+self.win.innerHeight()-self.railh.height:pos.top+getWidthToPixel(self.win,'border-top-width',!0);var x=pos.left+getWidthToPixel(self.win,'border-left-width');self.railh.css({top:y,left:x,width:self.railh.width})}}};this.doRailClick=function(e,dbl,hr){var fn,pg,cur,pos;if(self.locked)return;self.cancelEvent(e);if(dbl){fn=(hr)?self.doScrollLeft:self.doScrollTop;cur=(hr)?((e.pageX-self.railh.offset().left-(self.cursorwidth/2))*self.scrollratio.x):((e.pageY-self.rail.offset().top-(self.cursorheight/2))*self.scrollratio.y);fn(cur)}else{fn=(hr)?self.doScrollLeftBy:self.doScrollBy;cur=(hr)?self.scroll.x:self.scroll.y;pos=(hr)?e.pageX-self.railh.offset().left:e.pageY-self.rail.offset().top;pg=(hr)?self.view.w:self.view.h;(cur>=pos)?fn(pg):fn(-pg)}}
self.hasanimationframe=(setAnimationFrame);self.hascancelanimationframe=(clearAnimationFrame);if(!self.hasanimationframe){setAnimationFrame=function(fn){return setTimeout(fn,15-Math.floor((+new Date)/1000)%16)};clearAnimationFrame=clearInterval}else if(!self.hascancelanimationframe)clearAnimationFrame=function(){self.cancelAnimationFrame=!0};this.init=function(){self.saved.css=[];if(cap.isie7mobile)return!0;if(cap.isoperamini)return!0;if(cap.hasmstouch)self.css((self.ispage)?$("html"):self.win,{'-ms-touch-action':'none'});self.zindex="auto";if(!self.ispage&&self.opt.zindex=="auto"){self.zindex=getZIndex()||"auto"}else{self.zindex=self.opt.zindex}
if(!self.ispage&&self.zindex!="auto"){if(self.zindex>globalmaxzindex)globalmaxzindex=self.zindex}
if(self.isie&&self.zindex==0&&self.opt.zindex=="auto"){self.zindex="auto"}
if(!self.ispage||(!cap.cantouch&&!cap.isieold&&!cap.isie9mobile)){var cont=self.docscroll;if(self.ispage)cont=(self.haswrapper)?self.win:self.doc;if(!cap.isie9mobile)self.css(cont,{'overflow-y':'hidden'});if(self.ispage&&cap.isie7){if(self.doc[0].nodeName=='BODY')self.css($("html"),{'overflow-y':'hidden'});else if(self.doc[0].nodeName=='HTML')self.css($("body"),{'overflow-y':'hidden'})}
if(cap.isios&&!self.ispage&&!self.haswrapper)self.css($("body"),{"-webkit-overflow-scrolling":"touch"});var cursor=$(document.createElement('div'));cursor.css({position:"relative",top:0,"float":"right",width:self.opt.cursorwidth,height:"0px",'background-color':self.opt.cursorcolor,border:self.opt.cursorborder,'background-clip':'padding-box','-webkit-border-radius':self.opt.cursorborderradius,'-moz-border-radius':self.opt.cursorborderradius,'border-radius':self.opt.cursorborderradius});cursor.hborder=parseFloat(cursor.outerHeight()-cursor.innerHeight());self.cursor=cursor;var rail=$(document.createElement('div'));rail.attr('id',self.id);rail.addClass('nicescroll-rails');var v,a,kp=["left","right"];for(var n in kp){a=kp[n];v=self.opt.railpadding[a];(v)?rail.css("padding-"+a,v+"px"):self.opt.railpadding[a]=0}
rail.append(cursor);rail.width=Math.max(parseFloat(self.opt.cursorwidth),cursor.outerWidth())+self.opt.railpadding.left+self.opt.railpadding.right;rail.css({width:rail.width+"px",'zIndex':self.zindex,"background":self.opt.background,cursor:"default"});rail.visibility=!0;rail.scrollable=!0;rail.align=(self.opt.railalign=="left")?0:1;self.rail=rail;self.rail.drag=!1;var zoom=!1;if(self.opt.boxzoom&&!self.ispage&&!cap.isieold){zoom=document.createElement('div');self.bind(zoom,"click",self.doZoom);self.zoom=$(zoom);self.zoom.css({"cursor":"pointer",'z-index':self.zindex,'backgroundImage':'url('+scriptpath+'zoomico.png)','height':18,'width':18,'backgroundPosition':'0px 0px'});if(self.opt.dblclickzoom)self.bind(self.win,"dblclick",self.doZoom);if(cap.cantouch&&self.opt.gesturezoom){self.ongesturezoom=function(e){if(e.scale>1.5)self.doZoomIn(e);if(e.scale<0.8)self.doZoomOut(e);return self.cancelEvent(e)};self.bind(self.win,"gestureend",self.ongesturezoom)}}
self.railh=!1;if(self.opt.horizrailenabled){self.css(cont,{'overflow-x':'hidden'});var cursor=$(document.createElement('div'));cursor.css({position:"relative",top:0,height:self.opt.cursorwidth,width:"0px",'background-color':self.opt.cursorcolor,border:self.opt.cursorborder,'background-clip':'padding-box','-webkit-border-radius':self.opt.cursorborderradius,'-moz-border-radius':self.opt.cursorborderradius,'border-radius':self.opt.cursorborderradius});cursor.wborder=parseFloat(cursor.outerWidth()-cursor.innerWidth());self.cursorh=cursor;var railh=$(document.createElement('div'));railh.attr('id',self.id+'-hr');railh.addClass('nicescroll-rails');railh.height=Math.max(parseFloat(self.opt.cursorwidth),cursor.outerHeight());railh.css({height:railh.height+"px",'zIndex':self.zindex,"background":self.opt.background});railh.append(cursor);railh.visibility=!0;railh.scrollable=!0;railh.align=(self.opt.railvalign=="top")?0:1;self.railh=railh;self.railh.drag=!1}
if(self.ispage){rail.css({position:"fixed",top:"0px",height:"100%"});(rail.align)?rail.css({right:"0px"}):rail.css({left:"0px"});self.body.append(rail);if(self.railh){railh.css({position:"fixed",left:"0px",width:"100%"});(railh.align)?railh.css({bottom:"0px"}):railh.css({top:"0px"});self.body.append(railh)}}else{if(self.ishwscroll){if(self.win.css('position')=='static')self.css(self.win,{'position':'relative'});var bd=(self.win[0].nodeName=='HTML')?self.body:self.win;if(self.zoom){self.zoom.css({position:"absolute",top:1,right:0,"margin-right":rail.width+4});bd.append(self.zoom)}
rail.css({position:"absolute",top:0});(rail.align)?rail.css({right:0}):rail.css({left:0});bd.append(rail);if(railh){railh.css({position:"absolute",left:0,bottom:0});(railh.align)?railh.css({bottom:0}):railh.css({top:0});bd.append(railh)}}else{self.isfixed=(self.win.css("position")=="fixed");var rlpos=(self.isfixed)?"fixed":"absolute";if(!self.isfixed)self.viewport=self.getViewport(self.win[0]);if(self.viewport){self.body=self.viewport;if((/relative|absolute/.test(self.viewport.css("position")))==!1)self.css(self.viewport,{"position":"relative"})}
rail.css({position:rlpos});if(self.zoom)self.zoom.css({position:rlpos});self.updateScrollBar();self.body.append(rail);if(self.zoom)self.body.append(self.zoom);if(self.railh){railh.css({position:rlpos});self.body.append(railh)}}
if(cap.isios)self.css(self.win,{'-webkit-tap-highlight-color':'rgba(0,0,0,0)','-webkit-touch-callout':'none'});if(cap.isie&&self.opt.disableoutline)self.win.attr("hideFocus","true");if(cap.iswebkit&&self.opt.disableoutline)self.win.css({"outline":"none"})}
if(self.opt.autohidemode===!1){self.autohidedom=!1;self.rail.css({opacity:self.opt.cursoropacitymax});if(self.railh)self.railh.css({opacity:self.opt.cursoropacitymax})}else if(self.opt.autohidemode===!0){self.autohidedom=$().add(self.rail);if(cap.isie8)self.autohidedom=self.autohidedom.add(self.cursor);if(self.railh)self.autohidedom=self.autohidedom.add(self.railh);if(self.railh&&cap.isie8)self.autohidedom=self.autohidedom.add(self.cursorh)}else if(self.opt.autohidemode=="scroll"){self.autohidedom=$().add(self.rail);if(self.railh)self.autohidedom=self.autohidedom.add(self.railh)}else if(self.opt.autohidemode=="cursor"){self.autohidedom=$().add(self.cursor);if(self.railh)self.autohidedom=self.autohidedom.add(self.cursorh)}else if(self.opt.autohidemode=="hidden"){self.autohidedom=!1;self.hide();self.locked=!1}
if(cap.isie9mobile){self.scrollmom=new ScrollMomentumClass2D(self);self.onmangotouch=function(e){var py=self.getScrollTop();var px=self.getScrollLeft();if((py==self.scrollmom.lastscrolly)&&(px==self.scrollmom.lastscrollx))return!0;var dfy=py-self.mangotouch.sy;var dfx=px-self.mangotouch.sx;var df=Math.round(Math.sqrt(Math.pow(dfx,2)+Math.pow(dfy,2)));if(df==0)return;var dry=(dfy<0)?-1:1;var drx=(dfx<0)?-1:1;var tm=+new Date();if(self.mangotouch.lazy)clearTimeout(self.mangotouch.lazy);if(((tm-self.mangotouch.tm)>80)||(self.mangotouch.dry!=dry)||(self.mangotouch.drx!=drx)){self.scrollmom.stop();self.scrollmom.reset(px,py);self.mangotouch.sy=py;self.mangotouch.ly=py;self.mangotouch.sx=px;self.mangotouch.lx=px;self.mangotouch.dry=dry;self.mangotouch.drx=drx;self.mangotouch.tm=tm}else{self.scrollmom.stop();self.scrollmom.update(self.mangotouch.sx-dfx,self.mangotouch.sy-dfy);var gap=tm-self.mangotouch.tm;self.mangotouch.tm=tm;var ds=Math.max(Math.abs(self.mangotouch.ly-py),Math.abs(self.mangotouch.lx-px));self.mangotouch.ly=py;self.mangotouch.lx=px;if(ds>2){self.mangotouch.lazy=setTimeout(function(){self.mangotouch.lazy=!1;self.mangotouch.dry=0;self.mangotouch.drx=0;self.mangotouch.tm=0;self.scrollmom.doMomentum(30)},100)}}}
var top=self.getScrollTop();var lef=self.getScrollLeft();self.mangotouch={sy:top,ly:top,dry:0,sx:lef,lx:lef,drx:0,lazy:!1,tm:0};self.bind(self.docscroll,"scroll",self.onmangotouch)}else{if(cap.cantouch||self.istouchcapable||self.opt.touchbehavior||cap.hasmstouch){self.scrollmom=new ScrollMomentumClass2D(self);self.ontouchstart=function(e){if(e.pointerType&&e.pointerType!=2)return!1;if(!self.locked){if(cap.hasmstouch){var tg=(e.target)?e.target:!1;while(tg){var nc=$(tg).getNiceScroll();if((nc.length>0)&&(nc[0].me==self.me))break;if(nc.length>0)return!1;if((tg.nodeName=='DIV')&&(tg.id==self.id))break;tg=(tg.parentNode)?tg.parentNode:!1}}
self.cancelScroll();var tg=self.getTarget(e);if(tg){var skp=(/INPUT/i.test(tg.nodeName))&&(/range/i.test(tg.type));if(skp)return self.stopPropagation(e)}
if(!("clientX" in e)&&("changedTouches" in e)){e.clientX=e.changedTouches[0].clientX;e.clientY=e.changedTouches[0].clientY}
if(self.forcescreen){var le=e;var e={"original":(e.original)?e.original:e};e.clientX=le.screenX;e.clientY=le.screenY}
self.rail.drag={x:e.clientX,y:e.clientY,sx:self.scroll.x,sy:self.scroll.y,st:self.getScrollTop(),sl:self.getScrollLeft(),pt:2,dl:!1};if(self.ispage||!self.opt.directionlockdeadzone){self.rail.drag.dl="f"}else{var view={w:$(window).width(),h:$(window).height()};var page={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}
var maxh=Math.max(0,page.h-view.h);var maxw=Math.max(0,page.w-view.w);if(!self.rail.scrollable&&self.railh.scrollable)self.rail.drag.ck=(maxh>0)?"v":!1;else if(self.rail.scrollable&&!self.railh.scrollable)self.rail.drag.ck=(maxw>0)?"h":!1;else self.rail.drag.ck=!1;if(!self.rail.drag.ck)self.rail.drag.dl="f"}
if(self.opt.touchbehavior&&self.isiframe&&cap.isie){var wp=self.win.position();self.rail.drag.x+=wp.left;self.rail.drag.y+=wp.top}
self.hasmoving=!1;self.lastmouseup=!1;self.scrollmom.reset(e.clientX,e.clientY);if(!cap.cantouch&&!this.istouchcapable&&!cap.hasmstouch){var ip=(tg)?/INPUT|SELECT|TEXTAREA/i.test(tg.nodeName):!1;if(!ip){if(!self.ispage&&cap.hasmousecapture)tg.setCapture();return(self.opt.touchbehavior)?self.cancelEvent(e):self.stopPropagation(e)}
if(/SUBMIT|CANCEL|BUTTON/i.test($(tg).attr('type'))){pc={"tg":tg,"click":!1};self.preventclick=pc}}}};self.ontouchend=function(e){if(e.pointerType&&e.pointerType!=2)return!1;if(self.rail.drag&&(self.rail.drag.pt==2)){self.scrollmom.doMomentum();self.rail.drag=!1;if(self.hasmoving){self.hasmoving=!1;self.lastmouseup=!0;self.hideCursor();if(cap.hasmousecapture)document.releaseCapture();if(!cap.cantouch)return self.cancelEvent(e)}}};var moveneedoffset=(self.opt.touchbehavior&&self.isiframe&&!cap.hasmousecapture);self.ontouchmove=function(e,byiframe){if(e.pointerType&&e.pointerType!=2)return!1;if(self.rail.drag&&(self.rail.drag.pt==2)){if(cap.cantouch&&(typeof e.original=="undefined"))return!0;self.hasmoving=!0;if(self.preventclick&&!self.preventclick.click){self.preventclick.click=self.preventclick.tg.onclick||!1;self.preventclick.tg.onclick=self.onpreventclick}
var ev=$.extend({"original":e},e);e=ev;if(("changedTouches" in e)){e.clientX=e.changedTouches[0].clientX;e.clientY=e.changedTouches[0].clientY}
if(self.forcescreen){var le=e;var e={"original":(e.original)?e.original:e};e.clientX=le.screenX;e.clientY=le.screenY}
var ofx=ofy=0;if(moveneedoffset&&!byiframe){var wp=self.win.position();ofx=-wp.left;ofy=-wp.top}
var fy=e.clientY+ofy;var my=(fy-self.rail.drag.y);var fx=e.clientX+ofx;var mx=(fx-self.rail.drag.x);var ny=self.rail.drag.st-my;if(self.ishwscroll&&self.opt.bouncescroll){if(ny<0){ny=Math.round(ny/2)}else if(ny>self.page.maxh){ny=self.page.maxh+Math.round((ny-self.page.maxh)/2)}}else{if(ny<0){ny=0;fy=0}
if(ny>self.page.maxh){ny=self.page.maxh;fy=0}}
if(self.railh&&self.railh.scrollable){var nx=self.rail.drag.sl-mx;if(self.ishwscroll&&self.opt.bouncescroll){if(nx<0){nx=Math.round(nx/2)}else if(nx>self.page.maxw){nx=self.page.maxw+Math.round((nx-self.page.maxw)/2)}}else{if(nx<0){nx=0;fx=0}
if(nx>self.page.maxw){nx=self.page.maxw;fx=0}}}
var grabbed=!1;if(self.rail.drag.dl){grabbed=!0;if(self.rail.drag.dl=="v")nx=self.rail.drag.sl;else if(self.rail.drag.dl=="h")ny=self.rail.drag.st}else{var ay=Math.abs(my);var ax=Math.abs(mx);var dz=self.opt.directionlockdeadzone;if(self.rail.drag.ck=="v"){if(ay>dz&&(ax<=(ay*0.3))){self.rail.drag=!1;return!0}else if(ax>dz){self.rail.drag.dl="f";$("body").scrollTop($("body").scrollTop())}}else if(self.rail.drag.ck=="h"){if(ax>dz&&(ay<=(ax*0.3))){self.rail.drag=!1;return!0}else if(ay>dz){self.rail.drag.dl="f";$("body").scrollLeft($("body").scrollLeft())}}}
self.synched("touchmove",function(){if(self.rail.drag&&(self.rail.drag.pt==2)){if(self.prepareTransition)self.prepareTransition(0);if(self.rail.scrollable)self.setScrollTop(ny);self.scrollmom.update(fx,fy);if(self.railh&&self.railh.scrollable){self.setScrollLeft(nx);self.showCursor(ny,nx)}else{self.showCursor(ny)}
if(cap.isie10)document.selection.clear()}});if(cap.ischrome&&self.istouchcapable)grabbed=!1;if(grabbed)return self.cancelEvent(e)}}}
self.onmousedown=function(e,hronly){if(self.rail.drag&&self.rail.drag.pt!=1)return;if(self.locked)return self.cancelEvent(e);self.cancelScroll();self.rail.drag={x:e.clientX,y:e.clientY,sx:self.scroll.x,sy:self.scroll.y,pt:1,hr:(!!hronly)};var tg=self.getTarget(e);if(!self.ispage&&cap.hasmousecapture)tg.setCapture();if(self.isiframe&&!cap.hasmousecapture){self.saved.csspointerevents=self.doc.css("pointer-events");self.css(self.doc,{"pointer-events":"none"})}
return self.cancelEvent(e)};self.onmouseup=function(e){if(self.rail.drag){if(cap.hasmousecapture)document.releaseCapture();if(self.isiframe&&!cap.hasmousecapture)self.doc.css("pointer-events",self.saved.csspointerevents);if(self.rail.drag.pt!=1)return;self.rail.drag=!1;return self.cancelEvent(e)}};self.onmousemove=function(e){if(self.rail.drag){if(self.rail.drag.pt!=1)return;if(cap.ischrome&&e.which==0)return self.onmouseup(e);self.cursorfreezed=!0;if(self.rail.drag.hr){self.scroll.x=self.rail.drag.sx+(e.clientX-self.rail.drag.x);if(self.scroll.x<0)self.scroll.x=0;var mw=self.scrollvaluemaxw;if(self.scroll.x>mw)self.scroll.x=mw}else{self.scroll.y=self.rail.drag.sy+(e.clientY-self.rail.drag.y);if(self.scroll.y<0)self.scroll.y=0;var my=self.scrollvaluemax;if(self.scroll.y>my)self.scroll.y=my}
self.synched('mousemove',function(){if(self.rail.drag&&(self.rail.drag.pt==1)){self.showCursor();if(self.rail.drag.hr)self.doScrollLeft(Math.round(self.scroll.x*self.scrollratio.x),self.opt.cursordragspeed);else self.doScrollTop(Math.round(self.scroll.y*self.scrollratio.y),self.opt.cursordragspeed)}});return self.cancelEvent(e)}};if(cap.cantouch||self.opt.touchbehavior){self.onpreventclick=function(e){if(self.preventclick){self.preventclick.tg.onclick=self.preventclick.click;self.preventclick=!1;return self.cancelEvent(e)}}
self.bind(self.win,"mousedown",self.ontouchstart);self.onclick=(cap.isios)?!1:function(e){if(self.lastmouseup){self.lastmouseup=!1;return self.cancelEvent(e)}else{return!0}};if(self.opt.grabcursorenabled&&cap.cursorgrabvalue){self.css((self.ispage)?self.doc:self.win,{'cursor':cap.cursorgrabvalue});self.css(self.rail,{'cursor':cap.cursorgrabvalue})}}else{function checkSelectionScroll(e){if(!self.selectiondrag)return;if(e){var ww=self.win.outerHeight();var df=(e.pageY-self.selectiondrag.top);if(df>0&&df<ww)df=0;if(df>=ww)df-=ww;self.selectiondrag.df=df}
if(self.selectiondrag.df==0)return;var rt=-Math.floor(self.selectiondrag.df/6)*2;self.doScrollBy(rt);self.debounced("doselectionscroll",function(){checkSelectionScroll()},50)}
if("getSelection" in document){self.hasTextSelected=function(){return(document.getSelection().rangeCount>0)}}else if("selection" in document){self.hasTextSelected=function(){return(document.selection.type!="None")}}else{self.hasTextSelected=function(){return!1}}
self.onselectionstart=function(e){if(self.ispage)return;self.selectiondrag=self.win.offset()}
self.onselectionend=function(e){self.selectiondrag=!1}
self.onselectiondrag=function(e){if(!self.selectiondrag)return;if(self.hasTextSelected())self.debounced("selectionscroll",function(){checkSelectionScroll(e)},250)}}
if(cap.hasmstouch){self.css(self.rail,{'-ms-touch-action':'none'});self.css(self.cursor,{'-ms-touch-action':'none'});self.bind(self.win,"MSPointerDown",self.ontouchstart);self.bind(document,"MSPointerUp",self.ontouchend);self.bind(document,"MSPointerMove",self.ontouchmove);self.bind(self.cursor,"MSGestureHold",function(e){e.preventDefault()});self.bind(self.cursor,"contextmenu",function(e){e.preventDefault()})}
if(this.istouchcapable){self.bind(self.win,"touchstart",self.ontouchstart);self.bind(document,"touchend",self.ontouchend);self.bind(document,"touchcancel",self.ontouchend);self.bind(document,"touchmove",self.ontouchmove)}
self.bind(self.cursor,"mousedown",self.onmousedown);self.bind(self.cursor,"mouseup",self.onmouseup);if(self.railh){self.bind(self.cursorh,"mousedown",function(e){self.onmousedown(e,!0)});self.bind(self.cursorh,"mouseup",function(e){if(self.rail.drag&&self.rail.drag.pt==2)return;self.rail.drag=!1;self.hasmoving=!1;self.hideCursor();if(cap.hasmousecapture)document.releaseCapture();return self.cancelEvent(e)})}
if(self.opt.cursordragontouch||!cap.cantouch&&!self.opt.touchbehavior){self.rail.css({"cursor":"default"});self.railh&&self.railh.css({"cursor":"default"});self.jqbind(self.rail,"mouseenter",function(){if(self.canshowonmouseevent)self.showCursor();self.rail.active=!0});self.jqbind(self.rail,"mouseleave",function(){self.rail.active=!1;if(!self.rail.drag)self.hideCursor()});if(self.opt.sensitiverail){self.bind(self.rail,"click",function(e){self.doRailClick(e,!1,!1)});self.bind(self.rail,"dblclick",function(e){self.doRailClick(e,!0,!1)});self.bind(self.cursor,"click",function(e){self.cancelEvent(e)});self.bind(self.cursor,"dblclick",function(e){self.cancelEvent(e)})}
if(self.railh){self.jqbind(self.railh,"mouseenter",function(){if(self.canshowonmouseevent)self.showCursor();self.rail.active=!0});self.jqbind(self.railh,"mouseleave",function(){self.rail.active=!1;if(!self.rail.drag)self.hideCursor()});if(self.opt.sensitiverail){self.bind(self.railh,"click",function(e){self.doRailClick(e,!1,!0)});self.bind(self.railh,"dblclick",function(e){self.doRailClick(e,!0,!0)});self.bind(self.cursorh,"click",function(e){self.cancelEvent(e)});self.bind(self.cursorh,"dblclick",function(e){self.cancelEvent(e)})}}}
if(!cap.cantouch&&!self.opt.touchbehavior){self.bind((cap.hasmousecapture)?self.win:document,"mouseup",self.onmouseup);self.bind(document,"mousemove",self.onmousemove);if(self.onclick)self.bind(document,"click",self.onclick);if(!self.ispage&&self.opt.enablescrollonselection){self.bind(self.win[0],"mousedown",self.onselectionstart);self.bind(document,"mouseup",self.onselectionend);self.bind(self.cursor,"mouseup",self.onselectionend);if(self.cursorh)self.bind(self.cursorh,"mouseup",self.onselectionend);self.bind(document,"mousemove",self.onselectiondrag)}
if(self.zoom){self.jqbind(self.zoom,"mouseenter",function(){if(self.canshowonmouseevent)self.showCursor();self.rail.active=!0});self.jqbind(self.zoom,"mouseleave",function(){self.rail.active=!1;if(!self.rail.drag)self.hideCursor()})}}else{self.bind((cap.hasmousecapture)?self.win:document,"mouseup",self.ontouchend);self.bind(document,"mousemove",self.ontouchmove);if(self.onclick)self.bind(document,"click",self.onclick);if(self.opt.cursordragontouch){self.bind(self.cursor,"mousedown",self.onmousedown);self.bind(self.cursor,"mousemove",self.onmousemove);self.cursorh&&self.bind(self.cursorh,"mousedown",self.onmousedown);self.cursorh&&self.bind(self.cursorh,"mousemove",self.onmousemove)}}
if(self.opt.enablemousewheel){if(!self.isiframe)self.bind((cap.isie&&self.ispage)?document:self.win,"mousewheel",self.onmousewheel);self.bind(self.rail,"mousewheel",self.onmousewheel);if(self.railh)self.bind(self.railh,"mousewheel",self.onmousewheelhr)}
if(!self.ispage&&!cap.cantouch&&!(/HTML|BODY/.test(self.win[0].nodeName))){if(!self.win.attr("tabindex"))self.win.attr({"tabindex":tabindexcounter++});self.jqbind(self.win,"focus",function(e){domfocus=(self.getTarget(e)).id||!0;self.hasfocus=!0;if(self.canshowonmouseevent)self.noticeCursor()});self.jqbind(self.win,"blur",function(e){domfocus=!1;self.hasfocus=!1});self.jqbind(self.win,"mouseenter",function(e){mousefocus=(self.getTarget(e)).id||!0;self.hasmousefocus=!0;if(self.canshowonmouseevent)self.noticeCursor()});self.jqbind(self.win,"mouseleave",function(){mousefocus=!1;self.hasmousefocus=!1})}}
self.onkeypress=function(e){if(self.locked&&self.page.maxh==0)return!0;e=(e)?e:window.e;var tg=self.getTarget(e);if(tg&&/INPUT|TEXTAREA|SELECT|OPTION/.test(tg.nodeName)){var tp=tg.getAttribute('type')||tg.type||!1;if((!tp)||!(/submit|button|cancel/i.tp))return!0}
if(self.hasfocus||(self.hasmousefocus&&!domfocus)||(self.ispage&&!domfocus&&!mousefocus)){var key=e.keyCode;if(self.locked&&key!=27)return self.cancelEvent(e);var ctrl=e.ctrlKey||!1;var shift=e.shiftKey||!1;var ret=!1;switch(key){case 38:case 63233:self.doScrollBy(24*3);ret=!0;break;case 40:case 63235:self.doScrollBy(-24*3);ret=!0;break;case 37:case 63232:if(self.railh){(ctrl)?self.doScrollLeft(0):self.doScrollLeftBy(24*3);ret=!0}
break;case 39:case 63234:if(self.railh){(ctrl)?self.doScrollLeft(self.page.maxw):self.doScrollLeftBy(-24*3);ret=!0}
break;case 33:case 63276:self.doScrollBy(self.view.h);ret=!0;break;case 34:case 63277:self.doScrollBy(-self.view.h);ret=!0;break;case 36:case 63273:(self.railh&&ctrl)?self.doScrollPos(0,0):self.doScrollTo(0);ret=!0;break;case 35:case 63275:(self.railh&&ctrl)?self.doScrollPos(self.page.maxw,self.page.maxh):self.doScrollTo(self.page.maxh);ret=!0;break;case 32:if(self.opt.spacebarenabled){(shift)?self.doScrollBy(self.view.h):self.doScrollBy(-self.view.h);ret=!0}
break;case 27:if(self.zoomactive){self.doZoom();ret=!0}
break}
if(ret)return self.cancelEvent(e)}};if(self.opt.enablekeyboard)self.bind(document,(cap.isopera&&!cap.isopera12)?"keypress":"keydown",self.onkeypress);self.bind(window,'resize',self.lazyResize);self.bind(window,'orientationchange',self.lazyResize);self.bind(window,"load",self.lazyResize);if(cap.ischrome&&!self.ispage&&!self.haswrapper){var tmp=self.win.attr("style");var ww=parseFloat(self.win.css("width"))+1;self.win.css('width',ww);self.synched("chromefix",function(){self.win.attr("style",tmp)})}
self.onAttributeChange=function(e){self.lazyResize(250)}
if(!self.ispage&&!self.haswrapper){if(clsMutationObserver!==!1){self.observer=new clsMutationObserver(function(mutations){mutations.forEach(self.onAttributeChange)});self.observer.observe(self.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1});self.observerremover=new clsMutationObserver(function(mutations){mutations.forEach(function(mo){if(mo.removedNodes.length>0){for(var dd in mo.removedNodes){if(mo.removedNodes[dd]==self.win[0])return self.remove()}}})});self.observerremover.observe(self.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})}else{self.bind(self.win,(cap.isie&&!cap.isie9)?"propertychange":"DOMAttrModified",self.onAttributeChange);if(cap.isie9)self.win[0].attachEvent("onpropertychange",self.onAttributeChange);self.bind(self.win,"DOMNodeRemoved",function(e){if(e.target==self.win[0])self.remove()})}}
if(!self.ispage&&self.opt.boxzoom)self.bind(window,"resize",self.resizeZoom);if(self.istextarea)self.bind(self.win,"mouseup",self.lazyResize);self.checkrtlmode=!0;self.lazyResize(30)}
if(this.doc[0].nodeName=='IFRAME'){function oniframeload(e){self.iframexd=!1;try{var doc='contentDocument' in this?this.contentDocument:this.contentWindow.document;var a=doc.domain}catch(e){self.iframexd=!0;doc=!1};if(self.iframexd){if("console" in window)console.log('NiceScroll error: policy restriced iframe');return!0}
self.forcescreen=!0;if(self.isiframe){self.iframe={"doc":$(doc),"html":self.doc.contents().find('html')[0],"body":self.doc.contents().find('body')[0]};self.getContentSize=function(){return{w:Math.max(self.iframe.html.scrollWidth,self.iframe.body.scrollWidth),h:Math.max(self.iframe.html.scrollHeight,self.iframe.body.scrollHeight)}}
self.docscroll=$(self.iframe.body)}
if(!cap.isios&&self.opt.iframeautoresize&&!self.isiframe){self.win.scrollTop(0);self.doc.height("");var hh=Math.max(doc.getElementsByTagName('html')[0].scrollHeight,doc.body.scrollHeight);self.doc.height(hh)}
self.lazyResize(30);if(cap.isie7)self.css($(self.iframe.html),{'overflow-y':'hidden'});self.css($(self.iframe.body),{'overflow-y':'hidden'});if(cap.isios&&self.haswrapper){self.css($(doc.body),{'-webkit-transform':'translate3d(0,0,0)'});console.log(1)}
if('contentWindow' in this){self.bind(this.contentWindow,"scroll",self.onscroll)}else{self.bind(doc,"scroll",self.onscroll)}
if(self.opt.enablemousewheel){self.bind(doc,"mousewheel",self.onmousewheel)}
if(self.opt.enablekeyboard)self.bind(doc,(cap.isopera)?"keypress":"keydown",self.onkeypress);if(cap.cantouch||self.opt.touchbehavior){self.bind(doc,"mousedown",self.ontouchstart);self.bind(doc,"mousemove",function(e){self.ontouchmove(e,!0)});if(self.opt.grabcursorenabled&&cap.cursorgrabvalue)self.css($(doc.body),{'cursor':cap.cursorgrabvalue})}
self.bind(doc,"mouseup",self.ontouchend);if(self.zoom){if(self.opt.dblclickzoom)self.bind(doc,'dblclick',self.doZoom);if(self.ongesturezoom)self.bind(doc,"gestureend",self.ongesturezoom)}};if(this.doc[0].readyState&&this.doc[0].readyState=="complete"){setTimeout(function(){oniframeload.call(self.doc[0],!1)},500)}
self.bind(this.doc,"load",oniframeload)}};this.showCursor=function(py,px){if(self.cursortimeout){clearTimeout(self.cursortimeout);self.cursortimeout=0}
if(!self.rail)return;if(self.autohidedom){self.autohidedom.stop().css({opacity:self.opt.cursoropacitymax});self.cursoractive=!0}
if(!self.rail.drag||self.rail.drag.pt!=1){if((typeof py!="undefined")&&(py!==!1)){self.scroll.y=Math.round(py*1/self.scrollratio.y)}
if(typeof px!="undefined"){self.scroll.x=Math.round(px*1/self.scrollratio.x)}}
self.cursor.css({height:self.cursorheight,top:self.scroll.y});if(self.cursorh){(!self.rail.align&&self.rail.visibility)?self.cursorh.css({width:self.cursorwidth,left:self.scroll.x+self.rail.width}):self.cursorh.css({width:self.cursorwidth,left:self.scroll.x});self.cursoractive=!0}
if(self.zoom)self.zoom.stop().css({opacity:self.opt.cursoropacitymax})};this.hideCursor=function(tm){if(self.cursortimeout)return;if(!self.rail)return;if(!self.autohidedom)return;self.cursortimeout=setTimeout(function(){if(!self.rail.active||!self.showonmouseevent){self.autohidedom.stop().animate({opacity:self.opt.cursoropacitymin});if(self.zoom)self.zoom.stop().animate({opacity:self.opt.cursoropacitymin});self.cursoractive=!1}
self.cursortimeout=0},tm||self.opt.hidecursordelay)};this.noticeCursor=function(tm,py,px){self.showCursor(py,px);if(!self.rail.active)self.hideCursor(tm)};this.getContentSize=(self.ispage)?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:(self.haswrapper)?function(){return{w:self.doc.outerWidth()+parseInt(self.win.css('paddingLeft'))+parseInt(self.win.css('paddingRight')),h:self.doc.outerHeight()+parseInt(self.win.css('paddingTop'))+parseInt(self.win.css('paddingBottom'))}}:function(){return{w:self.docscroll[0].scrollWidth,h:self.docscroll[0].scrollHeight}};this.onResize=function(e,page){if(!self.win)return!1;if(!self.haswrapper&&!self.ispage){if(self.win.css('display')=='none'){if(self.visibility)self.hideRail().hideRailHr();return!1}else{if(!self.hidden&&!self.visibility)self.showRail().showRailHr()}}
var premaxh=self.page.maxh;var premaxw=self.page.maxw;var preview={h:self.view.h,w:self.view.w};self.view={w:(self.ispage)?self.win.width():parseInt(self.win[0].clientWidth),h:(self.ispage)?self.win.height():parseInt(self.win[0].clientHeight)};self.page=(page)?page:self.getContentSize();self.page.maxh=Math.max(0,self.page.h-self.view.h);self.page.maxw=Math.max(0,self.page.w-self.view.w);if((self.page.maxh==premaxh)&&(self.page.maxw==premaxw)&&(self.view.w==preview.w)){if(!self.ispage){var pos=self.win.offset();if(self.lastposition){var lst=self.lastposition;if((lst.top==pos.top)&&(lst.left==pos.left))return self}
self.lastposition=pos}else{return self}}
if(self.page.maxh==0){self.hideRail();self.scrollvaluemax=0;self.scroll.y=0;self.scrollratio.y=0;self.cursorheight=0;self.setScrollTop(0);self.rail.scrollable=!1}else{self.rail.scrollable=!0}
if(self.page.maxw==0){self.hideRailHr();self.scrollvaluemaxw=0;self.scroll.x=0;self.scrollratio.x=0;self.cursorwidth=0;self.setScrollLeft(0);self.railh.scrollable=!1}else{self.railh.scrollable=!0}
self.locked=(self.page.maxh==0)&&(self.page.maxw==0);if(self.locked){if(!self.ispage)self.updateScrollBar(self.view);return!1}
if(!self.hidden&&!self.visibility){self.showRail().showRailHr()}else if(!self.hidden&&!self.railh.visibility)self.showRailHr();if(self.istextarea&&self.win.css('resize')&&self.win.css('resize')!='none')self.view.h-=20;self.cursorheight=Math.min(self.view.h,Math.round(self.view.h*(self.view.h/self.page.h)));self.cursorheight=(self.opt.cursorfixedheight)?self.opt.cursorfixedheight:Math.max(self.opt.cursorminheight,self.cursorheight);self.cursorwidth=Math.min(self.view.w,Math.round(self.view.w*(self.view.w/self.page.w)));self.cursorwidth=(self.opt.cursorfixedheight)?self.opt.cursorfixedheight:Math.max(self.opt.cursorminheight,self.cursorwidth);self.scrollvaluemax=self.view.h-self.cursorheight-self.cursor.hborder;if(self.railh){self.railh.width=(self.page.maxh>0)?(self.view.w-self.rail.width):self.view.w;self.scrollvaluemaxw=self.railh.width-self.cursorwidth-self.cursorh.wborder}
if(self.checkrtlmode&&self.railh){self.checkrtlmode=!1;if(self.opt.rtlmode&&self.scroll.x==0)self.setScrollLeft(self.page.maxw)}
if(!self.ispage)self.updateScrollBar(self.view);self.scrollratio={x:(self.page.maxw/self.scrollvaluemaxw),y:(self.page.maxh/self.scrollvaluemax)};var sy=self.getScrollTop();if(sy>self.page.maxh){self.doScrollTop(self.page.maxh)}else{self.scroll.y=Math.round(self.getScrollTop()*(1/self.scrollratio.y));self.scroll.x=Math.round(self.getScrollLeft()*(1/self.scrollratio.x));if(self.cursoractive)self.noticeCursor()}
if(self.scroll.y&&(self.getScrollTop()==0))self.doScrollTo(Math.floor(self.scroll.y*self.scrollratio.y));return self};this.resize=self.onResize;this.lazyResize=function(tm){tm=(isNaN(tm))?30:tm;self.delayed('resize',self.resize,tm);return self}
function _modernWheelEvent(dom,name,fn,bubble){self._bind(dom,name,function(e){var e=(e)?e:window.event;var event={original:e,target:e.target||e.srcElement,type:"wheel",deltaMode:e.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){e.preventDefault?e.preventDefault():e.returnValue=!1;return!1},stopImmediatePropagation:function(){(e.stopImmediatePropagation)?e.stopImmediatePropagation():e.cancelBubble=!0}};if(name=="mousewheel"){event.deltaY=-1/40*e.wheelDelta;e.wheelDeltaX&&(event.deltaX=-1/40*e.wheelDeltaX)}else{event.deltaY=e.detail}
return fn.call(dom,event)},bubble)};this._bind=function(el,name,fn,bubble){self.events.push({e:el,n:name,f:fn,b:bubble,q:!1});if(el.addEventListener){el.addEventListener(name,fn,bubble||!1)}else if(el.attachEvent){el.attachEvent("on"+name,fn)}else{el["on"+name]=fn}};this.jqbind=function(dom,name,fn){self.events.push({e:dom,n:name,f:fn,q:!0});$(dom).bind(name,fn)}
this.bind=function(dom,name,fn,bubble){var el=("jquery" in dom)?dom[0]:dom;if(name=='mousewheel'){if("onwheel" in self.win){self._bind(el,"wheel",fn,bubble||!1)}else{var wname=(typeof document.onmousewheel!="undefined")?"mousewheel":"DOMMouseScroll";_modernWheelEvent(el,wname,fn,bubble||!1);if(wname=="DOMMouseScroll")_modernWheelEvent(el,"MozMousePixelScroll",fn,bubble||!1)}}else if(el.addEventListener){if(cap.cantouch&&/mouseup|mousedown|mousemove/.test(name)){var tt=(name=='mousedown')?'touchstart':(name=='mouseup')?'touchend':'touchmove';self._bind(el,tt,function(e){if(e.touches){if(e.touches.length<2){var ev=(e.touches.length)?e.touches[0]:e;ev.original=e;fn.call(this,ev)}}else if(e.changedTouches){var ev=e.changedTouches[0];ev.original=e;fn.call(this,ev)}},bubble||!1)}
self._bind(el,name,fn,bubble||!1);if(cap.cantouch&&name=="mouseup")self._bind(el,"touchcancel",fn,bubble||!1)}else{self._bind(el,name,function(e){e=e||window.event||!1;if(e){if(e.srcElement)e.target=e.srcElement}
if(!("pageY" in e)){e.pageX=e.clientX+document.documentElement.scrollLeft;e.pageY=e.clientY+document.documentElement.scrollTop}
return((fn.call(el,e)===!1)||bubble===!1)?self.cancelEvent(e):!0})}};this._unbind=function(el,name,fn,bub){if(el.removeEventListener){el.removeEventListener(name,fn,bub)}else if(el.detachEvent){el.detachEvent('on'+name,fn)}else{el['on'+name]=!1}};this.unbindAll=function(){for(var a=0;a<self.events.length;a++){var r=self.events[a];(r.q)?r.e.unbind(r.n,r.f):self._unbind(r.e,r.n,r.f,r.b)}};this.cancelEvent=function(e){var e=(e.original)?e.original:(e)?e:window.event||!1;if(!e)return!1;if(e.preventDefault)e.preventDefault();if(e.stopPropagation)e.stopPropagation();if(e.preventManipulation)e.preventManipulation();e.cancelBubble=!0;e.cancel=!0;e.returnValue=!1;return!1};this.stopPropagation=function(e){var e=(e.original)?e.original:(e)?e:window.event||!1;if(!e)return!1;if(e.stopPropagation)return e.stopPropagation();if(e.cancelBubble)e.cancelBubble=!0;return!1}
this.showRail=function(){if((self.page.maxh!=0)&&(self.ispage||self.win.css('display')!='none')){self.visibility=!0;self.rail.visibility=!0;self.rail.css('display','block')}
return self};this.showRailHr=function(){if(!self.railh)return self;if((self.page.maxw!=0)&&(self.ispage||self.win.css('display')!='none')){self.railh.visibility=!0;self.railh.css('display','block')}
return self};this.hideRail=function(){self.visibility=!1;self.rail.visibility=!1;self.rail.css('display','none');return self};this.hideRailHr=function(){if(!self.railh)return self;self.railh.visibility=!1;self.railh.css('display','none');return self};this.show=function(){self.hidden=!1;self.locked=!1;return self.showRail().showRailHr()};this.hide=function(){self.hidden=!0;self.locked=!0;return self.hideRail().hideRailHr()};this.toggle=function(){return(self.hidden)?self.show():self.hide()};this.remove=function(){self.stop();if(self.cursortimeout)clearTimeout(self.cursortimeout);self.doZoomOut();self.unbindAll();if(cap.isie9)self.win[0].detachEvent("onpropertychange",self.onAttributeChange);if(self.observer!==!1)self.observer.disconnect();if(self.observerremover!==!1)self.observerremover.disconnect();self.events=null;if(self.cursor){self.cursor.remove()}
if(self.cursorh){self.cursorh.remove()}
if(self.rail){self.rail.remove()}
if(self.railh){self.railh.remove()}
if(self.zoom){self.zoom.remove()}
for(var a=0;a<self.saved.css.length;a++){var d=self.saved.css[a];d[0].css(d[1],(typeof d[2]=="undefined")?'':d[2])}
self.saved=!1;self.me.data('__nicescroll','');var lst=$.nicescroll;lst.each(function(i){if(!this)return;if(this.id===self.id){delete lst[i];for(var b=++i;b<lst.length;b++,i++)lst[i]=lst[b];lst.length--;if(lst.length)delete lst[lst.length]}});for(var i in self){self[i]=null;delete self[i]}
self=null};this.scrollstart=function(fn){this.onscrollstart=fn;return self}
this.scrollend=function(fn){this.onscrollend=fn;return self}
this.scrollcancel=function(fn){this.onscrollcancel=fn;return self}
this.zoomin=function(fn){this.onzoomin=fn;return self}
this.zoomout=function(fn){this.onzoomout=fn;return self}
this.isScrollable=function(e){var dom=(e.target)?e.target:e;if(dom.nodeName=='OPTION')return!0;while(dom&&(dom.nodeType==1)&&!(/BODY|HTML/.test(dom.nodeName))){var dd=$(dom);var ov=dd.css('overflowY')||dd.css('overflowX')||dd.css('overflow')||'';if(/scroll|auto/.test(ov))return(dom.clientHeight!=dom.scrollHeight);dom=(dom.parentNode)?dom.parentNode:!1}
return!1};this.getViewport=function(me){var dom=(me&&me.parentNode)?me.parentNode:!1;while(dom&&(dom.nodeType==1)&&!(/BODY|HTML/.test(dom.nodeName))){var dd=$(dom);var ov=dd.css('overflowY')||dd.css('overflowX')||dd.css('overflow')||'';if((/scroll|auto/.test(ov))&&(dom.clientHeight!=dom.scrollHeight))return dd;if(dd.getNiceScroll().length>0)return dd;dom=(dom.parentNode)?dom.parentNode:!1}
return!1};function execScrollWheel(e,hr,chkscroll){var px,py;var rt=1;if(e.deltaMode==0){px=-Math.floor(e.deltaX*(self.opt.mousescrollstep/(18*3)));py=-Math.floor(e.deltaY*(self.opt.mousescrollstep/(18*3)))}else if(e.deltaMode==1){px=-Math.floor(e.deltaX*self.opt.mousescrollstep);py=-Math.floor(e.deltaY*self.opt.mousescrollstep)}
if(hr&&self.opt.oneaxismousemode&&(px==0)&&py){px=py;py=0}
if(px){if(self.scrollmom){self.scrollmom.stop()}
self.lastdeltax+=px;self.debounced("mousewheelx",function(){var dt=self.lastdeltax;self.lastdeltax=0;if(!self.rail.drag){self.doScrollLeftBy(dt)}},120)}
if(py){if(self.opt.nativeparentscrolling&&chkscroll&&!self.ispage&&!self.zoomactive){if(py<0){if(self.getScrollTop()>=self.page.maxh)return!0}else{if(self.getScrollTop()<=0)return!0}}
if(self.scrollmom){self.scrollmom.stop()}
self.lastdeltay+=py;self.debounced("mousewheely",function(){var dt=self.lastdeltay;self.lastdeltay=0;if(!self.rail.drag){self.doScrollBy(dt)}},120)}
e.stopImmediatePropagation();return e.preventDefault()};this.onmousewheel=function(e){if(self.locked){self.debounced("checkunlock",self.resize,250);return!0}
if(self.rail.drag)return self.cancelEvent(e);if(self.opt.oneaxismousemode=="auto"&&e.deltaX!=0)self.opt.oneaxismousemode=!1;if(self.opt.oneaxismousemode&&e.deltaX==0){if(!self.rail.scrollable){if(self.railh&&self.railh.scrollable){return self.onmousewheelhr(e)}else{return!0}}}
var nw=+(new Date());var chk=!1;if(self.opt.preservenativescrolling&&((self.checkarea+600)<nw)){self.nativescrollingarea=self.isScrollable(e);chk=!0}
self.checkarea=nw;if(self.nativescrollingarea)return!0;var ret=execScrollWheel(e,!1,chk);if(ret)self.checkarea=0;return ret};this.onmousewheelhr=function(e){if(self.locked||!self.railh.scrollable)return!0;if(self.rail.drag)return self.cancelEvent(e);var nw=+(new Date());var chk=!1;if(self.opt.preservenativescrolling&&((self.checkarea+600)<nw)){self.nativescrollingarea=self.isScrollable(e);chk=!0}
self.checkarea=nw;if(self.nativescrollingarea)return!0;if(self.locked)return self.cancelEvent(e);return execScrollWheel(e,!0,chk)};this.stop=function(){self.cancelScroll();if(self.scrollmon)self.scrollmon.stop();self.cursorfreezed=!1;self.scroll.y=Math.round(self.getScrollTop()*(1/self.scrollratio.y));self.noticeCursor();return self};this.getTransitionSpeed=function(dif){var sp=Math.round(self.opt.scrollspeed*10);var ex=Math.min(sp,Math.round((dif/20)*self.opt.scrollspeed));return(ex>20)?ex:0}
if(!self.opt.smoothscroll){this.doScrollLeft=function(x,spd){var y=self.getScrollTop();self.doScrollPos(x,y,spd)}
this.doScrollTop=function(y,spd){var x=self.getScrollLeft();self.doScrollPos(x,y,spd)}
this.doScrollPos=function(x,y,spd){var nx=(x>self.page.maxw)?self.page.maxw:x;if(nx<0)nx=0;var ny=(y>self.page.maxh)?self.page.maxh:y;if(ny<0)ny=0;self.synched('scroll',function(){self.setScrollTop(ny);self.setScrollLeft(nx)})}
this.cancelScroll=function(){}}else if(self.ishwscroll&&cap.hastransition&&self.opt.usetransition){this.prepareTransition=function(dif,istime){var ex=(istime)?((dif>20)?dif:0):self.getTransitionSpeed(dif);var trans=(ex)?cap.prefixstyle+'transform '+ex+'ms ease-out':'';if(!self.lasttransitionstyle||self.lasttransitionstyle!=trans){self.lasttransitionstyle=trans;self.doc.css(cap.transitionstyle,trans)}
return ex};this.doScrollLeft=function(x,spd){var y=(self.scrollrunning)?self.newscrolly:self.getScrollTop();self.doScrollPos(x,y,spd)}
this.doScrollTop=function(y,spd){var x=(self.scrollrunning)?self.newscrollx:self.getScrollLeft();self.doScrollPos(x,y,spd)}
this.doScrollPos=function(x,y,spd){var py=self.getScrollTop();var px=self.getScrollLeft();if(((self.newscrolly-py)*(y-py)<0)||((self.newscrollx-px)*(x-px)<0))self.cancelScroll();if(self.opt.bouncescroll==!1){if(y<0)y=0;else if(y>self.page.maxh)y=self.page.maxh;if(x<0)x=0;else if(x>self.page.maxw)x=self.page.maxw}
if(self.scrollrunning&&x==self.newscrollx&&y==self.newscrolly)return!1;self.newscrolly=y;self.newscrollx=x;self.newscrollspeed=spd||!1;if(self.timer)return!1;self.timer=setTimeout(function(){var top=self.getScrollTop();var lft=self.getScrollLeft();var dst={};dst.x=x-lft;dst.y=y-top;dst.px=lft;dst.py=top;var dd=Math.round(Math.sqrt(Math.pow(dst.x,2)+Math.pow(dst.y,2)));var ms=(self.newscrollspeed&&self.newscrollspeed>1)?self.newscrollspeed:self.getTransitionSpeed(dd);if(self.newscrollspeed&&self.newscrollspeed<=1)ms*=self.newscrollspeed;self.prepareTransition(ms,!0);if(self.timerscroll&&self.timerscroll.tm)clearInterval(self.timerscroll.tm);if(ms>0){if(!self.scrollrunning&&self.onscrollstart){var info={"type":"scrollstart","current":{"x":lft,"y":top},"request":{"x":x,"y":y},"end":{"x":self.newscrollx,"y":self.newscrolly},"speed":ms};self.onscrollstart.call(self,info)}
if(cap.transitionend){if(!self.scrollendtrapped){self.scrollendtrapped=!0;self.bind(self.doc,cap.transitionend,self.onScrollEnd,!1)}}else{if(self.scrollendtrapped)clearTimeout(self.scrollendtrapped);self.scrollendtrapped=setTimeout(self.onScrollEnd,ms)}
var py=top;var px=lft;self.timerscroll={bz:new BezierClass(py,self.newscrolly,ms,0,0,0.58,1),bh:new BezierClass(px,self.newscrollx,ms,0,0,0.58,1)};if(!self.cursorfreezed)self.timerscroll.tm=setInterval(function(){self.showCursor(self.getScrollTop(),self.getScrollLeft())},60)}
self.synched("doScroll-set",function(){self.timer=0;if(self.scrollendtrapped)self.scrollrunning=!0;self.setScrollTop(self.newscrolly);self.setScrollLeft(self.newscrollx);if(!self.scrollendtrapped)self.onScrollEnd()})},50)};this.cancelScroll=function(){if(!self.scrollendtrapped)return!0;var py=self.getScrollTop();var px=self.getScrollLeft();self.scrollrunning=!1;if(!cap.transitionend)clearTimeout(cap.transitionend);self.scrollendtrapped=!1;self._unbind(self.doc,cap.transitionend,self.onScrollEnd);self.prepareTransition(0);self.setScrollTop(py);if(self.railh)self.setScrollLeft(px);if(self.timerscroll&&self.timerscroll.tm)clearInterval(self.timerscroll.tm);self.timerscroll=!1;self.cursorfreezed=!1;self.showCursor(py,px);return self};this.onScrollEnd=function(){if(self.scrollendtrapped)self._unbind(self.doc,cap.transitionend,self.onScrollEnd);self.scrollendtrapped=!1;self.prepareTransition(0);if(self.timerscroll&&self.timerscroll.tm)clearInterval(self.timerscroll.tm);self.timerscroll=!1;var py=self.getScrollTop();var px=self.getScrollLeft();self.setScrollTop(py);if(self.railh)self.setScrollLeft(px);self.noticeCursor(!1,py,px);self.cursorfreezed=!1;if(py<0)py=0
else if(py>self.page.maxh)py=self.page.maxh;if(px<0)px=0
else if(px>self.page.maxw)px=self.page.maxw;if((py!=self.newscrolly)||(px!=self.newscrollx))return self.doScrollPos(px,py,self.opt.snapbackspeed);if(self.onscrollend&&self.scrollrunning){var info={"type":"scrollend","current":{"x":px,"y":py},"end":{"x":self.newscrollx,"y":self.newscrolly}};self.onscrollend.call(self,info)}
self.scrollrunning=!1}}else{this.doScrollLeft=function(x,spd){var y=(self.scrollrunning)?self.newscrolly:self.getScrollTop();self.doScrollPos(x,y,spd)}
this.doScrollTop=function(y,spd){var x=(self.scrollrunning)?self.newscrollx:self.getScrollLeft();self.doScrollPos(x,y,spd)}
this.doScrollPos=function(x,y,spd){var y=((typeof y=="undefined")||(y===!1))?self.getScrollTop(!0):y;if((self.timer)&&(self.newscrolly==y)&&(self.newscrollx==x))return!0;if(self.timer)clearAnimationFrame(self.timer);self.timer=0;var py=self.getScrollTop();var px=self.getScrollLeft();if(((self.newscrolly-py)*(y-py)<0)||((self.newscrollx-px)*(x-px)<0))self.cancelScroll();self.newscrolly=y;self.newscrollx=x;if(!self.bouncescroll||!self.rail.visibility){if(self.newscrolly<0){self.newscrolly=0}else if(self.newscrolly>self.page.maxh){self.newscrolly=self.page.maxh}}
if(!self.bouncescroll||!self.railh.visibility){if(self.newscrollx<0){self.newscrollx=0}else if(self.newscrollx>self.page.maxw){self.newscrollx=self.page.maxw}}
self.dst={};self.dst.x=x-px;self.dst.y=y-py;self.dst.px=px;self.dst.py=py;var dst=Math.round(Math.sqrt(Math.pow(self.dst.x,2)+Math.pow(self.dst.y,2)));self.dst.ax=self.dst.x/dst;self.dst.ay=self.dst.y/dst;var pa=0;var pe=dst;if(self.dst.x==0){pa=py;pe=y;self.dst.ay=1;self.dst.py=0}else if(self.dst.y==0){pa=px;pe=x;self.dst.ax=1;self.dst.px=0}
var ms=self.getTransitionSpeed(dst);if(spd&&spd<=1)ms*=spd;if(ms>0){self.bzscroll=(self.bzscroll)?self.bzscroll.update(pe,ms):new BezierClass(pa,pe,ms,0,1,0,1)}else{self.bzscroll=!1}
if(self.timer)return;if((py==self.page.maxh&&y>=self.page.maxh)||(px==self.page.maxw&&x>=self.page.maxw))self.checkContentSize();var sync=1;function scrolling(){if(self.cancelAnimationFrame)return!0;self.scrollrunning=!0;sync=1-sync;if(sync)return(self.timer=setAnimationFrame(scrolling)||1);var done=0;var sc=sy=self.getScrollTop();if(self.dst.ay){sc=(self.bzscroll)?self.dst.py+(self.bzscroll.getNow()*self.dst.ay):self.newscrolly;var dr=sc-sy;if((dr<0&&sc<self.newscrolly)||(dr>0&&sc>self.newscrolly))sc=self.newscrolly;self.setScrollTop(sc);if(sc==self.newscrolly)done=1}else{done=1}
var scx=sx=self.getScrollLeft();if(self.dst.ax){scx=(self.bzscroll)?self.dst.px+(self.bzscroll.getNow()*self.dst.ax):self.newscrollx;var dr=scx-sx;if((dr<0&&scx<self.newscrollx)||(dr>0&&scx>self.newscrollx))scx=self.newscrollx;self.setScrollLeft(scx);if(scx==self.newscrollx)done+=1}else{done+=1}
if(done==2){self.timer=0;self.cursorfreezed=!1;self.bzscroll=!1;self.scrollrunning=!1;if(sc<0)sc=0;else if(sc>self.page.maxh)sc=self.page.maxh;if(scx<0)scx=0;else if(scx>self.page.maxw)scx=self.page.maxw;if((scx!=self.newscrollx)||(sc!=self.newscrolly))self.doScrollPos(scx,sc);else{if(self.onscrollend){var info={"type":"scrollend","current":{"x":sx,"y":sy},"end":{"x":self.newscrollx,"y":self.newscrolly}};self.onscrollend.call(self,info)}}}else{self.timer=setAnimationFrame(scrolling)||1}};self.cancelAnimationFrame=!1;self.timer=1;if(self.onscrollstart&&!self.scrollrunning){var info={"type":"scrollstart","current":{"x":px,"y":py},"request":{"x":x,"y":y},"end":{"x":self.newscrollx,"y":self.newscrolly},"speed":ms};self.onscrollstart.call(self,info)}
scrolling();if((py==self.page.maxh&&y>=py)||(px==self.page.maxw&&x>=px))self.checkContentSize();self.noticeCursor()};this.cancelScroll=function(){if(self.timer)clearAnimationFrame(self.timer);self.timer=0;self.bzscroll=!1;self.scrollrunning=!1;return self}}
this.doScrollBy=function(stp,relative){var ny=0;if(relative){ny=Math.floor((self.scroll.y-stp)*self.scrollratio.y)}else{var sy=(self.timer)?self.newscrolly:self.getScrollTop(!0);ny=sy-stp}
if(self.bouncescroll){var haf=Math.round(self.view.h/2);if(ny<-haf)ny=-haf
else if(ny>(self.page.maxh+haf))ny=(self.page.maxh+haf)}
self.cursorfreezed=!1;py=self.getScrollTop(!0);if(ny<0&&py<=0)return self.noticeCursor();else if(ny>self.page.maxh&&py>=self.page.maxh){self.checkContentSize();return self.noticeCursor()}
self.doScrollTop(ny)};this.doScrollLeftBy=function(stp,relative){var nx=0;if(relative){nx=Math.floor((self.scroll.x-stp)*self.scrollratio.x)}else{var sx=(self.timer)?self.newscrollx:self.getScrollLeft(!0);nx=sx-stp}
if(self.bouncescroll){var haf=Math.round(self.view.w/2);if(nx<-haf)nx=-haf
else if(nx>(self.page.maxw+haf))nx=(self.page.maxw+haf)}
self.cursorfreezed=!1;px=self.getScrollLeft(!0);if(nx<0&&px<=0)return self.noticeCursor();else if(nx>self.page.maxw&&px>=self.page.maxw)return self.noticeCursor();self.doScrollLeft(nx)};this.doScrollTo=function(pos,relative){var ny=(relative)?Math.round(pos*self.scrollratio.y):pos;if(ny<0)ny=0
else if(ny>self.page.maxh)ny=self.page.maxh;self.cursorfreezed=!1;self.doScrollTop(pos)};this.checkContentSize=function(){var pg=self.getContentSize();if((pg.h!=self.page.h)||(pg.w!=self.page.w))self.resize(!1,pg)};self.onscroll=function(e){if(self.rail.drag)return;if(!self.cursorfreezed){self.synched('scroll',function(){self.scroll.y=Math.round(self.getScrollTop()*(1/self.scrollratio.y));if(self.railh)self.scroll.x=Math.round(self.getScrollLeft()*(1/self.scrollratio.x));self.noticeCursor()})}};self.bind(self.docscroll,"scroll",self.onscroll);this.doZoomIn=function(e){if(self.zoomactive)return;self.zoomactive=!0;self.zoomrestore={style:{}};var lst=['position','top','left','zIndex','backgroundColor','marginTop','marginBottom','marginLeft','marginRight'];var win=self.win[0].style;for(var a in lst){var pp=lst[a];self.zoomrestore.style[pp]=(typeof win[pp]!="undefined")?win[pp]:''}
self.zoomrestore.style.width=self.win.css('width');self.zoomrestore.style.height=self.win.css('height');self.zoomrestore.padding={w:self.win.outerWidth()-self.win.width(),h:self.win.outerHeight()-self.win.height()};if(cap.isios4){self.zoomrestore.scrollTop=$(window).scrollTop();$(window).scrollTop(0)}
self.win.css({"position":(cap.isios4)?"absolute":"fixed","top":0,"left":0,"z-index":globalmaxzindex+100,"margin":"0px"});var bkg=self.win.css("backgroundColor");if(bkg==""||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(bkg))self.win.css("backgroundColor","#fff");self.rail.css({"z-index":globalmaxzindex+101});self.zoom.css({"z-index":globalmaxzindex+102});self.zoom.css('backgroundPosition','0px -18px');self.resizeZoom();if(self.onzoomin)self.onzoomin.call(self);return self.cancelEvent(e)};this.doZoomOut=function(e){if(!self.zoomactive)return;self.zoomactive=!1;self.win.css("margin","");self.win.css(self.zoomrestore.style);if(cap.isios4){$(window).scrollTop(self.zoomrestore.scrollTop)}
self.rail.css({"z-index":self.zindex});self.zoom.css({"z-index":self.zindex});self.zoomrestore=!1;self.zoom.css('backgroundPosition','0px 0px');self.onResize();if(self.onzoomout)self.onzoomout.call(self);return self.cancelEvent(e)};this.doZoom=function(e){return(self.zoomactive)?self.doZoomOut(e):self.doZoomIn(e)};this.resizeZoom=function(){if(!self.zoomactive)return;var py=self.getScrollTop();self.win.css({width:$(window).width()-self.zoomrestore.padding.w+"px",height:$(window).height()-self.zoomrestore.padding.h+"px"});self.onResize();self.setScrollTop(Math.min(self.page.maxh,py))};this.init();$.nicescroll.push(this)};var ScrollMomentumClass2D=function(nc){var self=this;this.nc=nc;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(px,py){self.stop();var now=self.time();self.steptime=0;self.lasttime=now;self.speedx=0;self.speedy=0;self.lastx=px;self.lasty=py;self.lastscrollx=-1;self.lastscrolly=-1};this.update=function(px,py){var now=self.time();self.steptime=now-self.lasttime;self.lasttime=now;var dy=py-self.lasty;var dx=px-self.lastx;var sy=self.nc.getScrollTop();var sx=self.nc.getScrollLeft();var newy=sy+dy;var newx=sx+dx;self.snapx=(newx<0)||(newx>self.nc.page.maxw);self.snapy=(newy<0)||(newy>self.nc.page.maxh);self.speedx=dx;self.speedy=dy;self.lastx=px;self.lasty=py};this.stop=function(){self.nc.unsynched("domomentum2d");if(self.timer)clearTimeout(self.timer);self.timer=0;self.lastscrollx=-1;self.lastscrolly=-1};this.doSnapy=function(nx,ny){var snap=!1;if(ny<0){ny=0;snap=!0}else if(ny>self.nc.page.maxh){ny=self.nc.page.maxh;snap=!0}
if(nx<0){nx=0;snap=!0}else if(nx>self.nc.page.maxw){nx=self.nc.page.maxw;snap=!0}
if(snap)self.nc.doScrollPos(nx,ny,self.nc.opt.snapbackspeed)};this.doMomentum=function(gp){var t=self.time();var l=(gp)?t+gp:self.lasttime;var sl=self.nc.getScrollLeft();var st=self.nc.getScrollTop();var pageh=self.nc.page.maxh;var pagew=self.nc.page.maxw;self.speedx=(pagew>0)?Math.min(60,self.speedx):0;self.speedy=(pageh>0)?Math.min(60,self.speedy):0;var chk=l&&(t-l)<=60;if((st<0)||(st>pageh)||(sl<0)||(sl>pagew))chk=!1;var sy=(self.speedy&&chk)?self.speedy:!1;var sx=(self.speedx&&chk)?self.speedx:!1;if(sy||sx){var tm=Math.max(16,self.steptime);if(tm>50){var xm=tm/50;self.speedx*=xm;self.speedy*=xm;tm=50}
self.demulxy=0;self.lastscrollx=self.nc.getScrollLeft();self.chkx=self.lastscrollx;self.lastscrolly=self.nc.getScrollTop();self.chky=self.lastscrolly;var nx=self.lastscrollx;var ny=self.lastscrolly;var onscroll=function(){var df=((self.time()-t)>600)?0.04:0.02;if(self.speedx){nx=Math.floor(self.lastscrollx-(self.speedx*(1-self.demulxy)));self.lastscrollx=nx;if((nx<0)||(nx>pagew))df=0.10}
if(self.speedy){ny=Math.floor(self.lastscrolly-(self.speedy*(1-self.demulxy)));self.lastscrolly=ny;if((ny<0)||(ny>pageh))df=0.10}
self.demulxy=Math.min(1,self.demulxy+df);self.nc.synched("domomentum2d",function(){if(self.speedx){var scx=self.nc.getScrollLeft();if(scx!=self.chkx)self.stop();self.chkx=nx;self.nc.setScrollLeft(nx)}
if(self.speedy){var scy=self.nc.getScrollTop();if(scy!=self.chky)self.stop();self.chky=ny;self.nc.setScrollTop(ny)}
if(!self.timer){self.nc.hideCursor();self.doSnapy(nx,ny)}});if(self.demulxy<1){self.timer=setTimeout(onscroll,tm)}else{self.stop();self.nc.hideCursor();self.doSnapy(nx,ny)}};onscroll()}else{self.doSnapy(self.nc.getScrollLeft(),self.nc.getScrollTop())}}};var _scrollTop=jQuery.fn.scrollTop;jQuery.cssHooks.pageYOffset={get:function(elem,computed,extra){var nice=$.data(elem,'__nicescroll')||!1;return(nice&&nice.ishwscroll)?nice.getScrollTop():_scrollTop.call(elem)},set:function(elem,value){var nice=$.data(elem,'__nicescroll')||!1;(nice&&nice.ishwscroll)?nice.setScrollTop(parseInt(value)):_scrollTop.call(elem,value);return this}};jQuery.fn.scrollTop=function(value){if(typeof value=="undefined"){var nice=(this[0])?$.data(this[0],'__nicescroll')||!1:!1;return(nice&&nice.ishwscroll)?nice.getScrollTop():_scrollTop.call(this)}else{return this.each(function(){var nice=$.data(this,'__nicescroll')||!1;(nice&&nice.ishwscroll)?nice.setScrollTop(parseInt(value)):_scrollTop.call($(this),value)})}}
var _scrollLeft=jQuery.fn.scrollLeft;$.cssHooks.pageXOffset={get:function(elem,computed,extra){var nice=$.data(elem,'__nicescroll')||!1;return(nice&&nice.ishwscroll)?nice.getScrollLeft():_scrollLeft.call(elem)},set:function(elem,value){var nice=$.data(elem,'__nicescroll')||!1;(nice&&nice.ishwscroll)?nice.setScrollLeft(parseInt(value)):_scrollLeft.call(elem,value);return this}};jQuery.fn.scrollLeft=function(value){if(typeof value=="undefined"){var nice=(this[0])?$.data(this[0],'__nicescroll')||!1:!1;return(nice&&nice.ishwscroll)?nice.getScrollLeft():_scrollLeft.call(this)}else{return this.each(function(){var nice=$.data(this,'__nicescroll')||!1;(nice&&nice.ishwscroll)?nice.setScrollLeft(parseInt(value)):_scrollLeft.call($(this),value)})}}
var NiceScrollArray=function(doms){var self=this;this.length=0;this.name="nicescrollarray";this.each=function(fn){for(var a=0,i=0;a<self.length;a++)fn.call(self[a],i++);return self};this.push=function(nice){self[self.length]=nice;self.length++};this.eq=function(idx){return self[idx]};if(doms){for(a=0;a<doms.length;a++){var nice=$.data(doms[a],'__nicescroll')||!1;if(nice){this[this.length]=nice;this.length++}}}
return this};function mplex(el,lst,fn){for(var a=0;a<lst.length;a++)fn(el,lst[a]);};mplex(NiceScrollArray.prototype,['show','hide','toggle','onResize','resize','remove','stop','doScrollPos'],function(e,n){e[n]=function(){var args=arguments;return this.each(function(){this[n].apply(this,args)})}});jQuery.fn.getNiceScroll=function(index){if(typeof index=="undefined"){return new NiceScrollArray(this)}else{var nice=this[index]&&$.data(this[index],'__nicescroll')||!1;return nice}};jQuery.extend(jQuery.expr[':'],{nicescroll:function(a){return($.data(a,'__nicescroll'))?true:!1}});$.fn.niceScroll=function(wrapper,opt){if(typeof opt=="undefined"){if((typeof wrapper=="object")&&!("jquery" in wrapper)){opt=wrapper;wrapper=!1}}
var ret=new NiceScrollArray();if(typeof opt=="undefined")opt={};if(wrapper||!1){opt.doc=$(wrapper);opt.win=$(this)}
var docundef=!("doc" in opt);if(!docundef&&!("win" in opt))opt.win=$(this);this.each(function(){var nice=$(this).data('__nicescroll')||!1;if(!nice){opt.doc=(docundef)?$(this):opt.doc;nice=new NiceScrollClass(opt,$(this));$(this).data('__nicescroll',nice)}
ret.push(nice)});return(ret.length==1)?ret[0]:ret};window.NiceScroll={getjQuery:function(){return jQuery}};if(!$.nicescroll){$.nicescroll=new NiceScrollArray();$.nicescroll.options=_globaloptions}})(jQuery);
/*!
 * Retina.js v1.3.0
 *
 * Copyright 2014 Imulus, LLC
 * Released under the MIT license
 *
 * Retina.js is an open source script that makes it easy to serve
 * high-resolution images to devices with retina displays.
 */
(function(){var root=(typeof exports==='undefined'?window:exports);var config={retinaImageSuffix:'@2x',check_mime_type:!0,force_original_dimensions:!0};function Retina(){}
root.Retina=Retina;Retina.configure=function(options){if(options===null){options={}}
for(var prop in options){if(options.hasOwnProperty(prop)){config[prop]=options[prop]}}};Retina.init=function(context){if(context===null){context=root}
var existing_onload=context.onload||function(){};context.onload=function(){var images=document.getElementsByTagName('img'),retinaImages=[],i,image;for(i=0;i<images.length;i+=1){image=images[i];if(!!!image.getAttributeNode('data-no-retina')){retinaImages.push(new RetinaImage(image))}}
existing_onload()}};Retina.isRetina=function(){var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)';if(root.devicePixelRatio>1){return!0}
if(root.matchMedia&&root.matchMedia(mediaQuery).matches){return!0}
return!1};var regexMatch=/\.\w+$/;function suffixReplace(match){return config.retinaImageSuffix+match}
function RetinaImagePath(path,at_2x_path){this.path=path||'';if(typeof at_2x_path!=='undefined'&&at_2x_path!==null){this.at_2x_path=at_2x_path;this.perform_check=!1}else{if(undefined!==document.createElement){var locationObject=document.createElement('a');locationObject.href=this.path;locationObject.pathname=locationObject.pathname.replace(regexMatch,suffixReplace);this.at_2x_path=locationObject.href}else{var parts=this.path.split('?');parts[0]=parts[0].replace(regexMatch,suffixReplace);this.at_2x_path=parts.join('?')}
this.perform_check=!0}}
root.RetinaImagePath=RetinaImagePath;RetinaImagePath.confirmed_paths=[];RetinaImagePath.prototype.is_external=function(){return!!(this.path.match(/^https?\:/i)&&!this.path.match('//'+document.domain))};RetinaImagePath.prototype.check_2x_variant=function(callback){var http,that=this;if(this.is_external()){return callback(!1)}else if(!this.perform_check&&typeof this.at_2x_path!=='undefined'&&this.at_2x_path!==null){return callback(!0)}else if(this.at_2x_path in RetinaImagePath.confirmed_paths){return callback(!0)}else{http=new XMLHttpRequest();http.open('HEAD',this.at_2x_path);http.onreadystatechange=function(){if(http.readyState!==4){return callback(!1)}
if(http.status>=200&&http.status<=399){if(config.check_mime_type){var type=http.getResponseHeader('Content-Type');if(type===null||!type.match(/^image/i)){return callback(!1)}}
RetinaImagePath.confirmed_paths.push(that.at_2x_path);return callback(!0)}else{return callback(!1)}};http.send()}};function RetinaImage(el){this.el=el;this.path=new RetinaImagePath(this.el.getAttribute('src'),this.el.getAttribute('data-at2x'));var that=this;this.path.check_2x_variant(function(hasVariant){if(hasVariant){that.swap()}})}
root.RetinaImage=RetinaImage;RetinaImage.prototype.swap=function(path){if(typeof path==='undefined'){path=this.path.at_2x_path}
var that=this;function load(){if(!that.el.complete){setTimeout(load,5)}else{if(config.force_original_dimensions){that.el.setAttribute('width',that.el.offsetWidth);that.el.setAttribute('height',that.el.offsetHeight)}
that.el.setAttribute('src',path)}}
load()};if(Retina.isRetina()){Retina.init(root)}})();!function($){$.flexslider=function(e,t){var a=$(e);a.vars=$.extend({},$.flexslider.defaults,t);var n=a.vars.namespace,i=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||i||window.DocumentTouch&&document instanceof DocumentTouch)&&a.vars.touch,r="click touchend MSPointerUp keyup",o="",l,c="vertical"===a.vars.direction,d=a.vars.reverse,u=a.vars.itemWidth>0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),""!==a.vars.customDirectionNav&&(a.customDirectionNav=2===$(a.vars.customDirectionNav).length&&$(a.vars.customDirectionNav)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem<n?"next":"prev",a.flexAnimate(n,a.vars.pauseOnAction,!1,!0,!0))})})):a.slides.on(r,function(e){e.preventDefault();var t=$(this),i=t.index(),s=t.offset().left-$(a).scrollLeft();0>=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem<i?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){a.manualControls?m.controlNav.setupManual():m.controlNav.setupPaging()},setupPaging:function(){var e="thumbnails"===a.vars.controlNav?"control-thumbs":"control-paging",t=1,i,s;if(a.controlNavScaffold=$('<ol class="'+n+"control-nav "+n+e+'"></ol>'),a.pagingCount>1)for(var l=0;l<a.pagingCount;l++){if(s=a.slides.eq(l),i="thumbnails"===a.vars.controlNav?'<img src="'+s.attr("data-thumb")+'"/>':"<a>"+t+"</a>","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(i+='<span class="'+n+'caption">'+c+"</span>")}a.controlNavScaffold.append("<li>"+i+"</li>"),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("<li><a>"+a.count+"</a></li>")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('<ul class="'+n+'direction-nav"><li class="'+n+'nav-prev"><a class="'+n+'prev" href="#">'+a.vars.prevText+'</a></li><li class="'+n+'nav-next"><a class="'+n+'next" href="#">'+a.vars.nextText+"</a></li></ul>");a.customDirectionNav?a.directionNav=a.customDirectionNav:a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('<div class="'+n+'pauseplay"><a></a></div>');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,p=c?a.h:a.w,f=Number(new Date),l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p)}function n(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,m=w,y=c?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),t.detail===t.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){e._gesture.stop()}):void((!y||Number(new Date)-f>500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/p+2:1)),a.setProps(l+m,"setTouch"))))}}function s(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=d?-m:m,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>p/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,w=0}}var r,o,l,p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",t,!1),e._slider=a,e.addEventListener("MSGestureChange",n,!1),e.addEventListener("MSGestureEnd",s,!1)):(g=function(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),p=c?a.h:a.w,f=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p,r=c?b:x,o=c?x:b,e.addEventListener("touchmove",h,!1),e.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=c?r-b:r-x,y=c?Math.abs(m)<Math.abs(x-o):Math.abs(m)<Math.abs(b-o);var t=500;(!y||Number(new Date)-f>t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m/=0===a.currentSlide&&0>m||a.currentSlide===a.last&&m>0?Math.abs(m)/p+2:1),a.setProps(l+m,"setTouch")))},S=function(t){if(e.removeEventListener("touchmove",h,!1),a.animatingTo===a.currentSlide&&!y&&null!==m){var n=d?-m:m,i=a.getTarget(n>0?"next":"prev");a.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(n)>50||Math.abs(n)>p/2)?a.flexAnimate(i,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},e.addEventListener("touchstart",g,!1))},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(l),l=setTimeout(function(){o=""},3e3)}},a.flexAnimate=function(e,t,i,r,o){if(a.vars.animationLoop||e===a.currentSlide||(a.direction=e>a.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItem<e?"next":"prev"),!a.animating&&(a.canAdvance(e,o)||i)&&a.is(":visible")){if(p&&r){var l=$(a.vars.asNavFor).data("flexslider");if(a.atEnd=0===e||e===a.count-1,l.flexAnimate(e,!0,!1,!0,o),a.direction=a.currentItem<e?"next":"prev",l.direction=a.direction,Math.ceil((e+1)/a.visible)-1===a.currentSlide||0===e)return a.currentItem=e,a.slides.removeClass(n+"active-slide").eq(e).addClass(n+"active-slide"),!1;a.currentItem=e,a.slides.removeClass(n+"active-slide").eq(e).addClass(n+"active-slide"),e=Math.floor(e/a.visible)}if(a.animating=!0,a.animatingTo=e,t&&a.pause(),a.vars.before(a),a.syncExists&&!o&&m.sync("animate"),a.vars.controlNav&&m.controlNav.active(),u||a.slides.removeClass(n+"active-slide").eq(e).addClass(n+"active-slide"),a.atEnd=0===e||e===a.last,a.vars.directionNav&&m.directionNav.update(),e===a.last&&(a.vars.end(a),a.vars.animationLoop||a.pause()),v)s?(a.slides.eq(a.currentSlide).css({opacity:0,zIndex:1}),a.slides.eq(e).css({opacity:1,zIndex:2}),a.wrapup(f)):(a.slides.eq(a.currentSlide).css({zIndex:1}).animate({opacity:0},a.vars.animationSpeed,a.vars.easing),a.slides.eq(e).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing,a.wrapup));else{var f=c?a.slides.filter(":first").height():a.computedW,g,h,S;u?(g=a.vars.itemMargin,S=(a.itemW+g)*a.move*a.animatingTo,h=S>a.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('<div class="'+n+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxW<a.w?(a.w-t*(i-1))/i:a.vars.itemWidth>a.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.move<a.visible?a.vars.move:a.visible,a.pagingCount=Math.ceil((a.count-a.visible)/a.move+1),a.last=a.pagingCount-1,a.limit=1===a.pagingCount?0:a.vars.itemWidth>a.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(e<a.currentSlide?a.currentSlide+=1:e<=a.currentSlide&&0!==e&&(a.currentSlide-=1),a.animatingTo=a.currentSlide),a.vars.controlNav&&!a.manualControls&&("add"===t&&!u||a.pagingCount>a.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCount<a.controlNav.length)&&(u&&a.currentSlide>a.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.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,fadeFirstSlide:!0,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:"",customDirectionNav:"",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(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery);/*!
   --------------------------------
   Infinite Scroll
   --------------------------------
   + https://github.com/paulirish/infinite-scroll
   + version 2.1.0
   + Copyright 2011/12 Paul Irish & Luke Shumard
   + Licensed under the MIT license

   + Documentation: http://infinite-scroll.com/
*/
;(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e,t){"use strict";e.infinitescroll=function(n,r,i){this.element=e(i);if(!this._create(n,r)){this.failed=!0}};e.infinitescroll.defaults={loading:{finished:t,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"data:image/gif;base64,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",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:t},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:t,binder:e(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:t,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:t,path:t,prefill:!1,maxPage:t};e.infinitescroll.prototype={_binding:function(n){var r=this,i=r.options;i.v="2.0b2.120520";if(!!i.behavior&&this["_binding_"+i.behavior]!==t){this["_binding_"+i.behavior].call(this);return}if(n!=="bind"&&n!=="unbind"){this._debug("Binding value  "+n+" not valid");return!1}if(n==="unbind"){this.options.binder.unbind("smartscroll.infscr."+r.options.infid)}else{this.options.binder[n]("smartscroll.infscr."+r.options.infid,function(){r.scroll()})}this._debug("Binding",n)},_create:function(r,i){var s=e.extend(!0,{},e.infinitescroll.defaults,r);this.options=s;var o=e(window);var u=this;if(!u._validate(r)){return!1}var a=e(s.nextSelector).attr("href");if(!a){this._debug("Navigation selector not found");return!1}s.path=s.path||this._determinepath(a);s.contentSelector=s.contentSelector||this.element;s.loading.selector=s.loading.selector||s.contentSelector;s.loading.msg=s.loading.msg||e('<div id="infscr-loading"><img alt="Loading..." src="'+s.loading.img+'" /><div>'+s.loading.msgText+"</div></div>");(new Image).src=s.loading.img;if(s.pixelsFromNavToBottom===t){s.pixelsFromNavToBottom=e(document).height()-e(s.navSelector).offset().top;this._debug("pixelsFromNavToBottom: "+s.pixelsFromNavToBottom)}var f=this;s.loading.start=s.loading.start||function(){e(s.navSelector).hide();s.loading.msg.appendTo(s.loading.selector).show(s.loading.speed,e.proxy(function(){this.beginAjax(s)},f))};s.loading.finished=s.loading.finished||function(){if(!s.state.isBeyondMaxPage)s.loading.msg.fadeOut(s.loading.speed)};s.callback=function(n,r,u){if(!!s.behavior&&n["_callback_"+s.behavior]!==t){n["_callback_"+s.behavior].call(e(s.contentSelector)[0],r,u)}if(i){i.call(e(s.contentSelector)[0],r,s,u)}if(s.prefill){o.bind("resize.infinite-scroll",n._prefill)}};if(r.debug){if(Function.prototype.bind&&(typeof console==="object"||typeof console==="function")&&typeof console.log==="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.call(console[e],console)},Function.prototype.bind)}}this._setup();if(s.prefill){this._prefill()}return!0},_prefill:function(){function i(){return e(n.options.contentSelector).height()<=r.height()}var n=this;var r=e(window);this._prefill=function(){if(i()){n.scroll()}r.bind("resize.infinite-scroll",function(){if(i()){r.unbind("resize.infinite-scroll");n.scroll()}})};this._prefill()},_debug:function(){if(!0!==this.options.debug){return}if(typeof console!=="undefined"&&typeof console.log==="function"){if(Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]==="string"){console.log(Array.prototype.slice.call(arguments).toString())}else{console.log(Array.prototype.slice.call(arguments))}}else if(!Function.prototype.bind&&typeof console!=="undefined"&&typeof console.log==="object"){Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments))}},_determinepath:function(n){var r=this.options;if(!!r.behavior&&this["_determinepath_"+r.behavior]!==t){return this["_determinepath_"+r.behavior].call(this,n)}if(!!r.pathParse){this._debug("pathParse manual");return r.pathParse(n,this.options.state.currPage+1)}else if(n.match(/^(.*?)\b2\b(.*?$)/)){n=n.match(/^(.*?)\b2\b(.*?$)/).slice(1)}else if(n.match(/^(.*?)2(.*?$)/)){if(n.match(/^(.*?page=)2(\/.*|$)/)){n=n.match(/^(.*?page=)2(\/.*|$)/).slice(1);return n}n=n.match(/^(.*?)2(.*?$)/).slice(1)}else{if(n.match(/^(.*?page=)1(\/.*|$)/)){n=n.match(/^(.*?page=)1(\/.*|$)/).slice(1);return n}else{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.");r.state.isInvalidPage=!0}}this._debug("determinePath",n);return n},_error:function(n){var r=this.options;if(!!r.behavior&&this["_error_"+r.behavior]!==t){this["_error_"+r.behavior].call(this,n);return}if(n!=="destroy"&&n!=="end"){n="unknown"}this._debug("Error",n);if(n==="end"||r.state.isBeyondMaxPage){this._showdonemsg()}r.state.isDone=!0;r.state.currPage=1;r.state.isPaused=!1;r.state.isBeyondMaxPage=!1;this._binding("unbind")},_loadcallback:function(r,i,s){var o=this.options,u=this.options.callback,a=o.state.isDone?"done":!o.appendCallback?"no-append":"append",f;if(!!o.behavior&&this["_loadcallback_"+o.behavior]!==t){this["_loadcallback_"+o.behavior].call(this,r,i);return}switch(a){case"done":this._showdonemsg();return!1;case"no-append":if(o.dataType==="html"){i="<div>"+i+"</div>";i=e(i).find(o.itemSelector)}if(i.length===0){return this._error("end")}break;case"append":var l=r.children();if(l.length===0){return this._error("end")}f=document.createDocumentFragment();while(r[0].firstChild){f.appendChild(r[0].firstChild)}this._debug("contentSelector",e(o.contentSelector)[0]);e(o.contentSelector)[0].appendChild(f);i=l.get();break}o.loading.finished.call(e(o.contentSelector)[0],o);if(o.animate){var c=e(window).scrollTop()+e(o.loading.msg).height()+o.extraScrollPx+"px";e("html,body").animate({scrollTop:c},800,function(){o.state.isDuringAjax=!1})}if(!o.animate){o.state.isDuringAjax=!1}u(this,i,s);if(o.prefill){this._prefill()}},_nearbottom:function(){var r=this.options,i=0+e(document).height()-r.binder.scrollTop()-e(window).height();if(!!r.behavior&&this["_nearbottom_"+r.behavior]!==t){return this["_nearbottom_"+r.behavior].call(this)}this._debug("math:",i,r.pixelsFromNavToBottom);return i-r.bufferPx<r.pixelsFromNavToBottom},_pausing:function(n){var r=this.options;if(!!r.behavior&&this["_pausing_"+r.behavior]!==t){this["_pausing_"+r.behavior].call(this,n);return}if(n!=="pause"&&n!=="resume"&&n!==null){this._debug("Invalid argument. Toggling pause value instead")}n=n&&(n==="pause"||n==="resume")?n:"toggle";switch(n){case"pause":r.state.isPaused=!0;break;case"resume":r.state.isPaused=!1;break;case"toggle":r.state.isPaused=!r.state.isPaused;break}this._debug("Paused",r.state.isPaused);return!1},_setup:function(){var n=this.options;if(!!n.behavior&&this["_setup_"+n.behavior]!==t){this["_setup_"+n.behavior].call(this);return}this._binding("bind");return!1},_showdonemsg:function(){var r=this.options;if(!!r.behavior&&this["_showdonemsg_"+r.behavior]!==t){this["_showdonemsg_"+r.behavior].call(this);return}r.loading.msg.find("img").hide().parent().find("div").html(r.loading.finishedMsg).animate({opacity:1},2e3,function(){e(this).parent().fadeOut(r.loading.speed)});r.errorCallback.call(e(r.contentSelector)[0],"done")},_validate:function(n){for(var r in n){if(r.indexOf&&r.indexOf("Selector")>-1&&e(n[r]).length===0){this._debug("Your "+r+" found no elements.");return!1}}return!0},bind:function(){this._binding("bind")},destroy:function(){this.options.state.isDestroyed=!0;this.options.loading.finished();return this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(r){var i=this,s=r.path,o,u,a,f;r.state.currPage++;if(r.maxPage!==t&&r.state.currPage>r.maxPage){r.state.isBeyondMaxPage=!0;this.destroy();return}o=e(r.contentSelector).is("table, tbody")?e("<tbody/>"):e("<div/>");u=typeof s==="function"?s(r.state.currPage):s.join(r.state.currPage);i._debug("heading into ajax",u);a=r.dataType==="html"||r.dataType==="json"?r.dataType:"html+callback";if(r.appendCallback&&r.dataType==="html"){a+="+callback"}switch(a){case"html+callback":i._debug("Using HTML via .load() method");o.load(u+" "+r.itemSelector,t,function(t){i._loadcallback(o,t,u)});break;case"html":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");e.ajax({url:u,dataType:r.dataType,complete:function(t,n){f=typeof t.isResolved!=="undefined"?t.isResolved():n==="success"||n==="notmodified";if(f){i._loadcallback(o,t.responseText,u)}else{i._error("end")}}});break;case"json":i._debug("Using "+a.toUpperCase()+" via $.ajax() method");e.ajax({dataType:"json",type:"GET",url:u,success:function(e,n,s){f=typeof s.isResolved!=="undefined"?s.isResolved():n==="success"||n==="notmodified";if(r.appendCallback){if(r.template!==t){var a=r.template(e);o.append(a);if(f){i._loadcallback(o,a)}else{i._error("end")}}else{i._debug("template must be defined.");i._error("end")}}else{if(f){i._loadcallback(o,e,u)}else{i._error("end")}}},error:function(){i._debug("JSON ajax request failed.");i._error("end")}});break}},retrieve:function(r){r=r||null;var i=this,s=i.options;if(!!s.behavior&&this["retrieve_"+s.behavior]!==t){this["retrieve_"+s.behavior].call(this,r);return}if(s.state.isDestroyed){this._debug("Instance is destroyed");return!1}s.state.isDuringAjax=!0;s.loading.start.call(e(s.contentSelector)[0],s)},scroll:function(){var n=this.options,r=n.state;if(!!n.behavior&&this["scroll_"+n.behavior]!==t){this["scroll_"+n.behavior].call(this);return}if(r.isDuringAjax||r.isInvalidPage||r.isDone||r.isDestroyed||r.isPaused){return}if(!this._nearbottom()){return}this.retrieve()},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(n){if(e.isPlainObject(n)){this.options=e.extend(!0,this.options,n)}}};e.fn.infinitescroll=function(n,r){var i=typeof n;switch(i){case"string":var s=Array.prototype.slice.call(arguments,1);this.each(function(){var t=e.data(this,"infinitescroll");if(!t){return!1}if(!e.isFunction(t[n])||n.charAt(0)==="_"){return!1}t[n].apply(t,s)});break;case"object":this.each(function(){var t=e.data(this,"infinitescroll");if(t){t.update(n)}else{t=new e.infinitescroll(n,r,this);if(!t.failed){e.data(this,"infinitescroll",t)}}});break}return this};var n=e.event,r;n.special.smartscroll={setup:function(){e(this).bind("scroll",n.special.smartscroll.handler)},teardown:function(){e(this).unbind("scroll",n.special.smartscroll.handler)},handler:function(t,n){var i=this,s=arguments;t.type="smartscroll";if(r){clearTimeout(r)}r=setTimeout(function(){e(i).trigger("smartscroll",s)},n==="execAsap"?0:100)}};e.fn.smartscroll=function(e){return e?this.bind("smartscroll",e):this.trigger("smartscroll",["execAsap"])}});(function($){var jWindow=$(window);var elements=[];var elementsInView=[];var isSpying=!1;var ticks=0;var offset={top:0,right:0,bottom:0,left:0,}/**
	 * Find elements that are within the boundary
	 * @param {number} top
	 * @param {number} right
	 * @param {number} bottom
	 * @param {number} left
	 * @return {jQuery}		A collection of elements
	 */
	function findElements(top, right, bottom, left) {
		var hits = $();
		$.each(elements, function(i, element) {
			var elTop = element.offset().top,
				elLeft = element.offset().left,
				elRight = elLeft + element.width(),
				elBottom = elTop + element.height();

			var isIntersect = !(elLeft > right ||
				elRight < left ||
				elTop > bottom ||
				elBottom < top);

			if (isIntersect) {
				hits.push(element);
			}
		});

		return hits;
	}

	/**
	 * Called when the user scrolls the window
	 */
	function onScroll() {
		// unique tick id
		++ticks;

		// viewport rectangle
		var top = jWindow.scrollTop(),
			left = jWindow.scrollLeft(),
			right = left + jWindow.width(),
			bottom = top + jWindow.height();

		// determine which elements are in view
		var intersections = findElements(top+offset.top, right+offset.right, bottom+offset.bottom, left+offset.left);
		$.each(intersections, function(i, element) {
			var lastTick = element.data('scrollSpy:ticks');
			if (typeof lastTick != 'number') {
				// entered into view
				element.triggerHandler('scrollSpy:enter');
			}

			// update tick id
			element.data('scrollSpy:ticks', ticks);
		});

		// determine which elements are no longer in view
		$.each(elementsInView, function(i, element) {
			var lastTick = element.data('scrollSpy:ticks');
			if (typeof lastTick == 'number' && lastTick !== ticks) {
				// exited from view
				element.triggerHandler('scrollSpy:exit');
				element.data('scrollSpy:ticks', null);
			}
		});

		// remember elements in view for next tick
		elementsInView = intersections;
	}

	/**
	 * Called when window is resized
	*/
	function onWinSize() {
		jWindow.trigger('scrollSpy:winSize');
	}

	/**
	 * Get time in ms
   * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
	 * @type {function}
	 * @return {number}
	 */
var getTime=(Date.now||function(){return new Date().getTime()});/**
	 * Returns a function, that, when invoked, will only be triggered at most once
	 * during a given window of time. Normally, the throttled function will run
	 * as much as it can, without ever going more than once per `wait` duration;
	 * but if you'd like to disable the execution on the leading edge, pass
	 * `{leading: false}`. To disable execution on the trailing edge, ditto.
	 * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
	 * @param {function} func
	 * @param {number} wait
	 * @param {Object=} options
	 * @returns {Function}
	 */
function throttle(func,wait,options){var context,args,result;var timeout=null;var previous=0;options||(options={});var later=function(){previous=options.leading===!1?0:getTime();timeout=null;result=func.apply(context,args);context=args=null};return function(){var now=getTime();if(!previous&&options.leading===!1)previous=now;var remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0){clearTimeout(timeout);timeout=null;previous=now;result=func.apply(context,args);context=args=null}else if(!timeout&&options.trailing!==!1){timeout=setTimeout(later,remaining)}
return result}};$.scrollSpy=function(selector,options){selector=$(selector);selector.each(function(i,element){elements.push($(element))});options=options||{throttle:100};offset.top=options.offsetTop||0;offset.right=options.offsetRight||0;offset.bottom=options.offsetBottom||0;offset.left=options.offsetLeft||0;var throttledScroll=throttle(onScroll,options.throttle||100);var readyScroll=function(){$(document).ready(throttledScroll)};if(!isSpying){jWindow.on('scroll',readyScroll);jWindow.on('resize',readyScroll);isSpying=!0}
setTimeout(readyScroll,0);return selector};$.winSizeSpy=function(options){$.winSizeSpy=function(){return jWindow};options=options||{throttle:100};return jWindow.on('resize',throttle(onWinSize,options.throttle||100))};$.fn.scrollSpy=function(options){return $.scrollSpy($(this),options)}})(jQuery);(function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()})(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s=e.sessionStorage,s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window)
jQuery(document).ready(function($){var content_container='div#post-left-col';var nav_container='nav.post-navigation';var post_title_selector='h1.post-title';var curr_url=window.location.href;$(content_container).prepend('<hr style="height: 0" class="post-divider" data-title="'+window.document.title+'" data-url="'+window.location.href+'"/>');initialise_Scrollspy();initialise_history();$.ajaxSetup({cache:!1});function init(){$('.post-gallery-bot').flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!1,itemWidth:80,itemMargin:10,asNavFor:'.post-gallery-top'});$('.post-gallery-top').flexslider({animation:"fade",controlNav:!1,animationLoop:!0,slideshow:!1,prevText:"&lt;",nextText:"&gt;",sync:".post-gallery-bot"})}
function initialise_history(){History.Adapter.bind(window,'statechange',function(){var State=History.getState();if(State.url!=curr_url){window.location.reload(State.url)}})}
function initialise_Scrollspy(){$('.post-divider').on('scrollSpy:exit',changeURL);$('.post-divider').on('scrollSpy:enter',changeURL);$('.post-divider').scrollSpy()}
function changeURL(){var el=$(this);var this_url=el.attr('data-url');var this_title=el.attr('data-title');var offset=el.offset();var scrollTop=$(window).scrollTop();if((offset.top-scrollTop)<150){curr_url=this_url;History.pushState(null,null,this_url);window.document.title=this_title;update_google_analytics()}
doAutoLoad()}
function update_google_analytics(){if(typeof _gaq!=='undefined'){_gaq.push(['_trackPageview',window.location.pathname])}
if(typeof ga!=='undefined'){ga('send','pageview',window.location.pathname)}}
function doAutoLoad(){var post_url=$('a[rel="prev"]').attr('href');if(!post_url)return;if(post_url.indexOf('?p=')>-1){np_url=post_url+'&partial=1'}else{np_url=post_url+'/partial'}
$(nav_container).remove();$.get(np_url,function(data){var $post_html=$('<hr class="post-divider" data-url="'+post_url+'"/>'+data);var $title=$post_html.find(post_title_selector);$(content_container).append($post_html);$('hr[data-url="'+post_url+'"]').attr('data-title',$title.text());initialise_Scrollspy()});init()}});/*! This file is auto-generated */
!function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c<n.length;c++)n[c].style.display="none";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute("style"),"height"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if("link"===t.message)if(i=l.createElement("a"),a=l.createElement("a"),i.href=r.getAttribute("src"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf("MSIE 10"),i=!!navigator.userAgent.match(/Trident.*rv:11\./),a=l.querySelectorAll("iframe.wp-embedded-content"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute("data-secret"))t=Math.random().toString(36).substr(2,10),e.src+="#?secret="+t,e.setAttribute("data-secret",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute("security"),e.parentNode.replaceChild(t,e)}}}}(window,document);(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})(window,document,"script","https://mc.yandex.ru/metrika/tag.js","ym");ym(21243064,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0})