!function(s){s.slidebars=function(t){var e,i=s.extend({siteClose:!0,scrollLock:!1,disableOver:!1,hideControlClasses:!1},t),a=document.createElement("div").style,n=!1,l=!1;(""===a.MozTransition||""===a.WebkitTransition||""===a.OTransition||""===a.transition)&&(n=!0),(""===a.MozTransform||""===a.WebkitTransform||""===a.OTransform||""===a.transform)&&(l=!0);var o=navigator.userAgent,r=!1,c=!1;/Android/.test(o)?r=o.substr(o.indexOf("Android")+8,3):/(iPhone|iPod|iPad)/.test(o)&&(c=o.substr(o.indexOf("OS ")+3,3).replace("_",".")),(r&&r<3||c&&c<5)&&s("html").addClass("sb-static");var h=s("#sb-site, .sb-site-container");if(s(".sb-left").length)var d=s(".sb-left"),f=!1;if(s(".sb-right").length)var b=s(".sb-right"),u=!1;var v=!1,g=s(window).width(),m=s(".sb-toggle-left, .sb-toggle-right, .sb-open-left, .sb-open-right, .sb-close"),$=s(".sb-slide");function C(){!i.disableOver||"number"==typeof i.disableOver&&i.disableOver>=g?(v=!0,s("html").addClass("sb-init"),i.hideControlClasses&&m.removeClass("sb-hide"),p()):"number"==typeof i.disableOver&&i.disableOver<g&&(v=!1,s("html").removeClass("sb-init"),i.hideControlClasses&&m.addClass("sb-hide"),h.css("minHeight",""),(f||u)&&k())}function p(){h.css("minHeight","");var t=parseInt(h.css("height"),10),e=parseInt(s("html").css("height"),10);t<e&&h.css("minHeight",s("html").css("height")),d&&d.hasClass("sb-width-custom")&&d.css("width",d.attr("data-sb-width")),b&&b.hasClass("sb-width-custom")&&b.css("width",b.attr("data-sb-width")),d&&(d.hasClass("sb-style-push")||d.hasClass("sb-style-overlay"))&&d.css("marginLeft","-"+d.css("width")),b&&(b.hasClass("sb-style-push")||b.hasClass("sb-style-overlay"))&&b.css("marginRight","-"+b.css("width")),i.scrollLock&&s("html").addClass("sb-scroll-lock")}function _(s,t,i){var a;if(a=s.hasClass("sb-style-push")?h.add(s).add($):s.hasClass("sb-style-overlay")?s:h.add($),"translate"===e)"0px"===t?l():a.css("transform","translate( "+t+" )");else if("side"===e)"0px"===t?l():("-"===t[0]&&(t=t.substr(1)),a.css(i,"0px"),setTimeout(function(){a.css(i,t)},1));else if("jQuery"===e){"-"===t[0]&&(t=t.substr(1));var n={};n[i]=t,a.stop().animate(n,400)}function l(){a.removeAttr("style"),p()}}function y(t){"left"===t&&d&&u||"right"===t&&b&&f?(k(),setTimeout(e,400)):e();function e(){v&&"left"===t&&d?(s("html").addClass("sb-active sb-active-left"),d.addClass("sb-active"),_(d,d.css("width"),"left"),setTimeout(function(){f=!0},400)):v&&"right"===t&&b&&(s("html").addClass("sb-active sb-active-right"),b.addClass("sb-active"),_(b,"-"+b.css("width"),"right"),setTimeout(function(){u=!0},400))}}function k(t,e){(f||u)&&(f&&(_(d,"0px","left"),f=!1),u&&(_(b,"0px","right"),u=!1),setTimeout(function(){s("html").removeClass("sb-active sb-active-left sb-active-right"),d&&d.removeClass("sb-active"),b&&b.removeClass("sb-active"),void 0!==t&&window.open(t,e)},400))}function w(s){"left"===s&&d&&(f?k():y("left")),"right"===s&&b&&(u?k():y("right"))}function O(s,t){s.stopPropagation(),s.preventDefault(),"touchend"===s.type&&t.off("click")}C(),s(window).resize(function(){var t=s(window).width();g!==t&&(g=t,C(),f&&y("left"),u&&y("right"))}),n&&l?(e="translate",r&&r<4.4&&(e="side")):e="jQuery",this.slidebars={open:y,close:k,toggle:w,init:function(){return v},active:function(s){return"left"===s&&d?f:"right"===s&&b?u:void 0},destroy:function(s){"left"===s&&d&&(f&&k(),setTimeout(function(){d.remove(),d=!1},400)),"right"===s&&b&&(u&&k(),setTimeout(function(){b.remove(),b=!1},400))}},s(".sb-toggle-left").on("touchend click",function(t){O(t,s(this)),w("left")}),s(".sb-toggle-right").on("touchend click",function(t){O(t,s(this)),w("right")}),s(".sb-open-left").on("touchend click",function(t){O(t,s(this)),y("left")}),s(".sb-open-right").on("touchend click",function(t){O(t,s(this)),y("right")}),s(".sb-close, .overlay").on("touchend click",function(t){if(s(this).is("a")||s(this).children().is("a")){if("click"===t.type){t.stopPropagation(),t.preventDefault();var e,i=s(this).is("a")?s(this):s(this).find("a");k(i.attr("href"),i.attr("target")?i.attr("target"):"_self")}}else O(t,s(this)),k()}),h.on("touchend click",function(t){i.siteClose&&(f||u)&&(O(t,s(this)),k())})}}(jQuery);