Difference between revisions of "Team:Valencia UPV/Templates:customJS"

(Undo revision 235525 by Jopegar (talk))
 
Line 1: Line 1:
window.width = jQuery(window).width();
+
function Init(t){1!=t&&(_afterResize(),_slider_full(),_topNav(),_megaNavHorizontal(),_sideNav(),_stickyFooter()),_toggle(),_modalAutoLoad(),jQuery("a[data-toggle=tooltip], button[data-toggle=tooltip], span[data-toggle=tooltip]").tooltip()}function _afterResize(){jQuery(window).on("load",function(){"use strict";jQuery(window).resize(function(){window.afterResizeApp&&clearTimeout(window.afterResizeApp),window.afterResizeApp=setTimeout(function(){_slider_full(),window.width=jQuery(window).width(),window.height=jQuery(window).height(),jQuery(".flexslider").length>0&&jQuery(".flexslider").resize()},300)})})}function loadScript(t,e){if(_arr[t])e&&e();else{_arr[t]=!0;var i=document.getElementsByTagName("body")[0],n=document.createElement("script");n.type="text/javascript",n.src=t,n.onload=e,i.appendChild(n)}}function _slider_full(){_headerHeight=0,jQuery("#header").hasClass("transparent")||jQuery("#header").hasClass("translucent")?_headerHeight=0:(_headerHeight=jQuery("#header").outerHeight()||0,jQuery("#topBar").length>0&&(_topBarHeight=jQuery("#topBar").outerHeight()||0,_headerHeight+=_topBarHeight)),_screenHeight=jQuery(window).height()-_headerHeight,jQuery("#header").hasClass("static")&&(_screenHeight=jQuery(window).height()),jQuery("#slider").hasClass("halfheight")&&jQuery("#slider.halfheight").height(_screenHeight/2),jQuery("#slider").hasClass("thirdheight")&&jQuery("#slider.thirdheight").height(_screenHeight/1.5),jQuery("#slider").hasClass("fullheight")&&(jQuery("#slider.fullheight").height(_screenHeight),jQuery("#slider.fullheight-min").css({"min-height":_screenHeight+"px"})),window.width<960&&jQuery("#slider.mobile-fullheight").height(_screenHeight)}function _topNav(){function t(){(o=jQuery(document).scrollTop())>100?jQuery("#toTop").is(":hidden")&&jQuery("#toTop").show():jQuery("#toTop").is(":visible")&&jQuery("#toTop").hide()}function e(){jQuery("#sidepanel_overlay").unbind(),jQuery("#sidepanel_overlay").bind("click",function(){jQuery("a#sidepanel_btn").trigger("click")})}window.scrollTop=0,window._cmScroll=0;var i=jQuery("#header");jQuery(window).scroll(function(){t()});var n=!1;if(jQuery("#topMain a.dropdown-toggle").bind("click",function(t){"#"==jQuery(this).attr("href")&&t.preventDefault(),n=jQuery(this).parent().hasClass("resp-active"),jQuery("#topMain").find(".resp-active").removeClass("resp-active"),n||jQuery(this).parents("li").addClass("resp-active")}),jQuery("li.search i.fa").click(function(){jQuery("#header .search-box").is(":visible")?jQuery("#header .search-box").fadeOut(300):(jQuery(".search-box").fadeIn(300),jQuery("#header .search-box form input").focus(),jQuery("#header li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("#header li.quick-cart div.quick-cart-box").fadeOut(300))}),0!=jQuery("#header li.search i.fa").size()&&(jQuery("#header .search-box, #header li.search i.fa").on("click",function(t){t.stopPropagation()}),jQuery("body").on("click",function(){jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(300)})),jQuery(document).bind("click",function(){jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(300)}),jQuery("#closeSearch").bind("click",function(t){t.preventDefault(),jQuery("#header .search-box").fadeOut(300)}),jQuery("button#page-menu-mobile").bind("click",function(){jQuery(this).next("ul").slideToggle(150)}),jQuery("li.quick-cart>a").click(function(t){t.preventDefault();var e=jQuery("li.quick-cart div.quick-cart-box");e.is(":visible")?e.fadeOut(300):(e.fadeIn(300),jQuery("li.search .search-box").is(":visible")&&jQuery(".search-box").fadeOut(300))}),0!=jQuery("li.quick-cart>a").size()&&(jQuery("li.quick-cart").on("click",function(t){t.stopPropagation()}),jQuery("body").on("click",function(){jQuery("li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("li.quick-cart div.quick-cart-box").fadeOut(300)})),jQuery("#page-menu ul.menu-scrollTo>li").bind("click",function(t){var e=jQuery("a",this).attr("href");jQuery("a",this).hasClass("external")||(t.preventDefault(),jQuery("#page-menu ul.menu-scrollTo>li").removeClass("active"),jQuery(this).addClass("active"),jQuery(e).length>0&&(_padding_top=0,jQuery("#header").hasClass("sticky")&&(_padding_top=jQuery(e).css("padding-top"),_padding_top=_padding_top.replace("px","")),jQuery("html,body").animate({scrollTop:jQuery(e).offset().top-_padding_top},800,"easeInOutExpo")))}),window.currentScroll=0,jQuery("button.btn-mobile").bind("click",function(t){t.preventDefault(),jQuery(this).toggleClass("btn-mobile-active"),jQuery("html").removeClass("noscroll"),jQuery("#menu-overlay").remove(),jQuery("#topNav div.nav-main-collapse").hide(0),jQuery(this).hasClass("btn-mobile-active")?(jQuery("#topNav div.nav-main-collapse").show(0),jQuery("html").addClass("noscroll"),jQuery("body").append('<div id="menu-overlay"></div>'),window.currentScroll=jQuery(window).scrollTop()):jQuery("html,body").animate({scrollTop:currentScroll},300,"easeInOutExpo")}),i.hasClass("bottom"))i.addClass("dropup"),window.homeHeight=jQuery(window).outerHeight()-55,i.hasClass("sticky")&&(window.isOnTop=!0,jQuery(window).scroll(function(){jQuery(document).scrollTop()>window.homeHeight/2?i.removeClass("dropup"):i.addClass("dropup")}),jQuery(window).scroll(function(){jQuery(document).scrollTop()>window.homeHeight?!0===window.isOnTop&&(jQuery("#header").addClass("fixed"),i.removeClass("dropup"),window.isOnTop=!1):!1===window.isOnTop&&(jQuery("#header").removeClass("fixed"),i.addClass("dropup"),window.isOnTop=!0)}),jQuery(window).resize(function(){window.homeHeight=jQuery(window).outerHeight()}));else if(i.hasClass("sticky")){if(_topBar_H=jQuery("#topBar").outerHeight()||0,window.width<=992&&_topBar_H<1){o=jQuery(document).scrollTop();_header_H=i.outerHeight()||0,i.addClass("fixed"),jQuery("body").css({"padding-top":_header_H+"px"})}jQuery(window).scroll(function(){if(window.width>992&&_topBar_H<1||_topBar_H>0){var t=jQuery(document).scrollTop();t>_topBar_H?(i.addClass("fixed"),_header_H=i.outerHeight()||0,i.hasClass("transparent")||i.hasClass("translucent")||jQuery("body").css({"padding-top":_header_H+"px"})):(i.hasClass("transparent")||i.hasClass("translucent")||jQuery("body").css({"padding-top":"0px"}),i.removeClass("fixed"))}if(i.hasClass("transparent")){var e=jQuery("#topNav div.nav-main-collapse"),n=e.attr("data-switch-default")||"",o=e.attr("data-switch-scroll")||"";""==n&&""==o||(t>0?window._cmScroll<1&&(e.removeClass(n,o).addClass(o),window._cmScroll=1):t<1&&(e.removeClass(n,o).addClass(n),window._cmScroll=0))}})}else if(i.hasClass("static")&&i.hasClass("transparent")){if(_topBar_H=jQuery("#topBar").outerHeight()||0,window.width<=992&&_topBar_H<1){var o=jQuery(document).scrollTop();_header_H=i.outerHeight()||0,i.addClass("fixed")}jQuery(window).scroll(function(){(window.width>992&&_topBar_H<1||_topBar_H>0)&&(jQuery(document).scrollTop()>_topBar_H?(i.addClass("fixed"),_header_H=i.outerHeight()||0):i.removeClass("fixed"))})}else i.hasClass("static");if(jQuery("#slidetop a.slidetop-toggle").bind("click",function(){jQuery("#slidetop .container").slideToggle(150,function(){jQuery("#slidetop .container").is(":hidden")?jQuery("#slidetop").removeClass("active"):jQuery("#slidetop").addClass("active")})}),jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#slidetop").hasClass("active")&&jQuery("#slidetop .container").slideToggle(150,function(){jQuery("#slidetop").removeClass("active")})}),jQuery("a#sidepanel_btn").bind("click",function(t){t.preventDefault(),r="right",jQuery("#sidepanel").hasClass("sidepanel-inverse")&&(r="left"),jQuery("#sidepanel").is(":hidden")?(jQuery("body").append('<span id="sidepanel_overlay"></span>'),"left"==r?jQuery("#sidepanel").stop().show().animate({left:"0px"},150):jQuery("#sidepanel").stop().show().animate({right:"0px"},150)):(jQuery("#sidepanel_overlay").remove(),"left"==r?jQuery("#sidepanel").stop().animate({left:"-300px"},300):jQuery("#sidepanel").stop().animate({right:"-300px"},300),setTimeout(function(){jQuery("#sidepanel").hide()},500)),e()}),jQuery("#sidepanel_close").bind("click",function(t){t.preventDefault(),jQuery("a#sidepanel_btn").trigger("click")}),jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#sidepanel").is(":visible")&&jQuery("a#sidepanel_btn").trigger("click")}),jQuery("#sidebar_vertical_btn").length>0&&jQuery("body").hasClass("menu-vertical-hide")){if(_paddingStatusL=jQuery("#mainMenu.sidebar-vertical").css("left"),_paddingStatusR=jQuery("#mainMenu.sidebar-vertical").css("right"),parseInt(_paddingStatusL)<0)r="left";else if(parseInt(_paddingStatusR)<0)r="right";else var r="left";jQuery("#sidebar_vertical_btn").bind("click",function(t){_paddingStatus=jQuery("#mainMenu.sidebar-vertical").css(r),parseInt(_paddingStatus)<0?"right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"0px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"0px"},200):"right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"-263px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"-263px"},200)}),jQuery(window).scroll(function(){_paddingStatus=parseInt(jQuery("#mainMenu.sidebar-vertical").css(r)),_paddingStatus>=0&&("right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"-263px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"-263px"},200))})}jQuery("#topBar").length>0&&jQuery("#topNav ul").addClass("has-topBar"),jQuery(window).scroll(function(){window.width<769&&(jQuery("#header li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("#header li.quick-cart div.quick-cart-box").fadeOut(0),jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(0))})}function _megaNavHorizontal(){function t(){jQuery("#main-nav-overlay").remove(),jQuery("#header nav.main-nav").addClass("min-nav-active"),jQuery("body").append('<div id="main-nav-overlay"></div>'),jQuery("#header button.nav-toggle-close").bind("click",function(){jQuery("#header nav.main-nav").removeClass("min-nav-active")}),jQuery("#main-nav-overlay, #header").mouseover(function(){e()})}function e(){jQuery("#main-nav-overlay").remove(),jQuery("#header nav.main-nav").removeClass("min-nav-active")}if(jQuery("#wrapper nav.main-nav").length>0){var i=jQuery("#slider").width(),n=jQuery("#wrapper nav.main-nav").height();jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":n+"px"}),jQuery("#wrapper nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({width:i+"px"}),jQuery("#wrapper nav.main-nav>div>ul>li").bind("click",function(t){var e=jQuery(this);jQuery("div",e).hasClass("main-nav-open")||jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").removeClass("main-nav-open"),jQuery("div",e).toggleClass("main-nav-open")})}var o=jQuery("#header>.container").width()-278,r=jQuery("#header nav.main-nav").height();jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":r+"px"}),jQuery("#header nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({width:o+"px"}),jQuery("#header nav.main-nav>div>ul>li").bind("click",function(t){var e=jQuery(this);jQuery("div",e).hasClass("main-nav-open")||jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").removeClass("main-nav-open"),jQuery("div",e).toggleClass("main-nav-open")}),window.width>767?jQuery("#header button.nav-toggle").mouseover(function(e){e.preventDefault(),t()}):jQuery("#header button.nav-toggle").bind("click",function(e){e.preventDefault(),t()}),jQuery("body").on("click","#header button.nav-toggle, #header nav.main-nav",function(t){t.stopPropagation()}),jQuery("#header button.nav-toggle, #header nav.main-nav").mouseover(function(t){t.stopPropagation()}),jQuery(document).bind("click",function(){e()}),jQuery("nav.main-nav>div>ul>li a").bind("click",function(t){"#"==jQuery(this).attr("href")&&t.preventDefault()})}function _sideNav(){jQuery("div.side-nav").each(function(){var t=jQuery("ul",this);jQuery("button",this).bind("click",function(){t.slideToggle(300)})}),jQuery("div.side-nav>ul>li>a.dropdown-toggle").bind("click",function(t){t.preventDefault(),jQuery(this).next("ul").slideToggle(200),jQuery(this).closest("li").toggleClass("active")})}function _stickyFooter(){function t(){e=n.height(),i=jQuery(window).scrollTop()+jQuery(window).height()-e+"px",jQuery(document.body).height()+e>jQuery(window).height()?n.css({position:"absolute"}).stop().animate({top:i},0):n.css({position:"static"})}if(jQuery("#footer").hasClass("sticky")){var e=0,i=0,n=jQuery("#footer.sticky");t(),jQuery(window).scroll(t).resize(t)}}function _toggle(){jQuery("div.toggle.active > p").addClass("preview-active"),jQuery("div.toggle.active > div.toggle-content").slideDown(400),jQuery("div.toggle > label").click(function(t){var e=jQuery(this).parent(),i=jQuery(this).parents("div.toggle"),n=!1;if(i.hasClass("toggle-accordion")&&void 0!==t.originalEvent&&i.find("div.toggle.active > label").trigger("click"),e.toggleClass("active"),e.find("> p").get(0)){var o=(n=e.find("> p")).css("height"),r=n.css("height");n.css("height","auto"),n.css("height",o)}var a=e.find("> div.toggle-content");e.hasClass("active")?(jQuery(n).animate({height:r},350,function(){jQuery(this).addClass("preview-active")}),a.slideDown(350)):(jQuery(n).animate({height:25},350,function(){jQuery(this).removeClass("preview-active")}),a.slideUp(350))})}function _modalAutoLoad(){jQuery("div.modal").length>0&&jQuery("div.modal").each(function(){var t=jQuery(this),e=t.attr("id"),i=t.attr("data-autoload")||!1;""!=e&&"hidden"==localStorage.getItem(e)&&(i="false"),"true"==i&&jQuery(window).on("load",function(){var e=t.attr("data-autoload-delay")||1e3;setTimeout(function(){t.modal("toggle")},parseInt(e))}),jQuery("input.loadModalHide",this).bind("click",function(){jQuery(this).is(":checked")?(localStorage.setItem(e,"hidden"),console.log("[Modal Autoload #"+e+"] Added to localStorage")):(localStorage.removeItem(e),console.log("[Modal Autoload #"+e+"] Removed from localStorage"))})})}function _lightbox(){var t=jQuery(".lightbox");t.length>0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:magnificPopupMinJS?action=raw&ctype=text/javascript",function(){if(void 0===jQuery.magnificPopup)return!1;jQuery.extend(!0,jQuery.magnificPopup.defaults,{tClose:"Close",tLoading:"Loading...",gallery:{tPrev:"Previous",tNext:"Next",tCounter:"%curr% / %total%"},image:{tError:"Image not loaded!"},ajax:{tError:"Content not loaded!"}}),t.each(function(){var t=jQuery(this),e=t.attr("data-plugin-options"),i={},n={type:"image",fixedContentPos:!1,fixedBgPos:!1,mainClass:"mfp-no-margins mfp-with-zoom",closeOnContentClick:!0,closeOnBgClick:!0,image:{verticalFit:!0},zoom:{enabled:!1,duration:300},gallery:{enabled:!1,navigateByImgClick:!0,preload:[0,1],arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',tPrev:"Previous",tNext:"Next",tCounter:'<span class="mfp-counter">%curr% / %total%</span>'}};t.data("plugin-options")&&(i=jQuery.extend({},n,e,t.data("plugin-options"))),jQuery(this).magnificPopup(i)})})}function _widget_flickr(){var t=jQuery(".widget-flickr");t.length>0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:jflickrfeedMinJS?action=raw&ctype=text/javascript",function(){jQuery().jflickrfeed&&jQuery(".widget-flickr")&&t.each(function(){var t=jQuery(this),e=t.attr("data-id"),i=t.attr("data-limit")||14;t.jflickrfeed({limit:parseInt(i),qstrings:{id:e},itemTemplate:'<li><a href="{{image}}" title="{{title}}"><img src="{{image_s}}" alt="{{title}}" width="63" height="63" /></a></li>'},function(t){_lightbox()})})})}function wheel(t){t.preventDefault()}function disable_scroll(){window.addEventListener&&window.addEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=wheel}function enable_scroll(){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=document.onkeydown=null}function enable_overlay(){jQuery("span.global-overlay").remove(),jQuery("body").append('<span class="global-overlay"></span>')}function disable_overlay(){jQuery("span.global-overlay").remove()}function _loadTetherBS4(){!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=t.getBoundingClientRect(),i={};for(var n in e)i[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var a=o(r);i.top+=a.top,i.bottom+=a.top,i.left+=a.left,i.right+=a.left}}return i}function r(t){var e=(getComputedStyle(t)||{}).position,i=[];if("fixed"===e)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var o=void 0;try{o=getComputedStyle(n)}catch(t){}if(void 0===o||null===o)return i.push(n),i;var r=o,a=r.overflow,s=r.overflowX,l=r.overflowY;/(auto|scroll)/.test(a+l+s)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(o.position)>=0)&&i.push(n)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){_&&document.body.removeChild(_),_=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var i=e.documentElement,n=o(t),r=S();return n.top-=r.top,n.left-=r.left,void 0===n.width&&(n.width=document.body.scrollWidth-n.left-n.right),void 0===n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function l(t){return t.offsetParent||document.documentElement}function u(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;i===n&&(n=e.clientWidth),document.body.removeChild(e);var o=i-n;return{width:o,height:o}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}),t}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var i=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=p(t).replace(i," ");v(t,n)}}function h(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{d(t,e);var i=p(t)+" "+e;v(t,i)}}function f(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=p(t);return new RegExp("(^| )"+e+"( |$)","gi").test(i)}function p(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function v(t,e){t.setAttribute("class",e)}function g(t,e,i){i.forEach(function(i){-1===e.indexOf(i)&&f(t,i)&&d(t,i)}),e.forEach(function(e){f(t,e)||h(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+i>=e&&e>=t-i}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,i=Array(e),n=0;e>n;n++)i[n]=arguments[n];return i.forEach(function(e){var i=e.top,n=e.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=i,t.left+=n}),t}function j(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function Q(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,i=s(e),n=i,o=getComputedStyle(e);if(e=[n.left,n.top,i.width+n.left,i.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}X.forEach(function(t,i){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?e[i]+=parseFloat(o["border"+t+"Width"]):e[i]-=parseFloat(o["border"+t+"Width"])})}(),e}var C=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=void 0;void 0===x&&(x={modules:[]});var _=null,O=function(){var t=0;return function(){return++t}}(),k={},S=function(){var t=_;t||((t=document.createElement("div")).setAttribute("data-tether-id",O()),c(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),_=t);var e=t.getAttribute("data-tether-id");return void 0===k[e]&&(k[e]=o(t),M(function(){delete k[e]})),k[e]},E=[],M=function(t){E.push(t)},T=function(){for(var t=void 0;t=E.pop();)t()},P=function(){function t(){n(this,t)}return C(t,[{key:"on",value:function(t,e,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:n})}},{key:"once",value:function(t,e,i){this.on(t,e,i,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var i=0;i<this.bindings[t].length;)this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):++i}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,i=arguments.length,n=Array(i>1?i-1:0),o=1;i>o;o++)n[o-1]=arguments[o];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],a=r.handler,s=r.ctx,l=r.once,u=s;void 0===u&&(u=this),a.apply(u,n),l?this.bindings[t].splice(e,1):++e}}}}]),t}();x.Utils={getActualBoundingClientRect:o,getScrollParents:r,getBounds:s,getOffsetParent:l,extend:c,addClass:h,removeClass:d,hasClass:f,updateClasses:g,defer:M,flush:T,uniqueId:O,Evented:P,getScrollBarSize:u,removeUtilElements:a};var A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),C=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),H=function(t,e,i){for(var n=!0;n;){var o=t,r=e,a=i;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,r);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return;t=u,e=r,i=a,n=!0,s=u=void 0}};if(void 0===x)throw new Error("You must include the utils.js file before tether.js");var B=x.Utils,r=B.getScrollParents,s=B.getBounds,l=B.getOffsetParent,c=B.extend,h=B.addClass,d=B.removeClass,g=B.updateClasses,M=B.defer,T=B.flush,u=B.getScrollBarSize,a=B.removeUtilElements,I=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<e.length;++i){var n=e[i];if(void 0!==t.style[n])return n}}(),N=[],z=function(){N.forEach(function(t){t.position(!1)}),T()};!function(){var t=null,e=null,i=null,n=function n(){return void 0!==e&&e>16?(e=Math.min(e-16,250),void(i=setTimeout(n,250))):void(void 0!==t&&b()-t<10||(null!=i&&(clearTimeout(i),i=null),t=b(),z(),e=b()-t))};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var L={center:"center",left:"right",right:"left"},D={middle:"middle",top:"bottom",bottom:"top"},q={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},W=function(t,e){var i=t.left,n=t.top;return"auto"===i&&(i=L[e.left]),"auto"===n&&(n=D[e.top]),{left:i,top:n}},F=function(t){var e=t.left,i=t.top;return void 0!==q[t.left]&&(e=q[t.left]),void 0!==q[t.top]&&(i=q[t.top]),{left:e,top:i}},V=function(t){var e=t.split(" "),i=A(e,2);return{top:i[0],left:i[1]}},U=V,Y=function(t){function e(t){var i=this;n(this,e),H(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),N.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(i)}),this.position()}return m(e,t),C(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(n,t);var o=this.options,a=o.element,s=o.target,l=o.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),h(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=U(this.options.targetAttachment),this.attachment=U(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((r={height:(t=s(this.target)).height,width:t.width,top:t.top,left:t.left}).height=Math.min(r.height,t.height-(pageYOffset-t.top)),r.height=Math.min(r.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),r.height=Math.min(innerHeight,r.height),r.height-=2,r.width=Math.min(r.width,t.width-(pageXOffset-t.left)),r.width=Math.min(r.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),r.width=Math.min(innerWidth,r.width),r.width-=2,r.top<pageYOffset&&(r.top=pageYOffset),r.left<pageXOffset&&(r.left=pageXOffset),r);if("scroll-handle"===this.targetModifier){var t=void 0,e=this.target;e===document.body?(e=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(e);var i=getComputedStyle(e),n=0;(e.scrollWidth>e.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(n=15);var o=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-n,r={width:15,height:.975*o*(o/e.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},a=0;408>o&&this.target===document.body&&(a=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(r.height=Math.max(r.height,24));var l=this.target.scrollTop/(e.scrollHeight-o);return r.top=l*(o-r.height-a)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(r.height=Math.max(r.height,24)),r}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),N.forEach(function(e,i){e===t&&N.splice(i,1)}),0===N.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var i=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(i.getClass("element-attached")+"-"+t),r.push(i.getClass("target-attached")+"-"+t)}),M(function(){void 0!==i._addAttachClasses&&(g(i.element,i._addAttachClasses,r),!1!==i.options.addTargetClasses&&g(i.target,i._addAttachClasses,r),delete i._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var i=W(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,i);var n=this.cache("element-bounds",function(){return s(t.element)}),o=n.width,r=n.height;if(0===o&&0===r&&void 0!==this.lastSize){var a=this.lastSize;o=a.width,r=a.height}else this.lastSize={width:o,height:r};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=c,h=j(F(this.attachment),{width:o,height:r}),f=j(F(i),d),p=j(this.offset,{width:o,height:r}),v=j(this.targetOffset,d);h=w(h,p),f=w(f,v);for(var g=c.left+f.left-h.left,m=c.top+f.top-h.top,y=0;y<x.modules.length;++y){var b=x.modules[y].position.call(this,{left:g,top:m,targetAttachment:i,targetPos:c,elementPos:n,offset:h,targetOffset:f,manualOffset:p,manualTargetOffset:v,scrollbarSize:O,attachment:this.attachment});if(!1===b)return!1;void 0!==b&&"object"==typeof b&&(m=b.top,g=b.left)}var Q={page:{top:m,left:g},viewport:{top:m-pageYOffset,bottom:pageYOffset-m-r+innerHeight,left:g-pageXOffset,right:pageXOffset-g-o+innerWidth}},C=this.target.ownerDocument,_=C.defaultView,O=void 0;return C.body.scrollWidth>_.innerWidth&&(O=this.cache("scrollbar-size",u),Q.viewport.bottom-=O.height),C.body.scrollHeight>_.innerHeight&&(O=this.cache("scrollbar-size",u),Q.viewport.right-=O.width),(-1===["","static"].indexOf(C.body.style.position)||-1===["","static"].indexOf(C.body.parentElement.style.position))&&(Q.page.bottom=C.body.scrollHeight-m-r,Q.page.right=C.body.scrollWidth-g-o),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),i=t.cache("target-offsetparent-bounds",function(){return s(e)}),n=getComputedStyle(e),o=i,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),i.right=C.body.scrollWidth-i.left-o.width+r.right,i.bottom=C.body.scrollHeight-i.top-o.height+r.bottom,Q.page.top>=i.top+r.top&&Q.page.bottom>=i.bottom&&Q.page.left>=i.left+r.left&&Q.page.right>=i.right){var a=e.scrollTop,u=e.scrollLeft;Q.offset={top:Q.page.top-i.top+a-r.top,left:Q.page.left-i.left+u-r.left}}}(),this.move(Q),this.history.unshift(Q),this.history.length>3&&this.history.pop(),e&&T(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var i={};for(var n in t){i[n]={};for(var o in t[n]){for(var r=!1,a=0;a<this.history.length;++a){var s=this.history[a];if(void 0!==s[n]&&!y(s[n][o],t[n][o])){r=!0;break}}r||(i[n][o]=!0)}}var u={top:"",left:"",right:"",bottom:""},d=function(t,i){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var n=void 0,o=void 0;t.top?(u.top=0,n=i.top):(u.bottom=0,n=-i.bottom),t.left?(u.left=0,o=i.left):(u.right=0,o=-i.right),u[I]="translateX("+Math.round(o)+"px) translateY("+Math.round(n)+"px)","msTransform"!==I&&(u[I]+=" translateZ(0)")}else t.top?u.top=i.top+"px":u.bottom=i.bottom+"px",t.left?u.left=i.left+"px":u.right=i.right+"px"},h=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(u.position="absolute",d(i.page,t.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(u.position="fixed",d(i.viewport,t.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){u.position="absolute";var n=e.cache("target-offsetparent",function(){return l(e.target)});l(e.element)!==n&&M(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),d(i.offset,t.offset),h=!0}():(u.position="absolute",d({top:!0,left:!0},t.page)),!h){for(var f=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){f=!1;break}p=p.parentNode}f||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},g=!1;for(var o in u){var m=u[o];this.element.style[o]!==m&&(g=!0,v[o]=m)}g&&M(function(){c(e.element.style,v)})}}}]),e}(P);Y.modules=[],x.position=z;var R=c(Y,x),A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=(B=x.Utils).getBounds,c=B.extend,g=B.updateClasses,M=B.defer,X=["left","top","right","bottom"];x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,o=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return s(e.element)}),a=r.height,l=r.width;if(0===l&&0===a&&void 0!==this.lastSize){var u=this.lastSize;l=u.width,a=u.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),h=d.height,f=d.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&p.push(e),i&&p.push(i)}),p.forEach(function(t){["left","top","right","bottom"].forEach(function(e){p.push(t+"-"+e)})});var v=[],m=c({},o),y=c({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,u=t.pin;void 0===s&&(s="");var c=void 0,d=void 0;if(s.indexOf(" ")>=0){var p=s.split(" "),g=A(p,2);d=g[0],c=g[1]}else c=d=s;var b=Q(e,r);("target"===d||"both"===d)&&(i<b[1]&&"top"===m.top&&(i+=h,m.top="bottom"),i+a>b[3]&&"bottom"===m.top&&(i-=h,m.top="top")),"together"===d&&("top"===m.top&&("bottom"===y.top&&i<b[1]?(i+=h,m.top="bottom",i+=a,y.top="top"):"top"===y.top&&i+a>b[3]&&i-(a-h)>=b[1]&&(i-=a-h,m.top="bottom",y.top="bottom")),"bottom"===m.top&&("top"===y.top&&i+a>b[3]?(i-=h,m.top="top",i-=a,y.top="bottom"):"bottom"===y.top&&i<b[1]&&i+(2*a-h)<=b[3]&&(i+=a-h,m.top="top",y.top="top")),"middle"===m.top&&(i+a>b[3]&&"top"===y.top?(i-=a,y.top="bottom"):i<b[1]&&"bottom"===y.top&&(i+=a,y.top="top"))),("target"===c||"both"===c)&&(n<b[0]&&"left"===m.left&&(n+=f,m.left="right"),n+l>b[2]&&"right"===m.left&&(n-=f,m.left="left")),"together"===c&&(n<b[0]&&"left"===m.left?"right"===y.left?(n+=f,m.left="right",n+=l,y.left="left"):"left"===y.left&&(n+=f,m.left="right",n-=l,y.left="right"):n+l>b[2]&&"right"===m.left?"left"===y.left?(n-=f,m.left="left",n-=l,y.left="right"):"right"===y.left&&(n-=f,m.left="left",n+=l,y.left="left"):"center"===m.left&&(n+l>b[2]&&"left"===y.left?(n-=l,y.left="right"):n<b[0]&&"right"===y.left&&(n+=l,y.left="left"))),("element"===d||"both"===d)&&(i<b[1]&&"bottom"===y.top&&(i+=a,y.top="top"),i+a>b[3]&&"top"===y.top&&(i-=a,y.top="bottom")),("element"===c||"both"===c)&&(n<b[0]&&("right"===y.left?(n+=l,y.left="left"):"center"===y.left&&(n+=l/2,y.left="left")),n+l>b[2]&&("left"===y.left?(n-=l,y.left="right"):"center"===y.left&&(n-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var w=[],j=[];i<b[1]&&(u.indexOf("top")>=0?(i=b[1],w.push("top")):j.push("top")),i+a>b[3]&&(u.indexOf("bottom")>=0?(i=b[3]-a,w.push("bottom")):j.push("bottom")),n<b[0]&&(u.indexOf("left")>=0?(n=b[0],w.push("left")):j.push("left")),n+l>b[2]&&(u.indexOf("right")>=0?(n=b[2]-l,w.push("right")):j.push("right")),w.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),v.push(t),w.forEach(function(e){v.push(t+"-"+e)})}(),j.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),v.push(t),j.forEach(function(e){v.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=m.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=m.top=!1),(m.top!==o.top||m.left!==o.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,m),e.trigger("update",{attachment:y,targetAttachment:m}))}),M(function(){!1!==e.options.addTargetClasses&&g(e.target,v,p),g(e.element,v,p)}),{top:i,left:n}}});var s=(B=x.Utils).getBounds,g=B.updateClasses,M=B.defer;x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,o=this.cache("element-bounds",function(){return s(e.element)}),r=o.height,a=o.width,l=this.getTargetBounds(),u=i+r,c=n+a,d=[];i<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];(e===n||e===c)&&d.push(t)}),n<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];(e===i||e===u)&&d.push(t)});var h=[],f=[],p=["left","top","right","bottom"];return h.push(this.getClass("abutted")),p.forEach(function(t){h.push(e.getClass("abutted")+"-"+t)}),d.length&&f.push(this.getClass("abutted")),d.forEach(function(t){f.push(e.getClass("abutted")+"-"+t)}),M(function(){!1!==e.options.addTargetClasses&&g(e.target,f,h),g(e.element,f,h)}),!0}});A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var o=void 0,r=void 0;if("string"==typeof n){(n=n.split(" "))[1]=n[1]||n[0];var a=A(n,2);o=a[0],r=a[1],o=parseFloat(o,10),r=parseFloat(r,10)}else o=n.top,r=n.left;return e+=o,i+=r,{top:e,left:i}}}}),R})}window.width=jQuery(window).width(),window.height=jQuery(window).height(),jQuery(window).ready(function(){jQuery.fn.extend({size:function(){return this.length}}),_loadTetherBS4(),loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:bootstrapMin?action=raw&ctype=text/javascript",function(){jQuery("body").hasClass("enable-materialdesign")&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:materialMin?action=raw&ctype=text/javascript"),Init(!1)}),jQuery("html").hasClass("chrome")&&jQuery("body").hasClass("smoothscroll")&&navigator.platform.indexOf("Mac")<0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:smoothScroll?action=raw&ctype=text/javascript",function(){jQuery.smoothScroll()})}),jQuery("#preloader").length>0&&jQuery(window).on("load",function(){jQuery("#preloader").fadeOut(1e3,function(){jQuery("#preloader").remove()})});var _arr={},isMobile={iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/WPDesktop/i)},any:function(){return isMobile.iOS()||isMobile.Android()||isMobile.BlackBerry()||isMobile.Opera()||isMobile.Windows()}};Number.prototype.formatMoney=function(t,e,i){var n=this,t=isNaN(t=Math.abs(t))?2:t,e=void 0==e?".":e,i=void 0==i?",":i,o=n<0?"-":"",r=String(parseInt(n=Math.abs(Number(n)||0).toFixed(t))),a=(a=r.length)>3?a%3:0;return o+(a?r.substr(0,a)+i:"")+r.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?e+Math.abs(n-r).toFixed(t).slice(2):"")},function(t){t.fn.appear=function(e,i){var n=t.extend({data:void 0,one:!0,accX:0,accY:0},i);return this.each(function(){var i=t(this);if(i.appeared=!1,e){var o=t(window),r=function(){if(i.is(":visible")){var t=o.scrollLeft(),e=o.scrollTop(),r=i.offset(),a=r.left,s=r.top,l=n.accX,u=n.accY,c=i.height(),d=o.height(),h=i.width(),f=o.width();s+c+u>=e&&s<=e+d+u&&a+h+l>=t&&a<=t+f+l?i.appeared||i.trigger("appear",n.data):i.appeared=!1}else i.appeared=!1},a=function(){if(i.appeared=!0,n.one){o.unbind("scroll",r);var a=t.inArray(r,t.fn.appear.checks);a>=0&&t.fn.appear.checks.splice(a,1)}e.apply(this,arguments)};n.one?i.one("appear",n.data,a):i.bind("appear",n.data,a),o.scroll(r),t.fn.appear.checks.push(r),r()}else i.trigger("appear",n.data)})},t.extend(t.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=t.fn.appear.checks.length;if(e>0)for(;e--;)t.fn.appear.checks[e]()},run:function(){t.fn.appear.timeout&&clearTimeout(t.fn.appear.timeout),t.fn.appear.timeout=setTimeout(t.fn.appear.checkAll,20)}}),t.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(e,i){var n=t.fn[i];n&&(t.fn[i]=function(){var e=n.apply(this,arguments);return t.fn.appear.run(),e})})}(jQuery),jQuery.fn.parallax=function(t,e,i){function n(){var n=jQuery(window).scrollTop();o=i?function(t){return t.outerHeight(!0)}:function(t){return t.height()},a.each(function(){var i=jQuery(this),a=i.offset().top,s=o(i);if(!(n>a+s||a>n+window.height)){var l=Math.round((r-n)*e);i.css("backgroundPosition",t+" "+l+"px")}})}var o,r,a=jQuery(this);(arguments.length<1||null===t)&&(t="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===i)&&(i=!0),a.each(function(){(r=a.offset().top)<window.height&&(r=0)}),jQuery(window).bind("scroll",n).resize(n),n()},jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,i,n,o){return jQuery.easing[jQuery.easing.def](t,e,i,n,o)},easeInQuad:function(t,e,i,n,o){return n*(e/=o)*e+i},easeOutQuad:function(t,e,i,n,o){return-n*(e/=o)*(e-2)+i},easeInOutQuad:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e+i:-n/2*(--e*(e-2)-1)+i},easeInCubic:function(t,e,i,n,o){return n*(e/=o)*e*e+i},easeOutCubic:function(t,e,i,n,o){return n*((e=e/o-1)*e*e+1)+i},easeInOutCubic:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e+i:n/2*((e-=2)*e*e+2)+i},easeInQuart:function(t,e,i,n,o){return n*(e/=o)*e*e*e+i},easeOutQuart:function(t,e,i,n,o){return-n*((e=e/o-1)*e*e*e-1)+i},easeInOutQuart:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e*e+i:-n/2*((e-=2)*e*e*e-2)+i},easeInQuint:function(t,e,i,n,o){return n*(e/=o)*e*e*e*e+i},easeOutQuint:function(t,e,i,n,o){return n*((e=e/o-1)*e*e*e*e+1)+i},easeInOutQuint:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e*e*e+i:n/2*((e-=2)*e*e*e*e+2)+i},easeInSine:function(t,e,i,n,o){return-n*Math.cos(e/o*(Math.PI/2))+n+i},easeOutSine:function(t,e,i,n,o){return n*Math.sin(e/o*(Math.PI/2))+i},easeInOutSine:function(t,e,i,n,o){return-n/2*(Math.cos(Math.PI*e/o)-1)+i},easeInExpo:function(t,e,i,n,o){return 0==e?i:n*Math.pow(2,10*(e/o-1))+i},easeOutExpo:function(t,e,i,n,o){return e==o?i+n:n*(1-Math.pow(2,-10*e/o))+i},easeInOutExpo:function(t,e,i,n,o){return 0==e?i:e==o?i+n:(e/=o/2)<1?n/2*Math.pow(2,10*(e-1))+i:n/2*(2-Math.pow(2,-10*--e))+i},easeInCirc:function(t,e,i,n,o){return-n*(Math.sqrt(1-(e/=o)*e)-1)+i},easeOutCirc:function(t,e,i,n,o){return n*Math.sqrt(1-(e=e/o-1)*e)+i},easeInOutCirc:function(t,e,i,n,o){return(e/=o/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+i:n/2*(Math.sqrt(1-(e-=2)*e)+1)+i},easeInElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(1==(e/=o))return i+n;if(a||(a=.3*o),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return-s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)+i},easeOutElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(1==(e/=o))return i+n;if(a||(a=.3*o),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return s*Math.pow(2,-10*e)*Math.sin((e*o-r)*(2*Math.PI)/a)+n+i},easeInOutElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(2==(e/=o/2))return i+n;if(a||(a=o*(.3*1.5)),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*-.5+i:s*Math.pow(2,-10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*.5+n+i},easeInBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),n*(e/=o)*e*((r+1)*e-r)+i},easeOutBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),n*((e=e/o-1)*e*((r+1)*e+r)+1)+i},easeInOutBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),(e/=o/2)<1?n/2*(e*e*((1+(r*=1.525))*e-r))+i:n/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+i},easeInBounce:function(t,e,i,n,o){return n-jQuery.easing.easeOutBounce(t,o-e,0,n,o)+i},easeOutBounce:function(t,e,i,n,o){return(e/=o)<1/2.75?n*(7.5625*e*e)+i:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+i:n*(7.5625*(e-=2.625/2.75)*e+.984375)+i},easeInOutBounce:function(t,e,i,n,o){return e<o/2?.5*jQuery.easing.easeInBounce(t,2*e,0,n,o)+i:.5*jQuery.easing.easeOutBounce(t,2*e-o,0,n,o)+.5*n+i}}),function(){var t,e,i,n,o,r=function(t,e){return function(){return t.apply(e,arguments)}},a=[].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1};e=function(){function t(){}return t.prototype.extend=function(t,e){var i,n;for(i in e)n=e[i],null==t[i]&&(t[i]=n);return t},t.prototype.isMobile=function(t){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)},t.prototype.addEvent=function(t,e,i){return null!=t.addEventListener?t.addEventListener(e,i,!1):null!=t.attachEvent?t.attachEvent("on"+e,i):t[e]=i},t.prototype.removeEvent=function(t,e,i){return null!=t.removeEventListener?t.removeEventListener(e,i,!1):null!=t.detachEvent?t.detachEvent("on"+e,i):delete t[e]},t.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},t}(),i=this.WeakMap||this.MozWeakMap||(i=function(){function t(){this.keys=[],this.values=[]}return t.prototype.get=function(t){var e,i,n,o;for(e=i=0,n=(o=this.keys).length;n>i;e=++i)if(o[e]===t)return this.values[e]},t.prototype.set=function(t,e){var i,n,o,r;for(i=n=0,o=(r=this.keys).length;o>n;i=++n)if(r[i]===t)return void(this.values[i]=e);return this.keys.push(t),this.values.push(e)},t}()),t=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(t=function(){function t(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return t.notSupported=!0,t.prototype.observe=function(){},t}()),n=this.getComputedStyle||function(t){return this.getPropertyValue=function(e){var i;return"float"===e&&(e="styleFloat"),o.test(e)&&e.replace(o,function(t,e){return e.toUpperCase()}),(null!=(i=t.currentStyle)?i[e]:void 0)||null},this},o=/(\-([a-z]){1})/g,this.WOW=function(){function o(t){null==t&&(t={}),this.scrollCallback=r(this.scrollCallback,this),this.scrollHandler=r(this.scrollHandler,this),this.start=r(this.start,this),this.scrolled=!0,this.config=this.util().extend(t,this.defaults),this.animationNameCache=new i}return o.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},o.prototype.init=function(){var t;return this.element=window.document.documentElement,"interactive"===(t=document.readyState)||"complete"===t?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},o.prototype.start=function(){var e,i,n,o;if(this.stopped=!1,this.boxes=function(){var t,i,n,o;for(o=[],t=0,i=(n=this.element.querySelectorAll("."+this.config.boxClass)).length;i>t;t++)e=n[t],o.push(e);return o}.call(this),this.all=function(){var t,i,n,o;for(o=[],t=0,i=(n=this.boxes).length;i>t;t++)e=n[t],o.push(e);return o}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(o=this.boxes,i=0,n=o.length;n>i;i++)e=o[i],this.applyStyle(e,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new t(function(t){return function(e){var i,n,o,r,a;for(a=[],o=0,r=e.length;r>o;o++)n=e[o],a.push(function(){var t,e,o,r;for(r=[],t=0,e=(o=n.addedNodes||[]).length;e>t;t++)i=o[t],r.push(this.doSync(i));return r}.call(t));return a}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},o.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},o.prototype.sync=function(){return t.notSupported?this.doSync(this.element):void 0},o.prototype.doSync=function(t){var e,i,n,o,r;if(null==t&&(t=this.element),1===t.nodeType){for(r=[],i=0,n=(o=(t=t.parentNode||t).querySelectorAll("."+this.config.boxClass)).length;n>i;i++)e=o[i],a.call(this.all,e)<0?(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),r.push(this.scrolled=!0)):r.push(void 0);return r}},o.prototype.show=function(t){return this.applyStyle(t),t.className=t.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(t):void 0},o.prototype.applyStyle=function(t,e){var i,n,o;return n=t.getAttribute("data-wow-duration"),i=t.getAttribute("data-wow-delay"),o=t.getAttribute("data-wow-iteration"),this.animate(function(r){return function(){return r.customStyle(t,e,n,i,o)}}(this))},o.prototype.animate="requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()},o.prototype.resetStyle=function(){var t,e,i,n,o;for(o=[],e=0,i=(n=this.boxes).length;i>e;e++)t=n[e],o.push(t.style.visibility="visible");return o},o.prototype.customStyle=function(t,e,i,n,o){return e&&this.cacheAnimationName(t),t.style.visibility=e?"hidden":"visible",i&&this.vendorSet(t.style,{animationDuration:i}),n&&this.vendorSet(t.style,{animationDelay:n}),o&&this.vendorSet(t.style,{animationIterationCount:o}),this.vendorSet(t.style,{animationName:e?"none":this.cachedAnimationName(t)}),t},o.prototype.vendors=["moz","webkit"],o.prototype.vendorSet=function(t,e){var i,n,o,r;r=[];for(i in e)n=e[i],t[""+i]=n,r.push(function(){var e,r,a,s;for(s=[],e=0,r=(a=this.vendors).length;r>e;e++)o=a[e],s.push(t[""+o+i.charAt(0).toUpperCase()+i.substr(1)]=n);return s}.call(this));return r},o.prototype.vendorCSS=function(t,e){var i,o,r,a,s,l;for(i=(o=n(t)).getPropertyCSSValue(e),a=0,s=(l=this.vendors).length;s>a;a++)r=l[a],i=i||o.getPropertyCSSValue("-"+r+"-"+e);return i},o.prototype.animationName=function(t){var e;try{e=this.vendorCSS(t,"animation-name").cssText}catch(i){e=n(t).getPropertyValue("animation-name")}return"none"===e?"":e},o.prototype.cacheAnimationName=function(t){return this.animationNameCache.set(t,this.animationName(t))},o.prototype.cachedAnimationName=function(t){return this.animationNameCache.get(t)},o.prototype.scrollHandler=function(){return this.scrolled=!0},o.prototype.scrollCallback=function(){var t;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var e,i,n,o;for(o=[],e=0,i=(n=this.boxes).length;i>e;e++)(t=n[e])&&(this.isVisible(t)?this.show(t):o.push(t));return o}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},o.prototype.offsetTop=function(t){for(var e;void 0===t.offsetTop;)t=t.parentNode;for(e=t.offsetTop;t=t.offsetParent;)e+=t.offsetTop;return e},o.prototype.isVisible=function(t){var e,i,n,o,r;return i=t.getAttribute("data-wow-offset")||this.config.offset,r=window.pageYOffset,o=r+Math.min(this.element.clientHeight,this.util().innerHeight())-i,n=this.offsetTop(t),e=n+t.clientHeight,o>=n&&e>=r},o.prototype.util=function(){return null!=this._util?this._util:this._util=new e},o.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},o}()}.call(this),function(t,e,i){function n(t,e){return typeof t===e}function o(t){var e=C.className,i=j._config.classPrefix||"";if(x&&(e=e.baseVal),j._config.enableJSClass){var n=new RegExp("(^|\\s)"+i+"no-js(\\s|$)");e=e.replace(n,"$1"+i+"js$2")}j._config.enableClasses&&(e+=" "+i+t.join(" "+i),x?C.className.baseVal=e:C.className=e)}function r(){return"function"!=typeof e.createElement?e.createElement(arguments[0]):x?e.createElementNS.call(e,"http://www.w3.org/2000/svg",arguments[0]):e.createElement.apply(e,arguments)}function a(t,e){if("object"==typeof t)for(var i in t)S(t,i)&&a(i,t[i]);else{var n=(t=t.toLowerCase()).split("."),r=j[n[0]];if(2==n.length&&(r=r[n[1]]),void 0!==r)return j;e="function"==typeof e?e():e,1==n.length?j[n[0]]=e:(!j[n[0]]||j[n[0]]instanceof Boolean||(j[n[0]]=new Boolean(j[n[0]])),j[n[0]][n[1]]=e),o([(e&&0!=e?"":"no-")+n.join("-")]),j._trigger(t,e)}return j}function s(t){return t.replace(/([a-z])-([a-z])/g,function(t,e,i){return e+i.toUpperCase()}).replace(/^-/,"")}function l(t,e){return!!~(""+t).indexOf(e)}function u(){var t=e.body;return t||(t=r(x?"svg":"body"),t.fake=!0),t}function c(t,i,n,o){var a,s,l,c,d="modernizr",h=r("div"),f=u();if(parseInt(n,10))for(;n--;)l=r("div"),l.id=o?o[n]:d+(n+1),h.appendChild(l);return a=r("style"),a.type="text/css",a.id="s"+d,(f.fake?f:h).appendChild(a),f.appendChild(h),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),h.id=d,f.fake&&(f.style.background="",f.style.overflow="hidden",c=C.style.overflow,C.style.overflow="hidden",C.appendChild(f)),s=i(h,t),f.fake?(f.parentNode.removeChild(f),C.style.overflow=c,C.offsetHeight):h.parentNode.removeChild(h),!!s}function d(t,e){return function(){return t.apply(e,arguments)}}function h(t,e,i){var o;for(var r in t)if(t[r]in e)return!1===i?t[r]:(o=e[t[r]],n(o,"function")?d(o,i||e):o);return!1}function f(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(f(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var r=[];o--;)r.push("("+f(e[o])+":"+n+")");return r=r.join(" or "),c("@supports ("+r+") { #modernizr { position: absolute; } }",function(t){return"absolute"==getComputedStyle(t,null).position})}return i}function v(t,e,o,a){function u(){d&&(delete B.style,delete B.modElem)}if(a=!n(a,"undefined")&&a,!n(o,"undefined")){var c=p(t,o);if(!n(c,"undefined"))return c}for(var d,h,f,v,g,m=["modernizr","tspan","samp"];!B.style&&m.length;)d=!0,B.modElem=r(m.shift()),B.style=B.modElem.style;for(f=t.length,h=0;f>h;h++)if(v=t[h],g=B.style[v],l(v,"-")&&(v=s(v)),B.style[v]!==i){if(a||n(o,"undefined"))return u(),"pfx"!=e||v;try{B.style[v]=o}catch(t){}if(B.style[v]!=g)return u(),"pfx"!=e||v}return u(),!1}function g(t,e,i,o,r){var a=t.charAt(0).toUpperCase()+t.slice(1),s=(t+" "+T.join(a+" ")+a).split(" ");return n(e,"string")||n(e,"undefined")?v(s,e,o,r):(s=(t+" "+O.join(a+" ")+a).split(" "),h(s,e,i))}function m(t,e,n){return g(t,i,i,e,n)}var y=[],b=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){var i=this;setTimeout(function(){e(i[t])},0)},addTest:function(t,e,i){b.push({name:t,fn:e,options:i})},addAsyncTest:function(t){b.push({name:null,fn:t})}},j=function(){};j.prototype=w,j=new j;var Q=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];w._prefixes=Q;var C=e.documentElement,x="svg"===C.nodeName.toLowerCase();x||function(t,e){function i(t,e){var i=t.createElement("p"),n=t.getElementsByTagName("head")[0]||t.documentElement;return i.innerHTML="x<style>"+e+"</style>",n.insertBefore(i.lastChild,n.firstChild)}function n(){var t=g.elements;return"string"==typeof t?t.split(" "):t}function o(t){var e=v[t[f]];return e||(e={},p++,t[f]=p,v[p]=e),e}function r(t,i,n){if(i||(i=e),u)return i.createElement(t);n||(n=o(i));var r;return r=n.cache[t]?n.cache[t].cloneNode():h.test(t)?(n.cache[t]=n.createElem(t)).cloneNode():n.createElem(t),!r.canHaveChildren||d.test(t)||r.tagUrn?r:n.frag.appendChild(r)}function a(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(i){return g.shivMethods?r(i,t,e):e.createElem(i)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/[\w\-:]+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(g,e.frag)}function s(t){t||(t=e);var n=o(t);return!g.shivCSS||l||n.hasCSS||(n.hasCSS=!!i(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||a(t,n),t}var l,u,c=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f="_html5shiv",p=0,v={};!function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",l="hidden"in t,u=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return void 0===t.cloneNode||void 0===t.createDocumentFragment||void 0===t.createElement}()}catch(t){l=!0,u=!0}}();var g={elements:c.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==c.shivCSS,supportsUnknownElements:u,shivMethods:!1!==c.shivMethods,type:"default",shivDocument:s,createElement:r,createDocumentFragment:function(t,i){if(t||(t=e),u)return t.createDocumentFragment();for(var r=(i=i||o(t)).frag.cloneNode(),a=0,s=n(),l=s.length;l>a;a++)r.createElement(s[a]);return r},addElements:function(t,e){var i=g.elements;"string"!=typeof i&&(i=i.join(" ")),"string"!=typeof t&&(t=t.join(" ")),g.elements=i+" "+t,s(e)}};t.html5=g,s(e),"object"==typeof module&&module.exports&&(module.exports=g)}(void 0!==t?t:this,e);var _="Moz O ms Webkit",O=w._config.usePrefixes?_.toLowerCase().split(" "):[];w._domPrefixes=O;var k=function(){var t=!("onblur"in e.documentElement);return function(e,n){var o;return!!e&&(n&&"string"!=typeof n||(n=r(n||"div")),e="on"+e,!(o=e in n)&&t&&(n.setAttribute||(n=r("div")),n.setAttribute(e,""),o="function"==typeof n[e],n[e]!==i&&(n[e]=i),n.removeAttribute(e)),o)}}();w.hasEvent=k,j.addTest("video",function(){var t=r("video"),e=!1;try{(e=!!t.canPlayType)&&(e=new Boolean(e),e.ogg=t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),e.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),e.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),e.vp9=t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),e.hls=t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(t){}return e});var S;!function(){var t={}.hasOwnProperty;S=n(t,"undefined")||n(t.call,"undefined")?function(t,e){return e in t&&n(t.constructor.prototype[e],"undefined")}:function(e,i){return t.call(e,i)}}(),w._l={},w.on=function(t,e){this._l[t]||(this._l[t]=[]),this._l[t].push(e),j.hasOwnProperty(t)&&setTimeout(function(){j._trigger(t,j[t])},0)},w._trigger=function(t,e){if(this._l[t]){var i=this._l[t];setTimeout(function(){var t;for(t=0;t<i.length;t++)(0,i[t])(e)},0),delete this._l[t]}},j._q.push(function(){w.addTest=a});var E="CSS"in t&&"supports"in t.CSS,M="supportsCSS"in t;j.addTest("supports",E||M);var T=w._config.usePrefixes?_.split(" "):[];w._cssomPrefixes=T;var P=function(e){var n,o=Q.length,r=t.CSSRule;if(void 0===r)return i;if(!e)return!1;if(e=e.replace(/^@/,""),(n=e.replace(/-/g,"_").toUpperCase()+"_RULE")in r)return"@"+e;for(var a=0;o>a;a++){var s=Q[a];if(s.toUpperCase()+"_"+n in r)return"@-"+s.toLowerCase()+"-"+e}return!1};w.atRule=P;var A=w.testStyles=c,H={elem:r("modernizr")};j._q.push(function(){delete H.elem});var B={style:H.elem.style};j._q.unshift(function(){delete B.style}),w.testProp=function(t,e,n){return v([t],i,e,n)},w.testAllProps=g,w.prefixed=function(t,e,i){return 0===t.indexOf("@")?P(t):(-1!=t.indexOf("-")&&(t=s(t)),e?g(t,e,i):g(t,"pfx"))},w.testAllProps=m,j.addTest("csstransitions",m("transition","all",!0)),j.addTest("csstransforms3d",function(){var t=!!m("perspective","1px",!0),e=j._config.usePrefixes;if(t&&(!e||"webkitPerspective"in C.style)){var i;j.supports?i="@supports (perspective: 1px)":(i="@media (transform-3d)",e&&(i+=",(-webkit-transform-3d)")),A("#modernizr{width:0;height:0}"+(i+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}"),function(e){t=7===e.offsetWidth&&18===e.offsetHeight})}return t}),function(){var t,e,i,o,r,a,s;for(var l in b)if(b.hasOwnProperty(l)){if(t=[],(e=b[l]).name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(i=0;i<e.options.aliases.length;i++)t.push(e.options.aliases[i].toLowerCase());for(o=n(e.fn,"function")?e.fn():e.fn,r=0;r<t.length;r++)a=t[r],s=a.split("."),1===s.length?j[s[0]]=o:(!j[s[0]]||j[s[0]]instanceof Boolean||(j[s[0]]=new Boolean(j[s[0]])),j[s[0]][s[1]]=o),y.push((o?"":"no-")+s.join("-"))}}(),o(y),delete w.addTest,delete w.addAsyncTest;for(var I=0;I<j._q.length;I++)j._q[I]();t.Modernizr=j}(window,document);
window.height = jQuery(window).height();
+
 
+
/* Init */
+
jQuery(window).ready(function () {
+
 
+
 
+
// jQuery 3.x do no support size() - should be replaceced with .legth
+
// We use this hack to make old plugins working
+
jQuery.fn.extend({
+
  size: function() {
+
    return this.length;
+
  }
+
});
+
 
+
 
+
_loadTetherBS4();
+
 
+
// Load Bootstrap JS
+
loadScript('https://2017.igem.org/Team:Valencia_UPV/Templates:bootstrapMin?action=raw&ctype=text/javascript', function() {
+
 
+
// Load Material Design Js
+
if(jQuery("body").hasClass('enable-materialdesign')) {
+
loadScript('https://2017.igem.org/Team:Valencia_UPV/Templates:materialMin?action=raw&ctype=text/javascript');
+
}
+
 
+
// Init
+
Init(false);
+
 
+
});
+
 
+
 
+
/* --- */
+
if(jQuery("html").hasClass("chrome") && jQuery("body").hasClass("smoothscroll") && navigator.platform.indexOf('Mac') < 0) {
+
 
+
loadScript('https://2017.igem.org/Team:Valencia_UPV/Templates:smoothScroll?action=raw&ctype=text/javascript', function() {
+
jQuery.smoothScroll();
+
});
+
 
+
}
+
/* --- */
+
});
+
 
+
 
+
/* Init Ajax Reinit:Init(true); */
+
function Init(is_ajax) {
+
 
+
// First Load Only
+
if(is_ajax != true) {
+
+
_afterResize();
+
_slider_full();
+
_topNav();
+
_megaNavHorizontal();
+
_sideNav();
+
_stickyFooter();
+
}
+
+
_toggle();
+
_modalAutoLoad();
+
_lightbox();
+
/** Bootstrap Tooltip **/
+
jQuery("a[data-toggle=tooltip], button[data-toggle=tooltip], span[data-toggle=tooltip]").tooltip();
+
}
+
 
+
 
+
/* Preloader */
+
if(jQuery('#preloader').length > 0) {
+
 
+
jQuery(window).on("load", function() {
+
+
jQuery('#preloader').fadeOut(1000, function() {
+
jQuery('#preloader').remove();
+
});
+
 
+
// setTimeout(function() {}, 1000);
+
 
+
});
+
 
+
}
+
 
+
 
+
/* After Resize */
+
function _afterResize() {
+
 
+
jQuery(window).on("load", function() {
+
"use strict";
+
 
+
// On Resize
+
jQuery(window).resize(function() {
+
 
+
if(window.afterResizeApp) {
+
clearTimeout(window.afterResizeApp);
+
}
+
 
+
window.afterResizeApp = setTimeout(function() {
+
 
+
/**
+
After Resize Code
+
.................
+
**/
+
 
+
_slider_full();
+
 
+
window.width = jQuery(window).width();
+
window.height = jQuery(window).height();
+
 
+
// Resize Flex Slider if exists!
+
if(jQuery('.flexslider').length > 0) {
+
jQuery('.flexslider').resize();
+
}
+
 
+
 
+
}, 300);
+
 
+
});
+
 
+
});
+
 
+
}
+
 
+
 
+
/* Load Script */
+
var _arr = {};
+
function loadScript(scriptName, callback) {
+
 
+
if (!_arr[scriptName]) {
+
_arr[scriptName] = true;
+
 
+
var body = document.getElementsByTagName('body')[0];
+
var script = document.createElement('script');
+
script.type = 'text/javascript';
+
script.src = scriptName;
+
 
+
// then bind the event to the callback function
+
// there are several events for cross browser compatibility
+
// script.onreadystatechange = callback;
+
script.onload = callback;
+
 
+
// fire the loading
+
body.appendChild(script);
+
 
+
} else if (callback) {
+
 
+
callback();
+
 
+
}
+
 
+
};
+
 
+
 
+
/* 00. Slider Full Height */
+
function _slider_full() {
+
_headerHeight = 0;
+
 
+
if(jQuery("#header").hasClass('transparent') || jQuery("#header").hasClass('translucent')) {
+
_headerHeight = 0;
+
} else {
+
_headerHeight = jQuery("#header").outerHeight() || 0;
+
+
if(jQuery("#topBar").length > 0) {
+
_topBarHeight = jQuery("#topBar").outerHeight() || 0;
+
_headerHeight = _headerHeight + _topBarHeight;
+
}
+
}
+
 
+
_screenHeight = jQuery(window).height() - _headerHeight;
+
 
+
if(jQuery("#header").hasClass('static'))
+
_screenHeight = jQuery(window).height();
+
 
+
if(jQuery("#slider").hasClass('halfheight')) {
+
jQuery("#slider.halfheight").height(_screenHeight / 2);
+
}
+
 
+
if(jQuery("#slider").hasClass('thirdheight')) {
+
jQuery("#slider.thirdheight").height(_screenHeight / 1.5);
+
}
+
 
+
if(jQuery("#slider").hasClass('fullheight')) {
+
jQuery("#slider.fullheight").height(_screenHeight);
+
jQuery("#slider.fullheight-min").css({"min-height":_screenHeight + "px"});
+
}
+
 
+
if(window.width < 960) {
+
jQuery("#slider.mobile-fullheight").height(_screenHeight);
+
}
+
}
+
 
+
 
+
/* 01. Top Nav */
+
function _topNav() {
+
window.scrollTop = 0;
+
window._cmScroll = 0;
+
var _header_el = jQuery("#header");
+
 
+
jQuery(window).scroll(function() {
+
_toTop();
+
});
+
 
+
/* Scroll To Top */
+
function _toTop() {
+
_scrollTop = jQuery(document).scrollTop();
+
+
if(_scrollTop > 100) {
+
 
+
if(jQuery("#toTop").is(":hidden")) {
+
jQuery("#toTop").show();
+
}
+
 
+
} else {
+
 
+
if(jQuery("#toTop").is(":visible")) {
+
jQuery("#toTop").hide();
+
}
+
 
+
}
+
 
+
}
+
 
+
 
+
// Mobile Submenu
+
var addActiveClass = false;
+
jQuery("#topMain a.dropdown-toggle").bind("click", function(e) {
+
+
if(jQuery(this).attr('href') == "#") {
+
e.preventDefault();
+
}
+
 
+
addActiveClass = jQuery(this).parent().hasClass("resp-active");
+
jQuery("#topMain").find(".resp-active").removeClass("resp-active");
+
 
+
if(!addActiveClass) {
+
jQuery(this).parents("li").addClass("resp-active");
+
}
+
 
+
return;
+
 
+
});
+
 
+
 
+
// Srearch
+
jQuery('li.search i.fa').click(function () {
+
if(jQuery('#header .search-box').is(":visible")) {
+
jQuery('#header .search-box').fadeOut(300);
+
} else {
+
jQuery('.search-box').fadeIn(300);
+
jQuery('#header .search-box form input').focus();
+
 
+
// hide quick cart if visible
+
if (jQuery('#header li.quick-cart div.quick-cart-box').is(":visible")) {
+
jQuery('#header li.quick-cart div.quick-cart-box').fadeOut(300);
+
}
+
}
+
});
+
 
+
// close search box on body click
+
if(jQuery('#header li.search i.fa').size() != 0) {
+
jQuery('#header .search-box, #header li.search i.fa').on('click', function(e){
+
e.stopPropagation();
+
});
+
 
+
jQuery('body').on('click', function() {
+
if(jQuery('#header li.search .search-box').is(":visible")) {
+
jQuery('#header .search-box').fadeOut(300);
+
}
+
});
+
}
+
 
+
jQuery(document).bind("click", function() {
+
if(jQuery('#header li.search .search-box').is(":visible")) {
+
jQuery('#header .search-box').fadeOut(300);
+
}
+
});
+
 
+
 
+
// Close Fullscreen Search
+
jQuery("#closeSearch").bind("click", function(e) {
+
e.preventDefault();
+
 
+
jQuery('#header .search-box').fadeOut(300);
+
});
+
 
+
 
+
 
+
// Page Menu [mobile]
+
jQuery("button#page-menu-mobile").bind("click", function() {
+
jQuery(this).next('ul').slideToggle(150);
+
});
+
 
+
 
+
// Quick Cart
+
jQuery('li.quick-cart>a').click(function (e) {
+
e.preventDefault();
+
+
var _quick_cart_box = jQuery('li.quick-cart div.quick-cart-box');
+
 
+
if(_quick_cart_box.is(":visible")) {
+
_quick_cart_box.fadeOut(300);
+
} else {
+
_quick_cart_box.fadeIn(300);
+
 
+
// close search if visible
+
if(jQuery('li.search .search-box').is(":visible")) {
+
jQuery('.search-box').fadeOut(300);
+
}
+
}
+
});
+
// close quick cart on body click
+
if(jQuery('li.quick-cart>a').size() != 0) {
+
jQuery('li.quick-cart').on('click', function(e){
+
e.stopPropagation();
+
});
+
 
+
jQuery('body').on('click', function() {
+
if (jQuery('li.quick-cart div.quick-cart-box').is(":visible")) {
+
jQuery('li.quick-cart div.quick-cart-box').fadeOut(300);
+
}
+
});
+
}
+
 
+
 
+
// Page Menu [scrollTo]
+
jQuery("#page-menu ul.menu-scrollTo>li").bind("click", function(e) {
+
 
+
// calculate padding-top for scroll offset
+
var _href = jQuery('a', this).attr('href');
+
+
if(!jQuery('a', this).hasClass('external')) {
+
e.preventDefault();
+
 
+
jQuery("#page-menu ul.menu-scrollTo>li").removeClass('active');
+
jQuery(this).addClass('active');
+
 
+
if(jQuery(_href).length > 0) {
+
 
+
_padding_top = 0;
+
 
+
if(jQuery("#header").hasClass('sticky')) {
+
_padding_top = jQuery(_href).css('padding-top');
+
_padding_top = _padding_top.replace('px', '');
+
}
+
 
+
jQuery('html,body').animate({scrollTop: jQuery(_href).offset().top - _padding_top}, 800, 'easeInOutExpo');
+
 
+
}
+
 
+
}
+
 
+
});
+
+
 
+
 
+
 
+
// MOBILE TOGGLE BUTTON
+
window.currentScroll = 0;
+
jQuery("button.btn-mobile").bind("click", function(e) {
+
e.preventDefault();
+
 
+
jQuery(this).toggleClass('btn-mobile-active');
+
jQuery('html').removeClass('noscroll');
+
jQuery('#menu-overlay').remove();
+
jQuery("#topNav div.nav-main-collapse").hide(0);
+
 
+
if(jQuery(this).hasClass('btn-mobile-active')) {
+
jQuery("#topNav div.nav-main-collapse").show(0);
+
jQuery('html').addClass('noscroll');
+
jQuery('body').append('<div id="menu-overlay"></div>');
+
window.currentScroll = jQuery(window).scrollTop();
+
} else {
+
jQuery('html,body').animate({scrollTop: currentScroll}, 300, 'easeInOutExpo');
+
}
+
});
+
 
+
 
+
 
+
 
+
// BOTTOM NAV
+
if(_header_el.hasClass('bottom')) {
+
 
+
// Add dropup class
+
_header_el.addClass('dropup');
+
window.homeHeight = jQuery(window).outerHeight() - 55;
+
+
 
+
// sticky header
+
if(_header_el.hasClass('sticky')) {
+
window.isOnTop = true;
+
 
+
 
+
// if scroll is > 60%, remove class dropup
+
jQuery(window).scroll(function() {
+
if(jQuery(document).scrollTop() > window.homeHeight / 2) {
+
_header_el.removeClass('dropup');
+
} else {
+
_header_el.addClass('dropup');
+
}
+
});
+
 
+
 
+
// Add fixed|not fixed & dropup|no dropup
+
jQuery(window).scroll(function() {
+
if(jQuery(document).scrollTop() > window.homeHeight) {
+
if(window.isOnTop === true) {
+
jQuery('#header').addClass('fixed');
+
_header_el.removeClass('dropup');
+
window.isOnTop = false;
+
}
+
} else {
+
if(window.isOnTop === false) {
+
jQuery('#header').removeClass('fixed');
+
_header_el.addClass('dropup');
+
window.isOnTop = true;
+
}
+
}
+
});
+
 
+
// get window height on resize
+
jQuery(window).resize(function() {
+
window.homeHeight = jQuery(window).outerHeight();
+
});
+
 
+
}
+
 
+
} else
+
 
+
// STICKY
+
if(_header_el.hasClass('sticky')) {
+
 
+
_topBar_H = jQuery("#topBar").outerHeight() || 0;
+
 
+
// Force fixed header on mobile to avoid "jump" effect.
+
if(window.width <= 992 && _topBar_H < 1) {
+
 
+
var _scrollTop = jQuery(document).scrollTop();
+
_header_H = _header_el.outerHeight() || 0;
+
 
+
_header_el.addClass('fixed');
+
jQuery('body').css({"padding-top":_header_H+"px"});
+
 
+
}
+
 
+
 
+
 
+
jQuery(window).scroll(function() {
+
 
+
if((window.width > 992 && _topBar_H < 1) || _topBar_H > 0) { // 992 to disable on mobile
+
 
+
var _scrollTop = jQuery(document).scrollTop();
+
 
+
if(_scrollTop > _topBar_H) {
+
_header_el.addClass('fixed');
+
 
+
_header_H = _header_el.outerHeight() || 0;
+
 
+
if(!_header_el.hasClass('transparent') && !_header_el.hasClass('translucent')) {
+
jQuery('body').css({"padding-top":_header_H+"px"});
+
}
+
 
+
} else {
+
if(!_header_el.hasClass('transparent') && !_header_el.hasClass('translucent')) {
+
jQuery('body').css({"padding-top":"0px"});
+
}
+
 
+
_header_el.removeClass('fixed');
+
}
+
 
+
}
+
 
+
 
+
 
+
// SWITCH DROPDOWN MENU CLASS ON SCROLL
+
if(_header_el.hasClass('transparent')) {
+
 
+
var _el = jQuery("#topNav div.nav-main-collapse"),
+
_data_switch_default = _el.attr('data-switch-default') || '',
+
_data_switch_scroll = _el.attr('data-switch-scroll') || '';
+
 
+
 
+
if(_data_switch_default != '' || _data_switch_scroll != '') {
+
 
+
if(_scrollTop > 0) {
+
 
+
if(window._cmScroll < 1) {
+
 
+
_el.removeClass(_data_switch_default, _data_switch_scroll).addClass(_data_switch_scroll);
+
 
+
// set to 1, we want to change classes once, not for each pixel on scroll
+
window._cmScroll = 1;
+
 
+
}
+
 
+
} else
+
 
+
if(_scrollTop < 1) {
+
 
+
_el.removeClass(_data_switch_default, _data_switch_scroll).addClass(_data_switch_default);
+
 
+
// Set back to 0
+
window._cmScroll = 0;
+
 
+
}
+
 
+
}
+
 
+
 
+
}
+
 
+
 
+
});
+
 
+
} else
+
 
+
 
+
// STATIC + TRANSPARENT
+
if(_header_el.hasClass('static') && _header_el.hasClass('transparent')) {
+
 
+
_topBar_H = jQuery("#topBar").outerHeight() || 0;
+
 
+
// Force fixed header on mobile to avoid "jump" effect.
+
if(window.width <= 992 && _topBar_H < 1) {
+
 
+
var _scrollTop = jQuery(document).scrollTop();
+
_header_H = _header_el.outerHeight() || 0;
+
 
+
_header_el.addClass('fixed');
+
 
+
}
+
 
+
 
+
 
+
jQuery(window).scroll(function() {
+
 
+
if((window.width > 992 && _topBar_H < 1) || _topBar_H > 0) { // 992 to disable on mobile
+
 
+
var _scrollTop = jQuery(document).scrollTop();
+
 
+
if(_scrollTop > _topBar_H) {
+
_header_el.addClass('fixed');
+
 
+
_header_H = _header_el.outerHeight() || 0;
+
 
+
} else {
+
 
+
 
+
_header_el.removeClass('fixed');
+
}
+
 
+
}
+
 
+
});
+
 
+
 
+
 
+
} else
+
+
if(_header_el.hasClass('static')) {
+
// _header_H = _header_el.outerHeight() + "px";
+
// jQuery('body').css({"padding-top":_header_H});
+
}
+
 
+
 
+
 
+
// Slide Top
+
jQuery("#slidetop a.slidetop-toggle").bind("click", function() {
+
jQuery("#slidetop .container").slideToggle(150, function() {
+
 
+
if(jQuery("#slidetop .container").is(":hidden")) {
+
jQuery("#slidetop").removeClass('active');
+
} else {
+
jQuery("#slidetop").addClass('active');
+
}
+
 
+
});
+
});
+
// 'esc' key
+
jQuery(document).keyup(function(e) {
+
if(e.keyCode == 27) {
+
if(jQuery("#slidetop").hasClass("active")) {
+
jQuery("#slidetop .container").slideToggle(150, function() {
+
jQuery("#slidetop").removeClass('active');
+
});
+
}
+
}
+
});
+
 
+
// Slide Panel
+
jQuery("a#sidepanel_btn").bind("click", function(e) {
+
e.preventDefault();
+
 
+
_pos = "right";
+
if(jQuery("#sidepanel").hasClass('sidepanel-inverse')) {
+
_pos = "left";
+
}
+
 
+
if(jQuery("#sidepanel").is(":hidden")) {
+
 
+
jQuery("body").append('<span id="sidepanel_overlay"></span>');
+
 
+
if(_pos == "left") {
+
jQuery("#sidepanel").stop().show().animate({"left":"0px"}, 150);
+
} else {
+
jQuery("#sidepanel").stop().show().animate({"right":"0px"}, 150);
+
}
+
 
+
} else {
+
 
+
jQuery("#sidepanel_overlay").remove();
+
 
+
if(_pos == "left") {
+
jQuery("#sidepanel").stop().animate({"left":"-300px"}, 300);
+
} else {
+
jQuery("#sidepanel").stop().animate({"right":"-300px"}, 300);
+
}
+
 
+
setTimeout(function() {
+
jQuery("#sidepanel").hide();
+
}, 500);
+
 
+
}
+
+
_sidepanel_overlay();
+
 
+
});
+
// button close
+
jQuery("#sidepanel_close").bind("click", function(e) {
+
e.preventDefault();
+
jQuery("a#sidepanel_btn").trigger('click');
+
});
+
// overlay click
+
function _sidepanel_overlay() {
+
jQuery("#sidepanel_overlay").unbind();
+
jQuery("#sidepanel_overlay").bind("click", function() {
+
jQuery("a#sidepanel_btn").trigger('click');
+
});
+
}
+
// 'esc' key
+
jQuery(document).keyup(function(e) {
+
if(e.keyCode == 27) {
+
if(jQuery("#sidepanel").is(":visible")) {
+
jQuery("a#sidepanel_btn").trigger('click');
+
}
+
}
+
});
+
 
+
/** VERTICAL MENU SHOW|HIDE
+
*************************** **/
+
// RTL supported!
+
if(jQuery("#sidebar_vertical_btn").length > 0) {
+
if(jQuery("body").hasClass('menu-vertical-hide')) {
+
 
+
// Determine the position (left or right?)
+
_paddingStatusL = jQuery("#mainMenu.sidebar-vertical").css('left');
+
_paddingStatusR = jQuery("#mainMenu.sidebar-vertical").css('right');
+
 
+
if(parseInt(_paddingStatusL) < 0) {
+
var _pos = "left";
+
} else
+
 
+
if(parseInt(_paddingStatusR) < 0) {
+
var _pos = "right";
+
}
+
 
+
else {
+
var _pos = "left";
+
}
+
 
+
// Show|Hide Vertical Menu
+
jQuery("#sidebar_vertical_btn").bind("click", function(e) {
+
 
+
_paddingStatus = jQuery("#mainMenu.sidebar-vertical").css(_pos);
+
 
+
if(parseInt(_paddingStatus) < 0) {
+
if(_pos == "right") {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"0px"}, 200);
+
} else {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"0px"}, 200);
+
}
+
} else {
+
if(_pos == "right") {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"-263px"}, 200);
+
} else {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"-263px"}, 200);
+
}
+
}
+
});
+
 
+
// Hide on scroll
+
jQuery(window).scroll(function() {
+
 
+
_paddingStatus = parseInt(jQuery("#mainMenu.sidebar-vertical").css(_pos));
+
 
+
if(_paddingStatus >= 0) {
+
if(_pos == "right") {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"-263px"}, 200);
+
} else {
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"-263px"}, 200);
+
}
+
}
+
 
+
});
+
 
+
}
+
}
+
 
+
// quick cart & search for mobile - top calculate
+
// Quick Cart & top Search Fix (if #topBar exists).
+
if(jQuery("#topBar").length > 0) {
+
jQuery("#topNav ul").addClass('has-topBar');
+
}
+
+
// Hide Cart & Search on Scroll
+
jQuery(window).scroll(function() {
+
if(window.width < 769) {
+
// hide quick cart if visible
+
if (jQuery('#header li.quick-cart div.quick-cart-box').is(":visible")) {
+
jQuery('#header li.quick-cart div.quick-cart-box').fadeOut(0);
+
}
+
// hide search if visible
+
if(jQuery('#header li.search .search-box').is(":visible")) {
+
jQuery('#header .search-box').fadeOut(0);
+
}
+
}
+
});
+
}
+
 
+
 
+
/* Mega Horizontal Navigation */
+
function _megaNavHorizontal() {
+
 
+
// WRAPPER MAIN MENU
+
if(jQuery("#wrapper nav.main-nav").length > 0) {
+
 
+
var _sliderWidth = jQuery("#slider").width(),
+
_sliderHeight = jQuery("#wrapper nav.main-nav").height();
+
 
+
// Submenu widh & height
+
jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":_sliderHeight+"px"});
+
jQuery("#wrapper nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({"width":_sliderWidth+"px"});
+
 
+
// SUBMENUS
+
jQuery("#wrapper nav.main-nav>div>ul>li").bind("click", function(e) {
+
var _this = jQuery(this);
+
 
+
if(!jQuery('div', _this).hasClass('main-nav-open')) {
+
jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").removeClass('main-nav-open');
+
}
+
 
+
jQuery('div', _this).toggleClass('main-nav-open');
+
});
+
 
+
}
+
 
+
 
+
 
+
 
+
 
+
 
+
// HEADER MAIN MENU
+
var _hsliderWidth = jQuery("#header>.container").width() - 278,
+
_hsliderHeight = jQuery("#header nav.main-nav").height();
+
 
+
// Submenu widh & height
+
jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":_hsliderHeight+"px"});
+
jQuery("#header nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({"width":_hsliderWidth+"px"});
+
 
+
 
+
// SUBMENUS
+
jQuery("#header nav.main-nav>div>ul>li").bind("click", function(e) {
+
var _this = jQuery(this);
+
 
+
if(!jQuery('div', _this).hasClass('main-nav-open')) {
+
jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").removeClass('main-nav-open');
+
}
+
 
+
jQuery('div', _this).toggleClass('main-nav-open');
+
});
+
 
+
 
+
 
+
 
+
// HEADER MAIN MENU
+
if(window.width > 767) { //  desktop|tablet
+
 
+
jQuery("#header button.nav-toggle").mouseover(function(e) {
+
e.preventDefault();
+
 
+
_initMainNav();
+
 
+
});
+
 
+
 
+
} else { // mobile
+
 
+
jQuery("#header button.nav-toggle").bind("click", function(e) {
+
e.preventDefault();
+
 
+
_initMainNav();
+
 
+
});
+
 
+
}
+
 
+
        jQuery('body').on('click', '#header button.nav-toggle, #header nav.main-nav', function (e) {
+
            e.stopPropagation();
+
        });
+
 
+
        jQuery("#header button.nav-toggle, #header nav.main-nav").mouseover(function(e) {
+
        e.stopPropagation();
+
        });
+
 
+
 
+
jQuery(document).bind("click", function() {
+
 
+
_hideMainNav();
+
 
+
});
+
 
+
 
+
 
+
function _initMainNav() {
+
 
+
// remove overlay first, no matter what
+
jQuery("#main-nav-overlay").remove();
+
+
// open menu
+
jQuery("#header nav.main-nav").addClass('min-nav-active');
+
 
+
// add overlay
+
jQuery('body').append('<div id="main-nav-overlay"></div>');
+
 
+
// Mobile menu open|close on click
+
jQuery('#header button.nav-toggle-close').bind("click", function() {
+
jQuery("#header nav.main-nav").removeClass('min-nav-active');
+
});
+
 
+
// Close menu on hover
+
        jQuery("#main-nav-overlay, #header").mouseover(function() {
+
 
+
        _hideMainNav();
+
 
+
        });
+
 
+
}
+
 
+
function _hideMainNav() {
+
jQuery("#main-nav-overlay").remove();
+
jQuery("#header nav.main-nav").removeClass('min-nav-active');
+
}
+
 
+
 
+
// Menu Click
+
jQuery("nav.main-nav>div>ul>li a").bind("click", function(e) {
+
var _href = jQuery(this).attr('href');
+
 
+
if(_href == '#') {
+
e.preventDefault();
+
}
+
});
+
}
+
 
+
+
/* 02. Side Nav */
+
function _sideNav() {
+
 
+
 
+
/* Mobile Button */
+
jQuery("div.side-nav").each(function() {
+
var _t = jQuery('ul', this);
+
jQuery('button', this).bind("click", function() {
+
_t.slideToggle(300);
+
});
+
});
+
 
+
 
+
/* Submenus */
+
jQuery("div.side-nav>ul>li>a.dropdown-toggle").bind("click", function(e) {
+
e.preventDefault();
+
 
+
jQuery(this).next('ul').slideToggle(200);
+
jQuery(this).closest('li').toggleClass('active');
+
});
+
 
+
}
+
 
+
 
+
/* Sticky Footer */
+
function _stickyFooter() {
+
if(jQuery("#footer").hasClass('sticky')) {
+
 
+
var footerHeight = 0,
+
footerTop = 0,
+
_footer = jQuery("#footer.sticky");
+
 
+
positionFooter();
+
 
+
function positionFooter() {
+
footerHeight = _footer.height();
+
footerTop = (jQuery(window).scrollTop()+jQuery(window).height()-footerHeight)+"px";
+
 
+
if((jQuery(document.body).height()+footerHeight) > jQuery(window).height()) {
+
_footer.css({
+
position: "absolute"
+
}).stop().animate({
+
top: footerTop
+
},0);
+
} else {
+
_footer.css({position: "static"});
+
}
+
 
+
}
+
 
+
jQuery(window).scroll(positionFooter).resize(positionFooter);
+
 
+
}
+
}
+
+
/** 09. Toggle
+
**************************************************************** **/
+
function _toggle() {
+
 
+
var $_t = this,
+
previewParClosedHeight = 25;
+
 
+
jQuery("div.toggle.active > p").addClass("preview-active");
+
jQuery("div.toggle.active > div.toggle-content").slideDown(400);
+
jQuery("div.toggle > label").click(function(e) {
+
 
+
var parentSection = jQuery(this).parent(),
+
parentWrapper = jQuery(this).parents("div.toggle"),
+
previewPar = false,
+
isAccordion = parentWrapper.hasClass("toggle-accordion");
+
 
+
if(isAccordion && typeof(e.originalEvent) != "undefined") {
+
parentWrapper.find("div.toggle.active > label").trigger("click");
+
}
+
 
+
parentSection.toggleClass("active");
+
 
+
if(parentSection.find("> p").get(0)) {
+
 
+
previewPar = parentSection.find("> p");
+
var previewParCurrentHeight = previewPar.css("height");
+
var previewParAnimateHeight = previewPar.css("height");
+
previewPar.css("height", "auto");
+
previewPar.css("height", previewParCurrentHeight);
+
 
+
}
+
 
+
var toggleContent = parentSection.find("> div.toggle-content");
+
 
+
if(parentSection.hasClass("active")) {
+
 
+
jQuery(previewPar).animate({height: previewParAnimateHeight}, 350, function() {jQuery(this).addClass("preview-active");});
+
toggleContent.slideDown(350);
+
 
+
} else {
+
 
+
jQuery(previewPar).animate({height: previewParClosedHeight}, 350, function() {jQuery(this).removeClass("preview-active");});
+
toggleContent.slideUp(350);
+
 
+
}
+
 
+
});
+
}
+
+
/** Modal Autoload
+
 
+
USAGE:
+
+
<div id="MODAL-ID-REQUIRED" class="modal fade" data-autoload="true" data-autoload-delay="2000">
+
...
+
</div>
+
**************************************************************** **/
+
function _modalAutoLoad() {
+
if(jQuery("div.modal").length > 0) {
+
 
+
jQuery("div.modal").each(function() {
+
var _t = jQuery(this),
+
_id = _t.attr('id'),
+
_autostart = _t.attr('data-autoload') || false;
+
 
+
 
+
// reset allow
+
// localStorage.removeItem(_id);
+
 
+
 
+
if(_id != '') { // rewrite if set to hidden by the user
+
if(localStorage.getItem(_id) == 'hidden') {
+
_autostart = 'false';
+
}
+
}
+
 
+
 
+
if(_autostart == 'true') {
+
 
+
jQuery(window).on("load", function() { // required on load!
+
var _delay = _t.attr('data-autoload-delay') || 1000; // delay when modal apprear
+
 
+
setTimeout(
+
function()  {
+
 
+
_t.modal('toggle');
+
 
+
}, parseInt(_delay));
+
 
+
});
+
 
+
}
+
 
+
// LOCAL STORAGE - DO NOT HIDE ON NEXT PAGE LOAD!
+
jQuery("input.loadModalHide", this).bind("click", function() {
+
var _tt = jQuery(this);
+
+
if(_tt.is(":checked")) {
+
localStorage.setItem(_id, 'hidden');
+
console.log('[Modal Autoload #'+_id+'] Added to localStorage');
+
} else {
+
localStorage.removeItem(_id);
+
console.log('[Modal Autoload #'+_id+'] Removed from localStorage');
+
}
+
 
+
});
+
 
+
});
+
 
+
}
+
}
+
+
/** 05. LightBox
+
**************************************************************** **/
+
function _lightbox() {
+
var _el = jQuery(".lightbox");
+
 
+
if(_el.length > 0) {
+
 
+
loadScript('https://2017.igem.org/Team:Valencia_UPV/Templates:magnificPopupMinJS?action=raw&ctype=text/javascript', function() {
+
 
+
if(typeof(jQuery.magnificPopup) == "undefined") {
+
return false;
+
}
+
 
+
jQuery.extend(true, jQuery.magnificPopup.defaults, {
+
tClose: 'Close',
+
tLoading: 'Loading...',
+
 
+
gallery: {
+
tPrev: 'Previous',
+
tNext: 'Next',
+
tCounter: '%curr% / %total%'
+
},
+
 
+
image: {
+
tError: 'Image not loaded!'
+
},
+
 
+
ajax: {
+
tError: 'Content not loaded!'
+
}
+
});
+
 
+
_el.each(function() {
+
 
+
var _t = jQuery(this),
+
options = _t.attr('data-plugin-options'),
+
config = {},
+
defaults = {
+
type: 'image',
+
fixedContentPos: false,
+
fixedBgPos: false,
+
mainClass: 'mfp-no-margins mfp-with-zoom',
+
closeOnContentClick: true,
+
closeOnBgClick: true,
+
image: {
+
verticalFit: true
+
},
+
 
+
zoom: {
+
enabled: false,
+
duration: 300
+
},
+
 
+
gallery: {
+
enabled: false,
+
navigateByImgClick: true,
+
preload: [0,1],
+
arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
+
tPrev: 'Previous',
+
tNext: 'Next',
+
tCounter: '<span class="mfp-counter">%curr% / %total%</span>'
+
},
+
};
+
 
+
if(_t.data("plugin-options")) {
+
config = jQuery.extend({}, defaults, options, _t.data("plugin-options"));
+
}
+
 
+
jQuery(this).magnificPopup(config);
+
 
+
});
+
 
+
});
+
 
+
}
+
 
+
}
+
+
/** Flickr Widget
+
<div class="widget-flickr clearfix lightbox margin-bottom-60" data-id="37304598@N02" data-limit="16" data-plugin-options='{"delegate": "a", "gallery": {"enabled": true}}'></div>
+
**************************************************************** **/
+
function _widget_flickr() {
+
var _container = jQuery('.widget-flickr');
+
 
+
if(_container.length > 0) {
+
 
+
loadScript('https://2017.igem.org/Team:Valencia_UPV/Templates:jflickrfeedMinJS?action=raw&ctype=text/javascript', function() {
+
 
+
if(jQuery().jflickrfeed) {
+
if(jQuery('.widget-flickr')) {
+
 
+
/** **/
+
_container.each(function() {
+
var _t = jQuery(this),
+
_id = _t.attr('data-id'),
+
_limit = _t.attr('data-limit') || 14;
+
 
+
_t.jflickrfeed({
+
limit: parseInt(_limit),
+
qstrings: {
+
id: _id
+
},
+
itemTemplate: '<li>'+
+
'<a href="{{image}}" title="{{title}}">' +
+
'<img src="{{image_s}}" alt="{{title}}" width="63" height="63" />' +
+
'</a>' +
+
  '</li>'
+
}, function(data) {
+
_lightbox();
+
});
+
+
});
+
/** **/
+
 
+
}
+
}
+
 
+
});
+
+
}
+
 
+
}
+
+
 
+
/* Mobile Check
+
 
+
if( isMobile.any() ) alert('Mobile');
+
if( isMobile.iOS() ) alert('iOS');
+
*/
+
 
+
var isMobile = {
+
    iOS: function() {
+
        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
+
    },
+
    Android: function() {
+
        return navigator.userAgent.match(/Android/i);
+
    },
+
    BlackBerry: function() {
+
        return navigator.userAgent.match(/BlackBerry/i);
+
    },
+
    Opera: function() {
+
        return navigator.userAgent.match(/Opera Mini/i);
+
    },
+
    Windows: function() {
+
        return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
+
    },
+
    any: function() {
+
        return (isMobile.iOS() || isMobile.Android() || isMobile.BlackBerry() || isMobile.Opera() || isMobile.Windows());
+
    }
+
};
+
 
+
// Number Format
+
Number.prototype.formatMoney = function(c, d, t){
+
var n = this,
+
    c = isNaN(c = Math.abs(c)) ? 2 : c,
+
    d = d == undefined ? "." : d,
+
    t = t == undefined ? "," : t,
+
    s = n < 0 ? "-" : "",
+
    i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
+
    j = (j = i.length) > 3 ? j % 3 : 0;
+
  return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
+
};
+
 
+
// scroll
+
function wheel(e) {
+
  e.preventDefault();
+
}
+
 
+
function disable_scroll() {
+
  if (window.addEventListener) {
+
  window.addEventListener('DOMMouseScroll', wheel, false);
+
  }
+
  window.onmousewheel = document.onmousewheel = wheel;
+
}
+
 
+
function enable_scroll() {
+
if (window.removeEventListener) {
+
window.removeEventListener('DOMMouseScroll', wheel, false);
+
}
+
window.onmousewheel = document.onmousewheel = document.onkeydown = null; 
+
}
+
 
+
// overlay
+
function enable_overlay() {
+
jQuery("span.global-overlay").remove(); // remove first!
+
jQuery('body').append('<span class="global-overlay"></span>');
+
}
+
function disable_overlay() {
+
jQuery("span.global-overlay").remove();
+
}
+
+
/* Appear */
+
(function(a){a.fn.appear=function(d,b){var c=a.extend({data:undefined,one:true,accX:0,accY:0},b);return this.each(function(){var g=a(this);g.appeared=false;if(!d){g.trigger("appear",c.data);return}var f=a(window);var e=function(){if(!g.is(":visible")){g.appeared=false;return}var r=f.scrollLeft();var q=f.scrollTop();var l=g.offset();var s=l.left;var p=l.top;var i=c.accX;var t=c.accY;var k=g.height();var j=f.height();var n=g.width();var m=f.width();if(p+k+t>=q&&p<=q+j+t&&s+n+i>=r&&s<=r+m+i){if(!g.appeared){g.trigger("appear",c.data)}}else{g.appeared=false}};var h=function(){g.appeared=true;if(c.one){f.unbind("scroll",e);var j=a.inArray(e,a.fn.appear.checks);if(j>=0){a.fn.appear.checks.splice(j,1)}}d.apply(this,arguments)};if(c.one){g.one("appear",c.data,h)}else{g.bind("appear",c.data,h)}f.scroll(e);a.fn.appear.checks.push(e);(e)()})};a.extend(a.fn.appear,{checks:[],timeout:null,checkAll:function(){var b=a.fn.appear.checks.length;if(b>0){while(b--){(a.fn.appear.checks[b])()}}},run:function(){if(a.fn.appear.timeout){clearTimeout(a.fn.appear.timeout)}a.fn.appear.timeout=setTimeout(a.fn.appear.checkAll,20)}});a.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(c,d){var b=a.fn[d];if(b){a.fn[d]=function(){var e=b.apply(this,arguments);a.fn.appear.run();return e}}})})(jQuery);
+
 
+
/* Parallax */
+
!function(n){n.fn.parallax=function(n,t,e){function o(){var o=jQuery(window).scrollTop();r=e?function(n){return n.outerHeight(!0)}:function(n){return n.height()},i.each(function(){var e=jQuery(this),i=e.offset().top,h=r(e);if(!(o>i+h||i>o+window.height)){var l=Math.round((u-o)*t);e.css("backgroundPosition",n+" "+l+"px")}})}var r,u,i=jQuery(this);(arguments.length<1||null===n)&&(n="50%"),(arguments.length<2||null===t)&&(t=.1),(arguments.length<3||null===e)&&(e=!0),i.each(function(){u=i.offset().top,u<window.height&&(u=0)}),jQuery(window).bind("scroll",o).resize(o),o()}}(jQuery);
+
 
+
 
+
/* jQuery Easing v1.3 */
+
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
+
 
+
/* WOW - v1.0.3 - 2015-01-14 */
+
(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(a):void 0},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
+
 
+
/* Modernizr 3.3.1 */
+
!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)a=e[i],s=a.split("."),1===s.length?Modernizr[s[0]]=o:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=o),C.push((o?"":"no-")+s.join("-"))}}function i(e){var t=w.className,n=Modernizr._config.classPrefix||"";if(S&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),S?w.className.baseVal=t:w.className=t)}function a(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):S?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(e,t){if("object"==typeof e)for(var n in e)N(e,n)&&s(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;t="function"==typeof t?t():t,1==r.length?Modernizr[r[0]]=t:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=t),i([(t&&0!=t?"":"no-")+r.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function l(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function c(e,t){return!!~(""+e).indexOf(t)}function u(){var e=t.body;return e||(e=a(S?"svg":"body"),e.fake=!0),e}function f(e,n,r,o){var i,s,l,c,f="modernizr",d=a("div"),p=u();if(parseInt(r,10))for(;r--;)l=a("div"),l.id=o?o[r]:f+(r+1),d.appendChild(l);return i=a("style"),i.type="text/css",i.id="s"+f,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=f,p.fake&&(p.style.background="",p.style.overflow="hidden",c=w.style.overflow,w.style.overflow="hidden",w.appendChild(p)),s=n(d,e),p.fake?(p.parentNode.removeChild(p),w.style.overflow=c,w.offsetHeight):d.parentNode.removeChild(d),!!s}function d(e,t){return function(){return e.apply(t,arguments)}}function p(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?d(o,n||t):o);return!1}function m(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function h(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(m(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+m(t[o])+":"+r+")");return i=i.join(" or "),f("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function v(e,t,o,i){function s(){f&&(delete A.style,delete A.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var u=h(e,o);if(!r(u,"undefined"))return u}for(var f,d,p,m,v,g=["modernizr","tspan","samp"];!A.style&&g.length;)f=!0,A.modElem=a(g.shift()),A.style=A.modElem.style;for(p=e.length,d=0;p>d;d++)if(m=e[d],v=A.style[m],c(m,"-")&&(m=l(m)),A.style[m]!==n){if(i||r(o,"undefined"))return s(),"pfx"==t?m:!0;try{A.style[m]=o}catch(y){}if(A.style[m]!=v)return s(),"pfx"==t?m:!0}return s(),!1}function g(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?v(s,t,o,i):(s=(e+" "+T.join(a+" ")+a).split(" "),p(s,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var C=[],b=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=E,Modernizr=new Modernizr;var _=E._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];E._prefixes=_;var w=t.documentElement,S="svg"===w.nodeName.toLowerCase();S||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,c(t)}function i(e){var t=y[e[v]];return t||(t={},g++,e[v]=g,y[g]=t),t}function a(e,n,r){if(n||(n=t),f)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():h.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||m.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),f)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function c(e){e||(e=t);var r=i(e);return!C.shivCSS||u||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),f||l(e,r),e}var u,f,d="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",g=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",u="hidden"in e,f=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,f=!0}}();var C={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:d,shivCSS:p.shivCSS!==!1,supportsUnknownElements:f,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:c,createElement:a,createDocumentFragment:s,addElements:o};e.html5=C,c(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t);var x="Moz O ms Webkit",T=E._config.usePrefixes?x.toLowerCase().split(" "):[];E._domPrefixes=T;var P=function(){function e(e,t){var o;return e?(t&&"string"!=typeof t||(t=a(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=a("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o):!1}var r=!("onblur"in t.documentElement);return e}();E.hasEvent=P,Modernizr.addTest("video",function(){var e=a("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t});var N;!function(){var e={}.hasOwnProperty;N=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e<n.length;e++)(r=n[e])(t)},0),delete this._l[e]}},Modernizr._q.push(function(){E.addTest=s});var j="CSS"in e&&"supports"in e.CSS,k="supportsCSS"in e;Modernizr.addTest("supports",j||k);var z=E._config.usePrefixes?x.split(" "):[];E._cssomPrefixes=z;var F=function(t){var r,o=_.length,i=e.CSSRule;if("undefined"==typeof i)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+t;for(var a=0;o>a;a++){var s=_[a],l=s.toUpperCase()+"_"+r;if(l in i)return"@-"+s.toLowerCase()+"-"+t}return!1};E.atRule=F;var L=E.testStyles=f,$={elem:a("modernizr")};Modernizr._q.push(function(){delete $.elem});var A={style:$.elem.style};Modernizr._q.unshift(function(){delete A.style});E.testProp=function(e,t,r){return v([e],n,t,r)};E.testAllProps=g;E.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=l(e)),t?g(e,t,n):g(e,"pfx"))};E.testAllProps=y,Modernizr.addTest("csstransitions",y("transition","all",!0)),Modernizr.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in w.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",L(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),o(),i(C),delete E.addTest,delete E.addAsyncTest;for(var M=0;M<Modernizr._q.length;M++)Modernizr._q[M]();e.Modernizr=Modernizr}(window,document);
+
 
+
/* TETHER - used by bootstrap */
+
function _loadTetherBS4() {
+
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),o={};for(var n in e)o[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=i(r);o.top+=s.top,o.bottom+=s.top,o.left+=s.left,o.right+=s.left}}return o}function r(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function s(){A&&document.body.removeChild(A),A=null}function a(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n=i(t),r=P();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function f(t){return t.offsetParent||document.documentElement}function l(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");h(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return{width:i,height:i}}function h(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function u(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=c(t).replace(o," ");g(t,n)}}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{u(t,e);var o=c(t)+(" "+e);g(t,o)}}function p(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function g(t,e){t.setAttribute("class",e)}function m(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&p(t,o)&&u(t,o)}),e.forEach(function(e){p(t,e)||d(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function C(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function O(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=a(e),n=o,i=getComputedStyle(e);if(e=[n.left,n.top,o.width+n.left,o.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}$.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var E=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),x=void 0;"undefined"==typeof x&&(x={modules:[]});var A=null,T=function(){var t=0;return function(){return++t}}(),S={},P=function(){var t=A;t||(t=document.createElement("div"),t.setAttribute("data-tether-id",T()),h(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),A=t);var e=t.getAttribute("data-tether-id");return"undefined"==typeof S[e]&&(S[e]=i(t),M(function(){delete S[e]})),S[e]},W=[],M=function(t){W.push(t)},_=function(){for(var t=void 0;t=W.pop();)t()},k=function(){function t(){n(this,t)}return E(t,[{key:"on",value:function(t,e,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,n=Array(o>1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,n),f?this.bindings[t].splice(e,1):++e}}}}]),t}();x.Utils={getActualBoundingClientRect:i,getScrollParents:r,getBounds:a,getOffsetParent:f,extend:h,addClass:d,removeClass:u,hasClass:p,updateClasses:m,defer:M,flush:_,uniqueId:T,Evented:k,getScrollBarSize:l,removeUtilElements:s};var B=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),z=function(t,e,o){for(var n=!0;n;){var i=t,r=e,s=o;n=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=r,o=s,n=!0,a=l=void 0}};if("undefined"==typeof x)throw new Error("You must include the utils.js file before tether.js");var j=x.Utils,r=j.getScrollParents,a=j.getBounds,f=j.getOffsetParent,h=j.extend,d=j.addClass,u=j.removeClass,m=j.updateClasses,M=j.defer,_=j.flush,l=j.getScrollBarSize,s=j.removeUtilElements,Y=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var n=e[o];if(void 0!==t.style[n])return n}}(),L=[],D=function(){L.forEach(function(t){t.position(!1)}),_()};!function(){var t=null,e=null,o=null,n=function i(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&b()-t<10||(null!=o&&(clearTimeout(o),o=null),t=b(),D(),e=b()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var X={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=X[e.left]),"auto"===n&&(n=F[e.top]),{left:o,top:n}},U=function(t){var e=t.left,o=t.top;return"undefined"!=typeof H[t.left]&&(e=H[t.left]),"undefined"!=typeof H[t.top]&&(o=H[t.top]),{left:e,top:o}},V=function(t){var e=t.split(" "),o=B(e,2),n=o[0],i=o[1];return{top:n,left:i}},R=V,q=function(t){function e(t){var o=this;n(this,e),z(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return v(e,t),E(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=h(n,t);var i=this.options,s=i.element,a=i.target,f=i.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=R(this.options.targetAttachment),this.attachment=R(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return a(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=a(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=a(o);var n=getComputedStyle(o),i=o.scrollWidth>o.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>s&&this.target===document.body&&(f=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-s);return e.top=l*(s-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,o){e===t&&L.splice(o,1)}),0===L.length&&s()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),M(function(){"undefined"!=typeof o._addAttachClasses&&(m(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&m(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return a(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var s=this.lastSize;i=s.width,r=s.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),u=h,d=C(U(this.attachment),{width:i,height:r}),p=C(U(o),u),c=C(this.offset,{width:i,height:r}),g=C(this.targetOffset,u);d=w(d,c),p=w(p,g);for(var m=h.left+p.left-d.left,v=h.top+p.top-d.top,y=0;y<x.modules.length;++y){var b=x.modules[y],O=b.position.call(this,{left:m,top:v,targetAttachment:o,targetPos:h,elementPos:n,offset:d,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:S,attachment:this.attachment});if(O===!1)return!1;"undefined"!=typeof O&&"object"==typeof O&&(v=O.top,m=O.left)}var E={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-i+innerWidth}},A=this.target.ownerDocument,T=A.defaultView,S=void 0;return A.body.scrollWidth>T.innerWidth&&(S=this.cache("scrollbar-size",l),E.viewport.bottom-=S.height),A.body.scrollHeight>T.innerHeight&&(S=this.cache("scrollbar-size",l),E.viewport.right-=S.width),(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position))&&(E.page.bottom=A.body.scrollHeight-v-r,E.page.right=A.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return f(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return a(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-i.width+r.right,o.bottom=A.body.scrollHeight-o.top-i.height+r.bottom,E.page.top>=o.top+r.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+r.left&&E.page.right>=o.right){var s=e.scrollTop,l=e.scrollLeft;E.offset={top:E.page.top-o.top+s-r.top,left:E.page.left-o.left+l-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),e&&_(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s<this.history.length;++s){var a=this.history[s];if("undefined"!=typeof a[n]&&!y(a[n][i],t[n][i])){r=!0;break}}r||(o[n][i]=!0)}}var l={top:"",left:"",right:"",bottom:""},u=function(t,o){var n="undefined"!=typeof e.options.optimizations,i=n?e.options.optimizations.gpu:null;if(i!==!1){var r=void 0,s=void 0;t.top?(l.top=0,r=o.top):(l.bottom=0,r=-o.bottom),t.left?(l.left=0,s=o.left):(l.right=0,s=-o.right),l[Y]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==Y&&(l[Y]+=" translateZ(0)")}else t.top?l.top=o.top+"px":l.bottom=o.bottom+"px",t.left?l.left=o.left+"px":l.right=o.right+"px"},d=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(l.position="absolute",u(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(l.position="fixed",u(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){l.position="absolute";var n=e.cache("target-offsetparent",function(){return f(e.target)});f(e.element)!==n&&M(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),u(o.offset,t.offset),d=!0}():(l.position="absolute",u({top:!0,left:!0},t.page)),!d){for(var p=!0,c=this.element.parentNode;c&&1===c.nodeType&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var g={},m=!1;for(var i in l){var v=l[i],b=this.element.style[i];b!==v&&(m=!0,g[i]=v)}m&&M(function(){h(e.element.style,g)})}}}]),e}(k);q.modules=[],x.position=D;var I=h(q,x),B=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),j=x.Utils,a=j.getBounds,h=j.extend,m=j.updateClasses,M=j.defer,$=["left","top","right","bottom"];x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return a(e.element)}),s=r.height,f=r.width;if(0===f&&0===s&&"undefined"!=typeof this.lastSize){var l=this.lastSize;f=l.width,s=l.height}var u=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=u.height,p=u.width,c=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&c.push(e),o&&c.push(o)}),c.forEach(function(t){["left","top","right","bottom"].forEach(function(e){c.push(t+"-"+e)})});var g=[],v=h({},i),y=h({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,a=t.attachment,l=t.pin;"undefined"==typeof a&&(a="");var h=void 0,u=void 0;if(a.indexOf(" ")>=0){var c=a.split(" "),m=B(c,2);u=m[0],h=m[1]}else h=u=a;var b=O(e,r);("target"===u||"both"===u)&&(o<b[1]&&"top"===v.top&&(o+=d,v.top="bottom"),o+s>b[3]&&"bottom"===v.top&&(o-=d,v.top="top")),"together"===u&&("top"===v.top&&("bottom"===y.top&&o<b[1]?(o+=d,v.top="bottom",o+=s,y.top="top"):"top"===y.top&&o+s>b[3]&&o-(s-d)>=b[1]&&(o-=s-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+s>b[3]?(o-=d,v.top="top",o-=s,y.top="bottom"):"bottom"===y.top&&o<b[1]&&o+(2*s-d)<=b[3]&&(o+=s-d,v.top="top",y.top="top")),"middle"===v.top&&(o+s>b[3]&&"top"===y.top?(o-=s,y.top="bottom"):o<b[1]&&"bottom"===y.top&&(o+=s,y.top="top"))),("target"===h||"both"===h)&&(n<b[0]&&"left"===v.left&&(n+=p,v.left="right"),n+f>b[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(n<b[0]&&"left"===v.left?"right"===y.left?(n+=p,v.left="right",n+=f,y.left="left"):"left"===y.left&&(n+=p,v.left="right",n-=f,y.left="right"):n+f>b[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):n<b[0]&&"right"===y.left&&(n+=f,y.left="left"))),("element"===u||"both"===u)&&(o<b[1]&&"bottom"===y.top&&(o+=s,y.top="top"),o+s>b[3]&&"top"===y.top&&(o-=s,y.top="bottom")),("element"===h||"both"===h)&&(n<b[0]&&("right"===y.left?(n+=f,y.left="left"):"center"===y.left&&(n+=f/2,y.left="left")),n+f>b[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],C=[];o<b[1]&&(l.indexOf("top")>=0?(o=b[1],w.push("top")):C.push("top")),o+s>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-s,w.push("bottom")):C.push("bottom")),n<b[0]&&(l.indexOf("left")>=0?(n=b[0],w.push("left")):C.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):C.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),g.push(t),w.forEach(function(e){g.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),g.push(t),C.forEach(function(e){g.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,g,c),m(e.element,g,c)}),{top:o,left:n}}});var j=x.Utils,a=j.getBounds,m=j.updateClasses,M=j.defer;x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return a(e.element)}),r=i.height,s=i.width,f=this.getTargetBounds(),l=o+r,h=n+s,u=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&u.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&u.push(t)});var d=[],p=[],c=["left","top","right","bottom"];return d.push(this.getClass("abutted")),c.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&p.push(this.getClass("abutted")),u.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,p,d),m(e.element,p,d)}),!0}});var B=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=B(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),I});
+
}
+

Latest revision as of 19:37, 24 October 2017

function Init(t){1!=t&&(_afterResize(),_slider_full(),_topNav(),_megaNavHorizontal(),_sideNav(),_stickyFooter()),_toggle(),_modalAutoLoad(),jQuery("a[data-toggle=tooltip], button[data-toggle=tooltip], span[data-toggle=tooltip]").tooltip()}function _afterResize(){jQuery(window).on("load",function(){"use strict";jQuery(window).resize(function(){window.afterResizeApp&&clearTimeout(window.afterResizeApp),window.afterResizeApp=setTimeout(function(){_slider_full(),window.width=jQuery(window).width(),window.height=jQuery(window).height(),jQuery(".flexslider").length>0&&jQuery(".flexslider").resize()},300)})})}function loadScript(t,e){if(_arr[t])e&&e();else{_arr[t]=!0;var i=document.getElementsByTagName("body")[0],n=document.createElement("script");n.type="text/javascript",n.src=t,n.onload=e,i.appendChild(n)}}function _slider_full(){_headerHeight=0,jQuery("#header").hasClass("transparent")||jQuery("#header").hasClass("translucent")?_headerHeight=0:(_headerHeight=jQuery("#header").outerHeight()||0,jQuery("#topBar").length>0&&(_topBarHeight=jQuery("#topBar").outerHeight()||0,_headerHeight+=_topBarHeight)),_screenHeight=jQuery(window).height()-_headerHeight,jQuery("#header").hasClass("static")&&(_screenHeight=jQuery(window).height()),jQuery("#slider").hasClass("halfheight")&&jQuery("#slider.halfheight").height(_screenHeight/2),jQuery("#slider").hasClass("thirdheight")&&jQuery("#slider.thirdheight").height(_screenHeight/1.5),jQuery("#slider").hasClass("fullheight")&&(jQuery("#slider.fullheight").height(_screenHeight),jQuery("#slider.fullheight-min").css({"min-height":_screenHeight+"px"})),window.width<960&&jQuery("#slider.mobile-fullheight").height(_screenHeight)}function _topNav(){function t(){(o=jQuery(document).scrollTop())>100?jQuery("#toTop").is(":hidden")&&jQuery("#toTop").show():jQuery("#toTop").is(":visible")&&jQuery("#toTop").hide()}function e(){jQuery("#sidepanel_overlay").unbind(),jQuery("#sidepanel_overlay").bind("click",function(){jQuery("a#sidepanel_btn").trigger("click")})}window.scrollTop=0,window._cmScroll=0;var i=jQuery("#header");jQuery(window).scroll(function(){t()});var n=!1;if(jQuery("#topMain a.dropdown-toggle").bind("click",function(t){"#"==jQuery(this).attr("href")&&t.preventDefault(),n=jQuery(this).parent().hasClass("resp-active"),jQuery("#topMain").find(".resp-active").removeClass("resp-active"),n||jQuery(this).parents("li").addClass("resp-active")}),jQuery("li.search i.fa").click(function(){jQuery("#header .search-box").is(":visible")?jQuery("#header .search-box").fadeOut(300):(jQuery(".search-box").fadeIn(300),jQuery("#header .search-box form input").focus(),jQuery("#header li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("#header li.quick-cart div.quick-cart-box").fadeOut(300))}),0!=jQuery("#header li.search i.fa").size()&&(jQuery("#header .search-box, #header li.search i.fa").on("click",function(t){t.stopPropagation()}),jQuery("body").on("click",function(){jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(300)})),jQuery(document).bind("click",function(){jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(300)}),jQuery("#closeSearch").bind("click",function(t){t.preventDefault(),jQuery("#header .search-box").fadeOut(300)}),jQuery("button#page-menu-mobile").bind("click",function(){jQuery(this).next("ul").slideToggle(150)}),jQuery("li.quick-cart>a").click(function(t){t.preventDefault();var e=jQuery("li.quick-cart div.quick-cart-box");e.is(":visible")?e.fadeOut(300):(e.fadeIn(300),jQuery("li.search .search-box").is(":visible")&&jQuery(".search-box").fadeOut(300))}),0!=jQuery("li.quick-cart>a").size()&&(jQuery("li.quick-cart").on("click",function(t){t.stopPropagation()}),jQuery("body").on("click",function(){jQuery("li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("li.quick-cart div.quick-cart-box").fadeOut(300)})),jQuery("#page-menu ul.menu-scrollTo>li").bind("click",function(t){var e=jQuery("a",this).attr("href");jQuery("a",this).hasClass("external")||(t.preventDefault(),jQuery("#page-menu ul.menu-scrollTo>li").removeClass("active"),jQuery(this).addClass("active"),jQuery(e).length>0&&(_padding_top=0,jQuery("#header").hasClass("sticky")&&(_padding_top=jQuery(e).css("padding-top"),_padding_top=_padding_top.replace("px","")),jQuery("html,body").animate({scrollTop:jQuery(e).offset().top-_padding_top},800,"easeInOutExpo")))}),window.currentScroll=0,jQuery("button.btn-mobile").bind("click",function(t){t.preventDefault(),jQuery(this).toggleClass("btn-mobile-active"),jQuery("html").removeClass("noscroll"),jQuery("#menu-overlay").remove(),jQuery("#topNav div.nav-main-collapse").hide(0),jQuery(this).hasClass("btn-mobile-active")?(jQuery("#topNav div.nav-main-collapse").show(0),jQuery("html").addClass("noscroll"),jQuery("body").append(''),window.currentScroll=jQuery(window).scrollTop()):jQuery("html,body").animate({scrollTop:currentScroll},300,"easeInOutExpo")}),i.hasClass("bottom"))i.addClass("dropup"),window.homeHeight=jQuery(window).outerHeight()-55,i.hasClass("sticky")&&(window.isOnTop=!0,jQuery(window).scroll(function(){jQuery(document).scrollTop()>window.homeHeight/2?i.removeClass("dropup"):i.addClass("dropup")}),jQuery(window).scroll(function(){jQuery(document).scrollTop()>window.homeHeight?!0===window.isOnTop&&(jQuery("#header").addClass("fixed"),i.removeClass("dropup"),window.isOnTop=!1):!1===window.isOnTop&&(jQuery("#header").removeClass("fixed"),i.addClass("dropup"),window.isOnTop=!0)}),jQuery(window).resize(function(){window.homeHeight=jQuery(window).outerHeight()}));else if(i.hasClass("sticky")){if(_topBar_H=jQuery("#topBar").outerHeight()||0,window.width<=992&&_topBar_H<1){o=jQuery(document).scrollTop();_header_H=i.outerHeight()||0,i.addClass("fixed"),jQuery("body").css({"padding-top":_header_H+"px"})}jQuery(window).scroll(function(){if(window.width>992&&_topBar_H<1||_topBar_H>0){var t=jQuery(document).scrollTop();t>_topBar_H?(i.addClass("fixed"),_header_H=i.outerHeight()||0,i.hasClass("transparent")||i.hasClass("translucent")||jQuery("body").css({"padding-top":_header_H+"px"})):(i.hasClass("transparent")||i.hasClass("translucent")||jQuery("body").css({"padding-top":"0px"}),i.removeClass("fixed"))}if(i.hasClass("transparent")){var e=jQuery("#topNav div.nav-main-collapse"),n=e.attr("data-switch-default")||"",o=e.attr("data-switch-scroll")||"";""==n&&""==o||(t>0?window._cmScroll<1&&(e.removeClass(n,o).addClass(o),window._cmScroll=1):t<1&&(e.removeClass(n,o).addClass(n),window._cmScroll=0))}})}else if(i.hasClass("static")&&i.hasClass("transparent")){if(_topBar_H=jQuery("#topBar").outerHeight()||0,window.width<=992&&_topBar_H<1){var o=jQuery(document).scrollTop();_header_H=i.outerHeight()||0,i.addClass("fixed")}jQuery(window).scroll(function(){(window.width>992&&_topBar_H<1||_topBar_H>0)&&(jQuery(document).scrollTop()>_topBar_H?(i.addClass("fixed"),_header_H=i.outerHeight()||0):i.removeClass("fixed"))})}else i.hasClass("static");if(jQuery("#slidetop a.slidetop-toggle").bind("click",function(){jQuery("#slidetop .container").slideToggle(150,function(){jQuery("#slidetop .container").is(":hidden")?jQuery("#slidetop").removeClass("active"):jQuery("#slidetop").addClass("active")})}),jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#slidetop").hasClass("active")&&jQuery("#slidetop .container").slideToggle(150,function(){jQuery("#slidetop").removeClass("active")})}),jQuery("a#sidepanel_btn").bind("click",function(t){t.preventDefault(),r="right",jQuery("#sidepanel").hasClass("sidepanel-inverse")&&(r="left"),jQuery("#sidepanel").is(":hidden")?(jQuery("body").append(''),"left"==r?jQuery("#sidepanel").stop().show().animate({left:"0px"},150):jQuery("#sidepanel").stop().show().animate({right:"0px"},150)):(jQuery("#sidepanel_overlay").remove(),"left"==r?jQuery("#sidepanel").stop().animate({left:"-300px"},300):jQuery("#sidepanel").stop().animate({right:"-300px"},300),setTimeout(function(){jQuery("#sidepanel").hide()},500)),e()}),jQuery("#sidepanel_close").bind("click",function(t){t.preventDefault(),jQuery("a#sidepanel_btn").trigger("click")}),jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#sidepanel").is(":visible")&&jQuery("a#sidepanel_btn").trigger("click")}),jQuery("#sidebar_vertical_btn").length>0&&jQuery("body").hasClass("menu-vertical-hide")){if(_paddingStatusL=jQuery("#mainMenu.sidebar-vertical").css("left"),_paddingStatusR=jQuery("#mainMenu.sidebar-vertical").css("right"),parseInt(_paddingStatusL)<0)r="left";else if(parseInt(_paddingStatusR)<0)r="right";else var r="left";jQuery("#sidebar_vertical_btn").bind("click",function(t){_paddingStatus=jQuery("#mainMenu.sidebar-vertical").css(r),parseInt(_paddingStatus)<0?"right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"0px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"0px"},200):"right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"-263px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"-263px"},200)}),jQuery(window).scroll(function(){_paddingStatus=parseInt(jQuery("#mainMenu.sidebar-vertical").css(r)),_paddingStatus>=0&&("right"==r?jQuery("#mainMenu.sidebar-vertical").stop().animate({right:"-263px"},200):jQuery("#mainMenu.sidebar-vertical").stop().animate({left:"-263px"},200))})}jQuery("#topBar").length>0&&jQuery("#topNav ul").addClass("has-topBar"),jQuery(window).scroll(function(){window.width<769&&(jQuery("#header li.quick-cart div.quick-cart-box").is(":visible")&&jQuery("#header li.quick-cart div.quick-cart-box").fadeOut(0),jQuery("#header li.search .search-box").is(":visible")&&jQuery("#header .search-box").fadeOut(0))})}function _megaNavHorizontal(){function t(){jQuery("#main-nav-overlay").remove(),jQuery("#header nav.main-nav").addClass("min-nav-active"),jQuery("body").append(''),jQuery("#header button.nav-toggle-close").bind("click",function(){jQuery("#header nav.main-nav").removeClass("min-nav-active")}),jQuery("#main-nav-overlay, #header").mouseover(function(){e()})}function e(){jQuery("#main-nav-overlay").remove(),jQuery("#header nav.main-nav").removeClass("min-nav-active")}if(jQuery("#wrapper nav.main-nav").length>0){var i=jQuery("#slider").width(),n=jQuery("#wrapper nav.main-nav").height();jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":n+"px"}),jQuery("#wrapper nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({width:i+"px"}),jQuery("#wrapper nav.main-nav>div>ul>li").bind("click",function(t){var e=jQuery(this);jQuery("div",e).hasClass("main-nav-open")||jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").removeClass("main-nav-open"),jQuery("div",e).toggleClass("main-nav-open")})}var o=jQuery("#header>.container").width()-278,r=jQuery("#header nav.main-nav").height();jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":r+"px"}),jQuery("#header nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({width:o+"px"}),jQuery("#header nav.main-nav>div>ul>li").bind("click",function(t){var e=jQuery(this);jQuery("div",e).hasClass("main-nav-open")||jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").removeClass("main-nav-open"),jQuery("div",e).toggleClass("main-nav-open")}),window.width>767?jQuery("#header button.nav-toggle").mouseover(function(e){e.preventDefault(),t()}):jQuery("#header button.nav-toggle").bind("click",function(e){e.preventDefault(),t()}),jQuery("body").on("click","#header button.nav-toggle, #header nav.main-nav",function(t){t.stopPropagation()}),jQuery("#header button.nav-toggle, #header nav.main-nav").mouseover(function(t){t.stopPropagation()}),jQuery(document).bind("click",function(){e()}),jQuery("nav.main-nav>div>ul>li a").bind("click",function(t){"#"==jQuery(this).attr("href")&&t.preventDefault()})}function _sideNav(){jQuery("div.side-nav").each(function(){var t=jQuery("ul",this);jQuery("button",this).bind("click",function(){t.slideToggle(300)})}),jQuery("div.side-nav>ul>li>a.dropdown-toggle").bind("click",function(t){t.preventDefault(),jQuery(this).next("ul").slideToggle(200),jQuery(this).closest("li").toggleClass("active")})}function _stickyFooter(){function t(){e=n.height(),i=jQuery(window).scrollTop()+jQuery(window).height()-e+"px",jQuery(document.body).height()+e>jQuery(window).height()?n.css({position:"absolute"}).stop().animate({top:i},0):n.css({position:"static"})}if(jQuery("#footer").hasClass("sticky")){var e=0,i=0,n=jQuery("#footer.sticky");t(),jQuery(window).scroll(t).resize(t)}}function _toggle(){jQuery("div.toggle.active > p").addClass("preview-active"),jQuery("div.toggle.active > div.toggle-content").slideDown(400),jQuery("div.toggle > label").click(function(t){var e=jQuery(this).parent(),i=jQuery(this).parents("div.toggle"),n=!1;if(i.hasClass("toggle-accordion")&&void 0!==t.originalEvent&&i.find("div.toggle.active > label").trigger("click"),e.toggleClass("active"),e.find("> p").get(0)){var o=(n=e.find("> p")).css("height"),r=n.css("height");n.css("height","auto"),n.css("height",o)}var a=e.find("> div.toggle-content");e.hasClass("active")?(jQuery(n).animate({height:r},350,function(){jQuery(this).addClass("preview-active")}),a.slideDown(350)):(jQuery(n).animate({height:25},350,function(){jQuery(this).removeClass("preview-active")}),a.slideUp(350))})}function _modalAutoLoad(){jQuery("div.modal").length>0&&jQuery("div.modal").each(function(){var t=jQuery(this),e=t.attr("id"),i=t.attr("data-autoload")||!1;""!=e&&"hidden"==localStorage.getItem(e)&&(i="false"),"true"==i&&jQuery(window).on("load",function(){var e=t.attr("data-autoload-delay")||1e3;setTimeout(function(){t.modal("toggle")},parseInt(e))}),jQuery("input.loadModalHide",this).bind("click",function(){jQuery(this).is(":checked")?(localStorage.setItem(e,"hidden"),console.log("[Modal Autoload #"+e+"] Added to localStorage")):(localStorage.removeItem(e),console.log("[Modal Autoload #"+e+"] Removed from localStorage"))})})}function _lightbox(){var t=jQuery(".lightbox");t.length>0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:magnificPopupMinJS?action=raw&ctype=text/javascript",function(){if(void 0===jQuery.magnificPopup)return!1;jQuery.extend(!0,jQuery.magnificPopup.defaults,{tClose:"Close",tLoading:"Loading...",gallery:{tPrev:"Previous",tNext:"Next",tCounter:"%curr% / %total%"},image:{tError:"Image not loaded!"},ajax:{tError:"Content not loaded!"}}),t.each(function(){var t=jQuery(this),e=t.attr("data-plugin-options"),i={},n={type:"image",fixedContentPos:!1,fixedBgPos:!1,mainClass:"mfp-no-margins mfp-with-zoom",closeOnContentClick:!0,closeOnBgClick:!0,image:{verticalFit:!0},zoom:{enabled:!1,duration:300},gallery:{enabled:!1,navigateByImgClick:!0,preload:[0,1],arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',tPrev:"Previous",tNext:"Next",tCounter:'%curr% / %total%'}};t.data("plugin-options")&&(i=jQuery.extend({},n,e,t.data("plugin-options"))),jQuery(this).magnificPopup(i)})})}function _widget_flickr(){var t=jQuery(".widget-flickr");t.length>0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:jflickrfeedMinJS?action=raw&ctype=text/javascript",function(){jQuery().jflickrfeed&&jQuery(".widget-flickr")&&t.each(function(){var t=jQuery(this),e=t.attr("data-id"),i=t.attr("data-limit")||14;t.jflickrfeed({limit:parseInt(i),qstrings:{id:e},itemTemplate:'
  • <a href="Template:Image" title="Template:Title"><img src="Template:Image s" alt="Template:Title" width="63" height="63" /></a>
  • '},function(t){_lightbox()})})})}function wheel(t){t.preventDefault()}function disable_scroll(){window.addEventListener&&window.addEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=wheel}function enable_scroll(){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",wheel,!1),window.onmousewheel=document.onmousewheel=document.onkeydown=null}function enable_overlay(){jQuery("span.global-overlay").remove(),jQuery("body").append('')}function disable_overlay(){jQuery("span.global-overlay").remove()}function _loadTetherBS4(){!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=t.getBoundingClientRect(),i={};for(var n in e)i[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var a=o(r);i.top+=a.top,i.bottom+=a.top,i.left+=a.left,i.right+=a.left}}return i}function r(t){var e=(getComputedStyle(t)||{}).position,i=[];if("fixed"===e)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var o=void 0;try{o=getComputedStyle(n)}catch(t){}if(void 0===o||null===o)return i.push(n),i;var r=o,a=r.overflow,s=r.overflowX,l=r.overflowY;/(auto|scroll)/.test(a+l+s)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(o.position)>=0)&&i.push(n)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){_&&document.body.removeChild(_),_=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var i=e.documentElement,n=o(t),r=S();return n.top-=r.top,n.left-=r.left,void 0===n.width&&(n.width=document.body.scrollWidth-n.left-n.right),void 0===n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function l(t){return t.offsetParent||document.documentElement}function u(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;i===n&&(n=e.clientWidth),document.body.removeChild(e);var o=i-n;return{width:o,height:o}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}),t}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var i=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=p(t).replace(i," ");v(t,n)}}function h(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{d(t,e);var i=p(t)+" "+e;v(t,i)}}function f(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=p(t);return new RegExp("(^| )"+e+"( |$)","gi").test(i)}function p(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function v(t,e){t.setAttribute("class",e)}function g(t,e,i){i.forEach(function(i){-1===e.indexOf(i)&&f(t,i)&&d(t,i)}),e.forEach(function(e){f(t,e)||h(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+i>=e&&e>=t-i}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,i=Array(e),n=0;e>n;n++)i[n]=arguments[n];return i.forEach(function(e){var i=e.top,n=e.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=i,t.left+=n}),t}function j(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function Q(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,i=s(e),n=i,o=getComputedStyle(e);if(e=[n.left,n.top,i.width+n.left,i.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}X.forEach(function(t,i){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?e[i]+=parseFloat(o["border"+t+"Width"]):e[i]-=parseFloat(o["border"+t+"Width"])})}(),e}var C=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=void 0;void 0===x&&(x={modules:[]});var _=null,O=function(){var t=0;return function(){return++t}}(),k={},S=function(){var t=_;t||((t=document.createElement("div")).setAttribute("data-tether-id",O()),c(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),_=t);var e=t.getAttribute("data-tether-id");return void 0===k[e]&&(k[e]=o(t),M(function(){delete k[e]})),k[e]},E=[],M=function(t){E.push(t)},T=function(){for(var t=void 0;t=E.pop();)t()},P=function(){function t(){n(this,t)}return C(t,[{key:"on",value:function(t,e,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:n})}},{key:"once",value:function(t,e,i){this.on(t,e,i,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var i=0;i<this.bindings[t].length;)this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):++i}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,i=arguments.length,n=Array(i>1?i-1:0),o=1;i>o;o++)n[o-1]=arguments[o];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],a=r.handler,s=r.ctx,l=r.once,u=s;void 0===u&&(u=this),a.apply(u,n),l?this.bindings[t].splice(e,1):++e}}}}]),t}();x.Utils={getActualBoundingClientRect:o,getScrollParents:r,getBounds:s,getOffsetParent:l,extend:c,addClass:h,removeClass:d,hasClass:f,updateClasses:g,defer:M,flush:T,uniqueId:O,Evented:P,getScrollBarSize:u,removeUtilElements:a};var A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),C=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),H=function(t,e,i){for(var n=!0;n;){var o=t,r=e,a=i;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,r);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return;t=u,e=r,i=a,n=!0,s=u=void 0}};if(void 0===x)throw new Error("You must include the utils.js file before tether.js");var B=x.Utils,r=B.getScrollParents,s=B.getBounds,l=B.getOffsetParent,c=B.extend,h=B.addClass,d=B.removeClass,g=B.updateClasses,M=B.defer,T=B.flush,u=B.getScrollBarSize,a=B.removeUtilElements,I=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<e.length;++i){var n=e[i];if(void 0!==t.style[n])return n}}(),N=[],z=function(){N.forEach(function(t){t.position(!1)}),T()};!function(){var t=null,e=null,i=null,n=function n(){return void 0!==e&&e>16?(e=Math.min(e-16,250),void(i=setTimeout(n,250))):void(void 0!==t&&b()-t<10||(null!=i&&(clearTimeout(i),i=null),t=b(),z(),e=b()-t))};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var L={center:"center",left:"right",right:"left"},D={middle:"middle",top:"bottom",bottom:"top"},q={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},W=function(t,e){var i=t.left,n=t.top;return"auto"===i&&(i=L[e.left]),"auto"===n&&(n=D[e.top]),{left:i,top:n}},F=function(t){var e=t.left,i=t.top;return void 0!==q[t.left]&&(e=q[t.left]),void 0!==q[t.top]&&(i=q[t.top]),{left:e,top:i}},V=function(t){var e=t.split(" "),i=A(e,2);return{top:i[0],left:i[1]}},U=V,Y=function(t){function e(t){var i=this;n(this,e),H(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),N.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(i)}),this.position()}return m(e,t),C(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(n,t);var o=this.options,a=o.element,s=o.target,l=o.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),h(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&h(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=U(this.options.targetAttachment),this.attachment=U(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((r={height:(t=s(this.target)).height,width:t.width,top:t.top,left:t.left}).height=Math.min(r.height,t.height-(pageYOffset-t.top)),r.height=Math.min(r.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),r.height=Math.min(innerHeight,r.height),r.height-=2,r.width=Math.min(r.width,t.width-(pageXOffset-t.left)),r.width=Math.min(r.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),r.width=Math.min(innerWidth,r.width),r.width-=2,r.top<pageYOffset&&(r.top=pageYOffset),r.left<pageXOffset&&(r.left=pageXOffset),r);if("scroll-handle"===this.targetModifier){var t=void 0,e=this.target;e===document.body?(e=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(e);var i=getComputedStyle(e),n=0;(e.scrollWidth>e.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(n=15);var o=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-n,r={width:15,height:.975*o*(o/e.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},a=0;408>o&&this.target===document.body&&(a=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(r.height=Math.max(r.height,24));var l=this.target.scrollTop/(e.scrollHeight-o);return r.top=l*(o-r.height-a)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(r.height=Math.max(r.height,24)),r}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),N.forEach(function(e,i){e===t&&N.splice(i,1)}),0===N.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var i=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(i.getClass("element-attached")+"-"+t),r.push(i.getClass("target-attached")+"-"+t)}),M(function(){void 0!==i._addAttachClasses&&(g(i.element,i._addAttachClasses,r),!1!==i.options.addTargetClasses&&g(i.target,i._addAttachClasses,r),delete i._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var i=W(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,i);var n=this.cache("element-bounds",function(){return s(t.element)}),o=n.width,r=n.height;if(0===o&&0===r&&void 0!==this.lastSize){var a=this.lastSize;o=a.width,r=a.height}else this.lastSize={width:o,height:r};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=c,h=j(F(this.attachment),{width:o,height:r}),f=j(F(i),d),p=j(this.offset,{width:o,height:r}),v=j(this.targetOffset,d);h=w(h,p),f=w(f,v);for(var g=c.left+f.left-h.left,m=c.top+f.top-h.top,y=0;y<x.modules.length;++y){var b=x.modules[y].position.call(this,{left:g,top:m,targetAttachment:i,targetPos:c,elementPos:n,offset:h,targetOffset:f,manualOffset:p,manualTargetOffset:v,scrollbarSize:O,attachment:this.attachment});if(!1===b)return!1;void 0!==b&&"object"==typeof b&&(m=b.top,g=b.left)}var Q={page:{top:m,left:g},viewport:{top:m-pageYOffset,bottom:pageYOffset-m-r+innerHeight,left:g-pageXOffset,right:pageXOffset-g-o+innerWidth}},C=this.target.ownerDocument,_=C.defaultView,O=void 0;return C.body.scrollWidth>_.innerWidth&&(O=this.cache("scrollbar-size",u),Q.viewport.bottom-=O.height),C.body.scrollHeight>_.innerHeight&&(O=this.cache("scrollbar-size",u),Q.viewport.right-=O.width),(-1===["","static"].indexOf(C.body.style.position)||-1===["","static"].indexOf(C.body.parentElement.style.position))&&(Q.page.bottom=C.body.scrollHeight-m-r,Q.page.right=C.body.scrollWidth-g-o),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),i=t.cache("target-offsetparent-bounds",function(){return s(e)}),n=getComputedStyle(e),o=i,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),i.right=C.body.scrollWidth-i.left-o.width+r.right,i.bottom=C.body.scrollHeight-i.top-o.height+r.bottom,Q.page.top>=i.top+r.top&&Q.page.bottom>=i.bottom&&Q.page.left>=i.left+r.left&&Q.page.right>=i.right){var a=e.scrollTop,u=e.scrollLeft;Q.offset={top:Q.page.top-i.top+a-r.top,left:Q.page.left-i.left+u-r.left}}}(),this.move(Q),this.history.unshift(Q),this.history.length>3&&this.history.pop(),e&&T(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var i={};for(var n in t){i[n]={};for(var o in t[n]){for(var r=!1,a=0;a<this.history.length;++a){var s=this.history[a];if(void 0!==s[n]&&!y(s[n][o],t[n][o])){r=!0;break}}r||(i[n][o]=!0)}}var u={top:"",left:"",right:"",bottom:""},d=function(t,i){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var n=void 0,o=void 0;t.top?(u.top=0,n=i.top):(u.bottom=0,n=-i.bottom),t.left?(u.left=0,o=i.left):(u.right=0,o=-i.right),u[I]="translateX("+Math.round(o)+"px) translateY("+Math.round(n)+"px)","msTransform"!==I&&(u[I]+=" translateZ(0)")}else t.top?u.top=i.top+"px":u.bottom=i.bottom+"px",t.left?u.left=i.left+"px":u.right=i.right+"px"},h=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(u.position="absolute",d(i.page,t.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(u.position="fixed",d(i.viewport,t.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){u.position="absolute";var n=e.cache("target-offsetparent",function(){return l(e.target)});l(e.element)!==n&&M(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),d(i.offset,t.offset),h=!0}():(u.position="absolute",d({top:!0,left:!0},t.page)),!h){for(var f=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){f=!1;break}p=p.parentNode}f||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},g=!1;for(var o in u){var m=u[o];this.element.style[o]!==m&&(g=!0,v[o]=m)}g&&M(function(){c(e.element.style,v)})}}}]),e}(P);Y.modules=[],x.position=z;var R=c(Y,x),A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=(B=x.Utils).getBounds,c=B.extend,g=B.updateClasses,M=B.defer,X=["left","top","right","bottom"];x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,o=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return s(e.element)}),a=r.height,l=r.width;if(0===l&&0===a&&void 0!==this.lastSize){var u=this.lastSize;l=u.width,a=u.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),h=d.height,f=d.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&p.push(e),i&&p.push(i)}),p.forEach(function(t){["left","top","right","bottom"].forEach(function(e){p.push(t+"-"+e)})});var v=[],m=c({},o),y=c({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,u=t.pin;void 0===s&&(s="");var c=void 0,d=void 0;if(s.indexOf(" ")>=0){var p=s.split(" "),g=A(p,2);d=g[0],c=g[1]}else c=d=s;var b=Q(e,r);("target"===d||"both"===d)&&(i<b[1]&&"top"===m.top&&(i+=h,m.top="bottom"),i+a>b[3]&&"bottom"===m.top&&(i-=h,m.top="top")),"together"===d&&("top"===m.top&&("bottom"===y.top&&i<b[1]?(i+=h,m.top="bottom",i+=a,y.top="top"):"top"===y.top&&i+a>b[3]&&i-(a-h)>=b[1]&&(i-=a-h,m.top="bottom",y.top="bottom")),"bottom"===m.top&&("top"===y.top&&i+a>b[3]?(i-=h,m.top="top",i-=a,y.top="bottom"):"bottom"===y.top&&i<b[1]&&i+(2*a-h)<=b[3]&&(i+=a-h,m.top="top",y.top="top")),"middle"===m.top&&(i+a>b[3]&&"top"===y.top?(i-=a,y.top="bottom"):i<b[1]&&"bottom"===y.top&&(i+=a,y.top="top"))),("target"===c||"both"===c)&&(n<b[0]&&"left"===m.left&&(n+=f,m.left="right"),n+l>b[2]&&"right"===m.left&&(n-=f,m.left="left")),"together"===c&&(n<b[0]&&"left"===m.left?"right"===y.left?(n+=f,m.left="right",n+=l,y.left="left"):"left"===y.left&&(n+=f,m.left="right",n-=l,y.left="right"):n+l>b[2]&&"right"===m.left?"left"===y.left?(n-=f,m.left="left",n-=l,y.left="right"):"right"===y.left&&(n-=f,m.left="left",n+=l,y.left="left"):"center"===m.left&&(n+l>b[2]&&"left"===y.left?(n-=l,y.left="right"):n<b[0]&&"right"===y.left&&(n+=l,y.left="left"))),("element"===d||"both"===d)&&(i<b[1]&&"bottom"===y.top&&(i+=a,y.top="top"),i+a>b[3]&&"top"===y.top&&(i-=a,y.top="bottom")),("element"===c||"both"===c)&&(n<b[0]&&("right"===y.left?(n+=l,y.left="left"):"center"===y.left&&(n+=l/2,y.left="left")),n+l>b[2]&&("left"===y.left?(n-=l,y.left="right"):"center"===y.left&&(n-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var w=[],j=[];i<b[1]&&(u.indexOf("top")>=0?(i=b[1],w.push("top")):j.push("top")),i+a>b[3]&&(u.indexOf("bottom")>=0?(i=b[3]-a,w.push("bottom")):j.push("bottom")),n<b[0]&&(u.indexOf("left")>=0?(n=b[0],w.push("left")):j.push("left")),n+l>b[2]&&(u.indexOf("right")>=0?(n=b[2]-l,w.push("right")):j.push("right")),w.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),v.push(t),w.forEach(function(e){v.push(t+"-"+e)})}(),j.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),v.push(t),j.forEach(function(e){v.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=m.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=m.top=!1),(m.top!==o.top||m.left!==o.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,m),e.trigger("update",{attachment:y,targetAttachment:m}))}),M(function(){!1!==e.options.addTargetClasses&&g(e.target,v,p),g(e.element,v,p)}),{top:i,left:n}}});var s=(B=x.Utils).getBounds,g=B.updateClasses,M=B.defer;x.modules.push({position:function(t){var e=this,i=t.top,n=t.left,o=this.cache("element-bounds",function(){return s(e.element)}),r=o.height,a=o.width,l=this.getTargetBounds(),u=i+r,c=n+a,d=[];i<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];(e===n||e===c)&&d.push(t)}),n<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];(e===i||e===u)&&d.push(t)});var h=[],f=[],p=["left","top","right","bottom"];return h.push(this.getClass("abutted")),p.forEach(function(t){h.push(e.getClass("abutted")+"-"+t)}),d.length&&f.push(this.getClass("abutted")),d.forEach(function(t){f.push(e.getClass("abutted")+"-"+t)}),M(function(){!1!==e.options.addTargetClasses&&g(e.target,f,h),g(e.element,f,h)}),!0}});A=function(){function t(t,e){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var o=void 0,r=void 0;if("string"==typeof n){(n=n.split(" "))[1]=n[1]||n[0];var a=A(n,2);o=a[0],r=a[1],o=parseFloat(o,10),r=parseFloat(r,10)}else o=n.top,r=n.left;return e+=o,i+=r,{top:e,left:i}}}}),R})}window.width=jQuery(window).width(),window.height=jQuery(window).height(),jQuery(window).ready(function(){jQuery.fn.extend({size:function(){return this.length}}),_loadTetherBS4(),loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:bootstrapMin?action=raw&ctype=text/javascript",function(){jQuery("body").hasClass("enable-materialdesign")&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:materialMin?action=raw&ctype=text/javascript"),Init(!1)}),jQuery("html").hasClass("chrome")&&jQuery("body").hasClass("smoothscroll")&&navigator.platform.indexOf("Mac")<0&&loadScript("https://2017.igem.org/Team:Valencia_UPV/Templates:smoothScroll?action=raw&ctype=text/javascript",function(){jQuery.smoothScroll()})}),jQuery("#preloader").length>0&&jQuery(window).on("load",function(){jQuery("#preloader").fadeOut(1e3,function(){jQuery("#preloader").remove()})});var _arr={},isMobile={iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/WPDesktop/i)},any:function(){return isMobile.iOS()||isMobile.Android()||isMobile.BlackBerry()||isMobile.Opera()||isMobile.Windows()}};Number.prototype.formatMoney=function(t,e,i){var n=this,t=isNaN(t=Math.abs(t))?2:t,e=void 0==e?".":e,i=void 0==i?",":i,o=n<0?"-":"",r=String(parseInt(n=Math.abs(Number(n)||0).toFixed(t))),a=(a=r.length)>3?a%3:0;return o+(a?r.substr(0,a)+i:"")+r.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?e+Math.abs(n-r).toFixed(t).slice(2):"")},function(t){t.fn.appear=function(e,i){var n=t.extend({data:void 0,one:!0,accX:0,accY:0},i);return this.each(function(){var i=t(this);if(i.appeared=!1,e){var o=t(window),r=function(){if(i.is(":visible")){var t=o.scrollLeft(),e=o.scrollTop(),r=i.offset(),a=r.left,s=r.top,l=n.accX,u=n.accY,c=i.height(),d=o.height(),h=i.width(),f=o.width();s+c+u>=e&&s<=e+d+u&&a+h+l>=t&&a<=t+f+l?i.appeared||i.trigger("appear",n.data):i.appeared=!1}else i.appeared=!1},a=function(){if(i.appeared=!0,n.one){o.unbind("scroll",r);var a=t.inArray(r,t.fn.appear.checks);a>=0&&t.fn.appear.checks.splice(a,1)}e.apply(this,arguments)};n.one?i.one("appear",n.data,a):i.bind("appear",n.data,a),o.scroll(r),t.fn.appear.checks.push(r),r()}else i.trigger("appear",n.data)})},t.extend(t.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=t.fn.appear.checks.length;if(e>0)for(;e--;)t.fn.appear.checks[e]()},run:function(){t.fn.appear.timeout&&clearTimeout(t.fn.appear.timeout),t.fn.appear.timeout=setTimeout(t.fn.appear.checkAll,20)}}),t.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(e,i){var n=t.fn[i];n&&(t.fn[i]=function(){var e=n.apply(this,arguments);return t.fn.appear.run(),e})})}(jQuery),jQuery.fn.parallax=function(t,e,i){function n(){var n=jQuery(window).scrollTop();o=i?function(t){return t.outerHeight(!0)}:function(t){return t.height()},a.each(function(){var i=jQuery(this),a=i.offset().top,s=o(i);if(!(n>a+s||a>n+window.height)){var l=Math.round((r-n)*e);i.css("backgroundPosition",t+" "+l+"px")}})}var o,r,a=jQuery(this);(arguments.length<1||null===t)&&(t="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===i)&&(i=!0),a.each(function(){(r=a.offset().top)<window.height&&(r=0)}),jQuery(window).bind("scroll",n).resize(n),n()},jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,i,n,o){return jQuery.easing[jQuery.easing.def](t,e,i,n,o)},easeInQuad:function(t,e,i,n,o){return n*(e/=o)*e+i},easeOutQuad:function(t,e,i,n,o){return-n*(e/=o)*(e-2)+i},easeInOutQuad:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e+i:-n/2*(--e*(e-2)-1)+i},easeInCubic:function(t,e,i,n,o){return n*(e/=o)*e*e+i},easeOutCubic:function(t,e,i,n,o){return n*((e=e/o-1)*e*e+1)+i},easeInOutCubic:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e+i:n/2*((e-=2)*e*e+2)+i},easeInQuart:function(t,e,i,n,o){return n*(e/=o)*e*e*e+i},easeOutQuart:function(t,e,i,n,o){return-n*((e=e/o-1)*e*e*e-1)+i},easeInOutQuart:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e*e+i:-n/2*((e-=2)*e*e*e-2)+i},easeInQuint:function(t,e,i,n,o){return n*(e/=o)*e*e*e*e+i},easeOutQuint:function(t,e,i,n,o){return n*((e=e/o-1)*e*e*e*e+1)+i},easeInOutQuint:function(t,e,i,n,o){return(e/=o/2)<1?n/2*e*e*e*e*e+i:n/2*((e-=2)*e*e*e*e+2)+i},easeInSine:function(t,e,i,n,o){return-n*Math.cos(e/o*(Math.PI/2))+n+i},easeOutSine:function(t,e,i,n,o){return n*Math.sin(e/o*(Math.PI/2))+i},easeInOutSine:function(t,e,i,n,o){return-n/2*(Math.cos(Math.PI*e/o)-1)+i},easeInExpo:function(t,e,i,n,o){return 0==e?i:n*Math.pow(2,10*(e/o-1))+i},easeOutExpo:function(t,e,i,n,o){return e==o?i+n:n*(1-Math.pow(2,-10*e/o))+i},easeInOutExpo:function(t,e,i,n,o){return 0==e?i:e==o?i+n:(e/=o/2)<1?n/2*Math.pow(2,10*(e-1))+i:n/2*(2-Math.pow(2,-10*--e))+i},easeInCirc:function(t,e,i,n,o){return-n*(Math.sqrt(1-(e/=o)*e)-1)+i},easeOutCirc:function(t,e,i,n,o){return n*Math.sqrt(1-(e=e/o-1)*e)+i},easeInOutCirc:function(t,e,i,n,o){return(e/=o/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+i:n/2*(Math.sqrt(1-(e-=2)*e)+1)+i},easeInElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(1==(e/=o))return i+n;if(a||(a=.3*o),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return-s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)+i},easeOutElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(1==(e/=o))return i+n;if(a||(a=.3*o),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return s*Math.pow(2,-10*e)*Math.sin((e*o-r)*(2*Math.PI)/a)+n+i},easeInOutElastic:function(t,e,i,n,o){var r=1.70158,a=0,s=n;if(0==e)return i;if(2==(e/=o/2))return i+n;if(a||(a=o*(.3*1.5)),s<Math.abs(n)){s=n;r=a/4}else r=a/(2*Math.PI)*Math.asin(n/s);return e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*-.5+i:s*Math.pow(2,-10*(e-=1))*Math.sin((e*o-r)*(2*Math.PI)/a)*.5+n+i},easeInBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),n*(e/=o)*e*((r+1)*e-r)+i},easeOutBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),n*((e=e/o-1)*e*((r+1)*e+r)+1)+i},easeInOutBack:function(t,e,i,n,o,r){return void 0==r&&(r=1.70158),(e/=o/2)<1?n/2*(e*e*((1+(r*=1.525))*e-r))+i:n/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+i},easeInBounce:function(t,e,i,n,o){return n-jQuery.easing.easeOutBounce(t,o-e,0,n,o)+i},easeOutBounce:function(t,e,i,n,o){return(e/=o)<1/2.75?n*(7.5625*e*e)+i:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+i:n*(7.5625*(e-=2.625/2.75)*e+.984375)+i},easeInOutBounce:function(t,e,i,n,o){return e<o/2?.5*jQuery.easing.easeInBounce(t,2*e,0,n,o)+i:.5*jQuery.easing.easeOutBounce(t,2*e-o,0,n,o)+.5*n+i}}),function(){var t,e,i,n,o,r=function(t,e){return function(){return t.apply(e,arguments)}},a=[].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1};e=function(){function t(){}return t.prototype.extend=function(t,e){var i,n;for(i in e)n=e[i],null==t[i]&&(t[i]=n);return t},t.prototype.isMobile=function(t){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)},t.prototype.addEvent=function(t,e,i){return null!=t.addEventListener?t.addEventListener(e,i,!1):null!=t.attachEvent?t.attachEvent("on"+e,i):t[e]=i},t.prototype.removeEvent=function(t,e,i){return null!=t.removeEventListener?t.removeEventListener(e,i,!1):null!=t.detachEvent?t.detachEvent("on"+e,i):delete t[e]},t.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},t}(),i=this.WeakMap||this.MozWeakMap||(i=function(){function t(){this.keys=[],this.values=[]}return t.prototype.get=function(t){var e,i,n,o;for(e=i=0,n=(o=this.keys).length;n>i;e=++i)if(o[e]===t)return this.values[e]},t.prototype.set=function(t,e){var i,n,o,r;for(i=n=0,o=(r=this.keys).length;o>n;i=++n)if(r[i]===t)return void(this.values[i]=e);return this.keys.push(t),this.values.push(e)},t}()),t=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(t=function(){function t(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return t.notSupported=!0,t.prototype.observe=function(){},t}()),n=this.getComputedStyle||function(t){return this.getPropertyValue=function(e){var i;return"float"===e&&(e="styleFloat"),o.test(e)&&e.replace(o,function(t,e){return e.toUpperCase()}),(null!=(i=t.currentStyle)?i[e]:void 0)||null},this},o=/(\-([a-z]){1})/g,this.WOW=function(){function o(t){null==t&&(t={}),this.scrollCallback=r(this.scrollCallback,this),this.scrollHandler=r(this.scrollHandler,this),this.start=r(this.start,this),this.scrolled=!0,this.config=this.util().extend(t,this.defaults),this.animationNameCache=new i}return o.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},o.prototype.init=function(){var t;return this.element=window.document.documentElement,"interactive"===(t=document.readyState)||"complete"===t?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},o.prototype.start=function(){var e,i,n,o;if(this.stopped=!1,this.boxes=function(){var t,i,n,o;for(o=[],t=0,i=(n=this.element.querySelectorAll("."+this.config.boxClass)).length;i>t;t++)e=n[t],o.push(e);return o}.call(this),this.all=function(){var t,i,n,o;for(o=[],t=0,i=(n=this.boxes).length;i>t;t++)e=n[t],o.push(e);return o}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(o=this.boxes,i=0,n=o.length;n>i;i++)e=o[i],this.applyStyle(e,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new t(function(t){return function(e){var i,n,o,r,a;for(a=[],o=0,r=e.length;r>o;o++)n=e[o],a.push(function(){var t,e,o,r;for(r=[],t=0,e=(o=n.addedNodes||[]).length;e>t;t++)i=o[t],r.push(this.doSync(i));return r}.call(t));return a}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},o.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},o.prototype.sync=function(){return t.notSupported?this.doSync(this.element):void 0},o.prototype.doSync=function(t){var e,i,n,o,r;if(null==t&&(t=this.element),1===t.nodeType){for(r=[],i=0,n=(o=(t=t.parentNode||t).querySelectorAll("."+this.config.boxClass)).length;n>i;i++)e=o[i],a.call(this.all,e)<0?(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),r.push(this.scrolled=!0)):r.push(void 0);return r}},o.prototype.show=function(t){return this.applyStyle(t),t.className=t.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(t):void 0},o.prototype.applyStyle=function(t,e){var i,n,o;return n=t.getAttribute("data-wow-duration"),i=t.getAttribute("data-wow-delay"),o=t.getAttribute("data-wow-iteration"),this.animate(function(r){return function(){return r.customStyle(t,e,n,i,o)}}(this))},o.prototype.animate="requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()},o.prototype.resetStyle=function(){var t,e,i,n,o;for(o=[],e=0,i=(n=this.boxes).length;i>e;e++)t=n[e],o.push(t.style.visibility="visible");return o},o.prototype.customStyle=function(t,e,i,n,o){return e&&this.cacheAnimationName(t),t.style.visibility=e?"hidden":"visible",i&&this.vendorSet(t.style,{animationDuration:i}),n&&this.vendorSet(t.style,{animationDelay:n}),o&&this.vendorSet(t.style,{animationIterationCount:o}),this.vendorSet(t.style,{animationName:e?"none":this.cachedAnimationName(t)}),t},o.prototype.vendors=["moz","webkit"],o.prototype.vendorSet=function(t,e){var i,n,o,r;r=[];for(i in e)n=e[i],t[""+i]=n,r.push(function(){var e,r,a,s;for(s=[],e=0,r=(a=this.vendors).length;r>e;e++)o=a[e],s.push(t[""+o+i.charAt(0).toUpperCase()+i.substr(1)]=n);return s}.call(this));return r},o.prototype.vendorCSS=function(t,e){var i,o,r,a,s,l;for(i=(o=n(t)).getPropertyCSSValue(e),a=0,s=(l=this.vendors).length;s>a;a++)r=l[a],i=i||o.getPropertyCSSValue("-"+r+"-"+e);return i},o.prototype.animationName=function(t){var e;try{e=this.vendorCSS(t,"animation-name").cssText}catch(i){e=n(t).getPropertyValue("animation-name")}return"none"===e?"":e},o.prototype.cacheAnimationName=function(t){return this.animationNameCache.set(t,this.animationName(t))},o.prototype.cachedAnimationName=function(t){return this.animationNameCache.get(t)},o.prototype.scrollHandler=function(){return this.scrolled=!0},o.prototype.scrollCallback=function(){var t;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var e,i,n,o;for(o=[],e=0,i=(n=this.boxes).length;i>e;e++)(t=n[e])&&(this.isVisible(t)?this.show(t):o.push(t));return o}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},o.prototype.offsetTop=function(t){for(var e;void 0===t.offsetTop;)t=t.parentNode;for(e=t.offsetTop;t=t.offsetParent;)e+=t.offsetTop;return e},o.prototype.isVisible=function(t){var e,i,n,o,r;return i=t.getAttribute("data-wow-offset")||this.config.offset,r=window.pageYOffset,o=r+Math.min(this.element.clientHeight,this.util().innerHeight())-i,n=this.offsetTop(t),e=n+t.clientHeight,o>=n&&e>=r},o.prototype.util=function(){return null!=this._util?this._util:this._util=new e},o.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},o}()}.call(this),function(t,e,i){function n(t,e){return typeof t===e}function o(t){var e=C.className,i=j._config.classPrefix||"";if(x&&(e=e.baseVal),j._config.enableJSClass){var n=new RegExp("(^|\\s)"+i+"no-js(\\s|$)");e=e.replace(n,"$1"+i+"js$2")}j._config.enableClasses&&(e+=" "+i+t.join(" "+i),x?C.className.baseVal=e:C.className=e)}function r(){return"function"!=typeof e.createElement?e.createElement(arguments[0]):x?e.createElementNS.call(e,"http://www.w3.org/2000/svg",arguments[0]):e.createElement.apply(e,arguments)}function a(t,e){if("object"==typeof t)for(var i in t)S(t,i)&&a(i,t[i]);else{var n=(t=t.toLowerCase()).split("."),r=j[n[0]];if(2==n.length&&(r=r[n[1]]),void 0!==r)return j;e="function"==typeof e?e():e,1==n.length?j[n[0]]=e:(!j[n[0]]||j[n[0]]instanceof Boolean||(j[n[0]]=new Boolean(j[n[0]])),j[n[0]][n[1]]=e),o([(e&&0!=e?"":"no-")+n.join("-")]),j._trigger(t,e)}return j}function s(t){return t.replace(/([a-z])-([a-z])/g,function(t,e,i){return e+i.toUpperCase()}).replace(/^-/,"")}function l(t,e){return!!~(""+t).indexOf(e)}function u(){var t=e.body;return t||(t=r(x?"svg":"body"),t.fake=!0),t}function c(t,i,n,o){var a,s,l,c,d="modernizr",h=r("div"),f=u();if(parseInt(n,10))for(;n--;)l=r("div"),l.id=o?o[n]:d+(n+1),h.appendChild(l);return a=r("style"),a.type="text/css",a.id="s"+d,(f.fake?f:h).appendChild(a),f.appendChild(h),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),h.id=d,f.fake&&(f.style.background="",f.style.overflow="hidden",c=C.style.overflow,C.style.overflow="hidden",C.appendChild(f)),s=i(h,t),f.fake?(f.parentNode.removeChild(f),C.style.overflow=c,C.offsetHeight):h.parentNode.removeChild(h),!!s}function d(t,e){return function(){return t.apply(e,arguments)}}function h(t,e,i){var o;for(var r in t)if(t[r]in e)return!1===i?t[r]:(o=e[t[r]],n(o,"function")?d(o,i||e):o);return!1}function f(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(f(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var r=[];o--;)r.push("("+f(e[o])+":"+n+")");return r=r.join(" or "),c("@supports ("+r+") { #modernizr { position: absolute; } }",function(t){return"absolute"==getComputedStyle(t,null).position})}return i}function v(t,e,o,a){function u(){d&&(delete B.style,delete B.modElem)}if(a=!n(a,"undefined")&&a,!n(o,"undefined")){var c=p(t,o);if(!n(c,"undefined"))return c}for(var d,h,f,v,g,m=["modernizr","tspan","samp"];!B.style&&m.length;)d=!0,B.modElem=r(m.shift()),B.style=B.modElem.style;for(f=t.length,h=0;f>h;h++)if(v=t[h],g=B.style[v],l(v,"-")&&(v=s(v)),B.style[v]!==i){if(a||n(o,"undefined"))return u(),"pfx"!=e||v;try{B.style[v]=o}catch(t){}if(B.style[v]!=g)return u(),"pfx"!=e||v}return u(),!1}function g(t,e,i,o,r){var a=t.charAt(0).toUpperCase()+t.slice(1),s=(t+" "+T.join(a+" ")+a).split(" ");return n(e,"string")||n(e,"undefined")?v(s,e,o,r):(s=(t+" "+O.join(a+" ")+a).split(" "),h(s,e,i))}function m(t,e,n){return g(t,i,i,e,n)}var y=[],b=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){var i=this;setTimeout(function(){e(i[t])},0)},addTest:function(t,e,i){b.push({name:t,fn:e,options:i})},addAsyncTest:function(t){b.push({name:null,fn:t})}},j=function(){};j.prototype=w,j=new j;var Q=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];w._prefixes=Q;var C=e.documentElement,x="svg"===C.nodeName.toLowerCase();x||function(t,e){function i(t,e){var i=t.createElement("p"),n=t.getElementsByTagName("head")[0]||t.documentElement;return i.innerHTML="x<style>"+e+"</style>",n.insertBefore(i.lastChild,n.firstChild)}function n(){var t=g.elements;return"string"==typeof t?t.split(" "):t}function o(t){var e=v[t[f]];return e||(e={},p++,t[f]=p,v[p]=e),e}function r(t,i,n){if(i||(i=e),u)return i.createElement(t);n||(n=o(i));var r;return r=n.cache[t]?n.cache[t].cloneNode():h.test(t)?(n.cache[t]=n.createElem(t)).cloneNode():n.createElem(t),!r.canHaveChildren||d.test(t)||r.tagUrn?r:n.frag.appendChild(r)}function a(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(i){return g.shivMethods?r(i,t,e):e.createElem(i)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/[\w\-:]+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(g,e.frag)}function s(t){t||(t=e);var n=o(t);return!g.shivCSS||l||n.hasCSS||(n.hasCSS=!!i(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||a(t,n),t}var l,u,c=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f="_html5shiv",p=0,v={};!function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",l="hidden"in t,u=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return void 0===t.cloneNode||void 0===t.createDocumentFragment||void 0===t.createElement}()}catch(t){l=!0,u=!0}}();var g={elements:c.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==c.shivCSS,supportsUnknownElements:u,shivMethods:!1!==c.shivMethods,type:"default",shivDocument:s,createElement:r,createDocumentFragment:function(t,i){if(t||(t=e),u)return t.createDocumentFragment();for(var r=(i=i||o(t)).frag.cloneNode(),a=0,s=n(),l=s.length;l>a;a++)r.createElement(s[a]);return r},addElements:function(t,e){var i=g.elements;"string"!=typeof i&&(i=i.join(" ")),"string"!=typeof t&&(t=t.join(" ")),g.elements=i+" "+t,s(e)}};t.html5=g,s(e),"object"==typeof module&&module.exports&&(module.exports=g)}(void 0!==t?t:this,e);var _="Moz O ms Webkit",O=w._config.usePrefixes?_.toLowerCase().split(" "):[];w._domPrefixes=O;var k=function(){var t=!("onblur"in e.documentElement);return function(e,n){var o;return!!e&&(n&&"string"!=typeof n||(n=r(n||"div")),e="on"+e,!(o=e in n)&&t&&(n.setAttribute||(n=r("div")),n.setAttribute(e,""),o="function"==typeof n[e],n[e]!==i&&(n[e]=i),n.removeAttribute(e)),o)}}();w.hasEvent=k,j.addTest("video",function(){var t=r("video"),e=!1;try{(e=!!t.canPlayType)&&(e=new Boolean(e),e.ogg=t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),e.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),e.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),e.vp9=t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),e.hls=t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(t){}return e});var S;!function(){var t={}.hasOwnProperty;S=n(t,"undefined")||n(t.call,"undefined")?function(t,e){return e in t&&n(t.constructor.prototype[e],"undefined")}:function(e,i){return t.call(e,i)}}(),w._l={},w.on=function(t,e){this._l[t]||(this._l[t]=[]),this._l[t].push(e),j.hasOwnProperty(t)&&setTimeout(function(){j._trigger(t,j[t])},0)},w._trigger=function(t,e){if(this._l[t]){var i=this._l[t];setTimeout(function(){var t;for(t=0;t<i.length;t++)(0,i[t])(e)},0),delete this._l[t]}},j._q.push(function(){w.addTest=a});var E="CSS"in t&&"supports"in t.CSS,M="supportsCSS"in t;j.addTest("supports",E||M);var T=w._config.usePrefixes?_.split(" "):[];w._cssomPrefixes=T;var P=function(e){var n,o=Q.length,r=t.CSSRule;if(void 0===r)return i;if(!e)return!1;if(e=e.replace(/^@/,""),(n=e.replace(/-/g,"_").toUpperCase()+"_RULE")in r)return"@"+e;for(var a=0;o>a;a++){var s=Q[a];if(s.toUpperCase()+"_"+n in r)return"@-"+s.toLowerCase()+"-"+e}return!1};w.atRule=P;var A=w.testStyles=c,H={elem:r("modernizr")};j._q.push(function(){delete H.elem});var B={style:H.elem.style};j._q.unshift(function(){delete B.style}),w.testProp=function(t,e,n){return v([t],i,e,n)},w.testAllProps=g,w.prefixed=function(t,e,i){return 0===t.indexOf("@")?P(t):(-1!=t.indexOf("-")&&(t=s(t)),e?g(t,e,i):g(t,"pfx"))},w.testAllProps=m,j.addTest("csstransitions",m("transition","all",!0)),j.addTest("csstransforms3d",function(){var t=!!m("perspective","1px",!0),e=j._config.usePrefixes;if(t&&(!e||"webkitPerspective"in C.style)){var i;j.supports?i="@supports (perspective: 1px)":(i="@media (transform-3d)",e&&(i+=",(-webkit-transform-3d)")),A("#modernizr{width:0;height:0}"+(i+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}"),function(e){t=7===e.offsetWidth&&18===e.offsetHeight})}return t}),function(){var t,e,i,o,r,a,s;for(var l in b)if(b.hasOwnProperty(l)){if(t=[],(e=b[l]).name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(i=0;i<e.options.aliases.length;i++)t.push(e.options.aliases[i].toLowerCase());for(o=n(e.fn,"function")?e.fn():e.fn,r=0;r<t.length;r++)a=t[r],s=a.split("."),1===s.length?j[s[0]]=o:(!j[s[0]]||j[s[0]]instanceof Boolean||(j[s[0]]=new Boolean(j[s[0]])),j[s[0]][s[1]]=o),y.push((o?"":"no-")+s.join("-"))}}(),o(y),delete w.addTest,delete w.addAsyncTest;for(var I=0;I<j._q.length;I++)j._q[I]();t.Modernizr=j}(window,document);