Advertisement
Guest User

js

a guest
Mar 26th, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function scrollAndFocus(t,e,o,i,s){var n;(n=jQuery)("body").addClass("scrolling"),n(t).closest("#mainNav").get(0)&&n(t).parents(".collapse.show").collapse("hide"),n("html, body").animate({scrollTop:n(e).offset().top-(i||0)},300,function(){n("body").removeClass("scrolling"),setTimeout(function(){n(o).focus()},500),s&&n("html, body").animate({scrollTop:n(e).offset().top-(i||0)})})}if(function(t){t.extend({browserSelector:function(){var e;e=navigator.userAgent||navigator.vendor||window.opera,(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4));var o="ontouchstart"in window||navigator.msMaxTouchPoints,i=navigator.userAgent.toLowerCase(),s=function(t){return i.indexOf(t)>-1},n="gecko",a="webkit",r="safari",l="opera",d=document.documentElement,p=[!/opera|webtv/i.test(i)&&/msie\s(\d)/.test(i)?"ie ie"+parseFloat(navigator.appVersion.split("MSIE")[1]):s("firefox/2")?n+" ff2":s("firefox/3.5")?n+" ff3 ff3_5":s("firefox/3")?n+" ff3":s("gecko/")?n:s("opera")?l+(/version\/(\d+)/.test(i)?" "+l+RegExp.jQuery1:/opera(\s|\/)(\d+)/.test(i)?" "+l+RegExp.jQuery2:""):s("konqueror")?"konqueror":s("chrome")?a+" chrome":s("iron")?a+" iron":s("applewebkit/")?a+" "+r+(/version\/(\d+)/.test(i)?" "+r+RegExp.jQuery1:""):s("mozilla/")?n:"",s("j2me")?"mobile":s("iphone")?"iphone":s("ipod")?"ipod":s("mac")?"mac":s("darwin")?"mac":s("webtv")?"webtv":s("win")?"win":s("freebsd")?"freebsd":s("x11")||s("linux")?"linux":"","js"];c=p.join(" "),t.browser.mobile&&(c+=" mobile"),o&&(c+=" touch"),d.className+=" "+c,/Edge/.test(navigator.userAgent)&&t("html").removeClass("chrome").addClass("edge"),!window.ActiveXObject&&"ActiveXObject"in window?t("html").removeClass("gecko").addClass("ie ie11"):(t("body").hasClass("dark")&&t("html").addClass("dark"),t("body").hasClass("boxed")&&t("html").addClass("boxed"))}}),t.browserSelector()}(jQuery),/iPad|iPhone|iPod/.test(navigator.platform)&&$(document).ready(function(t){t(".thumb-info").attr("onclick","return true")}),function(t){t('[data-toggle="tooltip"]').tooltip(),t('[data-toggle="popover"]').popover()}(jQuery),$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){$(this).parents(".nav-tabs").find(".active").removeClass("active"),$(this).addClass("active").parent().addClass("active")}),$("html").hasClass("disable-onload-scroll")||!window.location.hash||["#*"].includes(window.location.hash)||(window.scrollTo(0,0),$(window).on("load",function(){setTimeout(function(){var t=window.location.hash,e=$(window).width()<768?180:90;$(t).get(0)&&($("a[href$='"+window.location.hash+"']").is("[data-hash-offset]")?e=parseInt($("a[href$='"+window.location.hash+"']").first().attr("data-hash-offset")):$("html").is("[data-hash-offset]")&&(e=parseInt($("html").attr("data-hash-offset"))),$("body").addClass("scrolling"),$("html, body").animate({scrollTop:$(t).offset().top-e},600,"easeOutQuad",function(){$("body").removeClass("scrolling")}))},1)})),function(t){t.fn.extend({textRotator:function(e){e=t.extend({fadeSpeed:500,pauseSpeed:100,child:null},e);return this.each(function(){var o=e,i=t(this);if(t(i.children(),i).each(function(){t(this).hide()}),o.child)s=o.child;else var s=t(i).children(":first");t(s).fadeIn(o.fadeSpeed,function(){t(s).delay(o.pauseSpeed).fadeOut(o.fadeSpeed,function(){var e=t(this).next();0==e.length&&(e=t(i).children(":first")),t(i).textRotator({child:e,fadeSpeed:o.fadeSpeed,pauseSpeed:o.pauseSpeed})})})})}})}(jQuery),function(t){var e={$wrapper:t(".notice-top-bar"),$body:t(".body"),init:function(){this.build()},build:function(){var e=this;t(window).on("load",function(){setTimeout(function(){e.$body.css({"margin-top":e.$wrapper.outerHeight(),transition:"ease margin 300ms"}),t("#noticeTopBarContent").textRotator({fadeSpeed:500,pauseSpeed:5e3})},1e3)})}};t(".notice-top-bar").get(0)&&e.init()}(jQuery),function(t){t(".close-theme-switcher-bar").on("click",function(){t(this).closest(".header-top").css({height:0,"min-height":0,overflow:"hidden"})})}(jQuery),function(t){t(".recommend-themes").get(0)&&t("#demos").get(0)&&t(window).on("scroll",function(e){t(window).scrollTop()+1>=t("#demos").offset().top?t(".recommend-themes").addClass("active"):t(".recommend-themes").removeClass("active")})}(jQuery),function(t){t('a[data-toggle="tab"]').on("shown.bs.tab",function(e){var o=t(t(e.target).attr("href"));o.get(0)&&o.find(".owl-carousel").trigger("refresh.owl.carousel")})}(jQuery),jQuery(".image-hotspot").append('<span class="ring"></span>').append('<span class="circle"></span>'),function(t){t("body[data-plugin-page-transition]").get(0)&&(t(window).on("beforeunload",function(){t("body").addClass("page-transition-active")}),window.onpageshow=function(e){e.persisted&&t("html").hasClass("safari")&&window.location.reload()})}(jQuery),function(t){t(".thumb-info-floating-caption").get(0)&&(t(".thumb-info-floating-caption").on("mouseenter",function(){t(".thumb-info-floating-caption-title").get(0)||(t(".body").append('<div class="thumb-info-floating-caption-title">'+t(this).data("title")+"</div>"),t(this).data("type")&&t(".thumb-info-floating-caption-title").append('<div class="thumb-info-floating-caption-type">'+t(this).data("type")+"</div>").css({"padding-bottom":22}),t(this).hasClass("thumb-info-floating-caption-clean")&&t(".thumb-info-floating-caption-title").addClass("bg-transparent"))}).on("mouseout",function(){t(".thumb-info-floating-caption-title").remove()}),t(document).on("mousemove",function(e){t(".thumb-info-floating-caption-title").css({position:"fixed",left:e.clientX-20,top:e.clientY+20})}))}(jQuery),function(t){t("[data-toggle-text-click]").on("click",function(){t(this).text(function(e,o){return o===t(this).attr("data-toggle-text-click")?t(this).attr("data-toggle-text-click-alt"):t(this).attr("data-toggle-text-click")})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){var e=function(o,i){this.$element=t(o),this.options=t.extend({},e.DEFAULTS,this.dataOptions(),i),this.init()};e.DEFAULTS={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:function(t,e){return t.toFixed(e.decimals)},onUpdate:null,onComplete:null},e.prototype.init=function(){this.value=this.options.from,this.loops=Math.ceil(this.options.speed/this.options.refreshInterval),this.loopCount=0,this.increment=(this.options.to-this.options.from)/this.loops},e.prototype.dataOptions=function(){var t={from:this.$element.data("from"),to:this.$element.data("to"),speed:this.$element.data("speed"),refreshInterval:this.$element.data("refresh-interval"),decimals:this.$element.data("decimals")},e=Object.keys(t);for(var o in e){var i=e[o];void 0===t[i]&&delete t[i]}return t},e.prototype.update=function(){this.value+=this.increment,this.loopCount++,this.render(),"function"==typeof this.options.onUpdate&&this.options.onUpdate.call(this.$element,this.value),this.loopCount>=this.loops&&(clearInterval(this.interval),this.value=this.options.to,"function"==typeof this.options.onComplete&&this.options.onComplete.call(this.$element,this.value))},e.prototype.render=function(){var t=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(t)},e.prototype.restart=function(){this.stop(),this.init(),this.start()},e.prototype.start=function(){this.stop(),this.render(),this.interval=setInterval(this.update.bind(this),this.options.refreshInterval)},e.prototype.stop=function(){this.interval&&clearInterval(this.interval)},e.prototype.toggle=function(){this.interval?this.stop():this.start()},t.fn.countTo=function(o){return this.each(function(){var i=t(this),s=i.data("countTo"),n="object"==typeof o?o:{},a="string"==typeof o?o:"start";(!s||"object"==typeof o)&&(s&&s.stop(),i.data("countTo",s=new e(this,n))),s[a].call(s)})}}),function(t){t.fn.visible=function(e,o,i,s){if(!(this.length<1)){var n=this.length>1?this.eq(0):this,a=null!=s,r=t(a?s:window),l=a?r.position():0,c=n.get(0),d=r.outerWidth(),p=r.outerHeight(),h=(i=i||"both",!0!==o||c.offsetWidth*c.offsetHeight);if("function"==typeof c.getBoundingClientRect){var u=c.getBoundingClientRect(),f=a?u.top-l.top>=0&&u.top<p+l.top:u.top>=0&&u.top<p,m=a?u.bottom-l.top>0&&u.bottom<=p+l.top:u.bottom>0&&u.bottom<=p,v=a?u.left-l.left>=0&&u.left<d+l.left:u.left>=0&&u.left<d,g=a?u.right-l.left>0&&u.right<d+l.left:u.right>0&&u.right<=d,w=e?f||m:f&&m,b=e?v||g:v&&g;if("both"===i)return h&&w&&b;if("vertical"===i)return h&&w;if("horizontal"===i)return h&&b}else{var y=a?0:l,C=y+p,x=r.scrollLeft(),k=x+d,j=n.position(),T=j.top,$=T+n.height(),I=j.left,S=I+n.width(),Q=!0===e?$:T,_=!0===e?T:$,z=!0===e?S:I,H=!0===e?I:S;if("both"===i)return!!h&&_<=C&&Q>=y&&H<=k&&z>=x;if("vertical"===i)return!!h&&_<=C&&Q>=y;if("horizontal"===i)return!!h&&H<=k&&z>=x}}}}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=-1,o=-1,i=function(t){return parseFloat(t)||0},s=function(e){var o=t(e),s=null,n=[];return o.each(function(){var e=t(this),o=e.offset().top-i(e.css("margin-top")),a=n.length>0?n[n.length-1]:null;null===a?n.push(e):Math.floor(Math.abs(s-o))<=1?n[n.length-1]=a.add(e):n.push(e),s=o}),n},n=function(e){var o={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof e?t.extend(o,e):("boolean"==typeof e?o.byRow=e:"remove"===e&&(o.remove=!0),o)},a=t.fn.matchHeight=function(e){var o=n(e);if(o.remove){var i=this;return this.css(o.property,""),t.each(a._groups,function(t,e){e.elements=e.elements.not(i)}),this}return this.length<=1&&!o.target?this:(a._groups.push({elements:this,options:o}),a._apply(this,o),this)};a.version="0.7.2",a._groups=[],a._throttle=80,a._maintainScroll=!1,a._beforeUpdate=null,a._afterUpdate=null,a._rows=s,a._parse=i,a._parseOptions=n,a._apply=function(e,o){var r=n(o),l=t(e),c=[l],d=t(window).scrollTop(),p=t("html").outerHeight(!0),h=l.parents().filter(":hidden");return h.each(function(){var e=t(this);e.data("style-cache",e.attr("style"))}),h.css("display","block"),r.byRow&&!r.target&&(l.each(function(){var e=t(this),o=e.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block"),e.data("style-cache",e.attr("style")),e.css({display:o,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),c=s(l),l.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||"")})),t.each(c,function(e,o){var s=t(o),n=0;if(r.target)n=r.target.outerHeight(!1);else{if(r.byRow&&s.length<=1)return void s.css(r.property,"");s.each(function(){var e=t(this),o=e.attr("style"),i=e.css("display");"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block");var s={display:i};s[r.property]="",e.css(s),e.outerHeight(!1)>n&&(n=e.outerHeight(!1)),o?e.attr("style",o):e.css("display","")})}s.each(function(){var e=t(this),o=0;r.target&&e.is(r.target)||("border-box"!==e.css("box-sizing")&&(o+=i(e.css("border-top-width"))+i(e.css("border-bottom-width")),o+=i(e.css("padding-top"))+i(e.css("padding-bottom"))),e.css(r.property,n-o+"px"))})}),h.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||null)}),a._maintainScroll&&t(window).scrollTop(d/p*t("html").outerHeight(!0)),this},a._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each(function(){var o=t(this),i=o.attr("data-mh")||o.attr("data-match-height");e[i]=i in e?e[i].add(o):o}),t.each(e,function(){this.matchHeight(!0)})};var r=function(e){a._beforeUpdate&&a._beforeUpdate(e,a._groups),t.each(a._groups,function(){a._apply(this.elements,this.options)}),a._afterUpdate&&a._afterUpdate(e,a._groups)};a._update=function(i,s){if(s&&"resize"===s.type){var n=t(window).width();if(n===e)return;e=n}i?-1===o&&(o=setTimeout(function(){r(s),o=-1},a._throttle)):r(s)},t(a._applyDataApi);var l=t.fn.on?"on":"bind";t(window)[l]("load",function(t){a._update(!1,t)}),t(window)[l]("resize orientationchange",function(t){a._update(!0,t)})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e,o=(e=new Image).srcset&&e.sizes;t.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},t.expr.pseudos["has-src"]=function(e){return t(e).is('img[src][src!=""]')},t.expr.pseudos.uncached=function(e){return!!t(e).is(":has-src")&&!e.complete},t.fn.waitForImages=function(){var e,i,s,n,a=0,r=t.Deferred(),l=this,c=[],d=t.waitForImages.hasImageProperties||[],p=t.waitForImages.hasImageAttributes||[],h=/url\(\s*(['"]?)(.*?)\1\s*\)/g;if(t.isPlainObject(arguments[0])?(n=arguments[0].waitForAll,s=arguments[0].each,i=arguments[0].finished):1===arguments.length&&"boolean"===t.type(arguments[0])?n=arguments[0]:(i=arguments[0],s=arguments[1],n=arguments[2]),i=i||t.noop,s=s||t.noop,n=!!n,!t.isFunction(i)||!t.isFunction(s))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var e=t(this);n?e.find("*").addBack().each(function(){var e=t(this);e.is("img:has-src")&&!e.is("[srcset]")&&c.push({src:e.attr("src"),element:e[0]}),t.each(d,function(t,o){var i,s=e.css(o);if(!s)return!0;for(;i=h.exec(s);)c.push({src:i[2],element:e[0]})}),t.each(p,function(t,o){if(!e.attr(o))return!0;c.push({src:e.attr("src"),srcset:e.attr("srcset"),element:e[0]})})}):e.find("img:has-src").each(function(){c.push({src:this.src,element:this})})}),e=c.length,a=0,0===e&&(i.call(l),r.resolveWith(l)),t.each(c,function(n,c){var d=new Image,p="load.waitForImages error.waitForImages";t(d).one(p,function o(n){var d=[a,e,"load"==n.type];if(a++,s.apply(c.element,d),r.notifyWith(c.element,d),t(this).off(p,o),a==e)return i.call(l[0]),r.resolveWith(l[0]),!1}),o&&c.srcset&&(d.srcset=c.srcset,d.sizes=c.sizes),d.src=c.src}),r.promise()}}),function(t,e){fontSpy=function(t,o){var i=e("html"),s=e("body");if("string"!=typeof t||""===t)throw"A valid fontName is required. fontName must be a string and must not be an empty string.";var n={font:t,fontClass:t.toLowerCase().replace(/\s/g,""),success:function(){},failure:function(){},testFont:"Courier New",testString:"QW@HhsXJ",glyphs:"",delay:50,timeOut:1e3,callback:e.noop},a=e.extend(n,o),r=e("<span>"+a.testString+a.glyphs+"</span>").css("position","absolute").css("top","-9999px").css("left","-9999px").css("visibility","hidden").css("fontFamily",a.testFont).css("fontSize","250px");s.append(r);var l=r.outerWidth();r.css("fontFamily",a.font+","+a.testFont);var c=function(){var t=r.outerWidth();l!==t?(a.callback(),i.addClass(a.fontClass),a&&a.success&&a.success(),r.remove()):a.timeOut<0?(i.addClass("no-"+a.fontClass),a&&a.failure&&a.failure(),a.callback(new Error("FontSpy timeout")),r.remove()):(setTimeout(c,a.delay),a.timeOut=a.timeOut-a.delay)};c()}}(0,jQuery),function(t){"use strict";t.fn.pin=function(e){var o=0,i=[],s=!1,n=t(window);e=e||{};var a=function(){for(var o=0,a=i.length;o<a;o++){var r=i[o];if(e.minWidth&&n.width()<=e.minWidth)r.parent().is(".pin-wrapper")&&r.unwrap(),r.css({width:"",left:"",top:"",position:""}),e.activeClass&&r.removeClass(e.activeClass),s=!0;else{s=!1;var l=e.containerSelector?r.closest(e.containerSelector):t(document.body),c=r.offset(),d=l.offset(),p=r.parent().offset();r.parent().is(".pin-wrapper")||r.wrap("<div class='pin-wrapper'>");var h=t.extend({top:0,bottom:0},e.padding||{});r.data("pin",{pad:h,from:(e.containerSelector?d.top:c.top)-h.top,to:d.top+l.height()-r.outerHeight()-h.bottom,end:d.top+l.height(),parentTop:p.top}),r.css({width:r.outerWidth()}),r.parent().css("height",r.outerHeight())}}},r=function(){if(!s){o=n.scrollTop();for(var a=[],r=0,l=i.length;r<l;r++){var c=t(i[r]),d=c.data("pin");if(d){a.push(c);var p=d.from-d.pad.bottom,h=d.to-d.pad.top;p+c.outerHeight()>d.end?c.css("position",""):p<o&&h>o?("fixed"!=c.css("position")&&c.css({left:c.offset().left,top:d.pad.top}).css("position","fixed"),e.activeClass&&c.addClass(e.activeClass)):o>=h?(c.css({left:"",top:h-d.parentTop+d.pad.top}).css("position","absolute"),e.activeClass&&c.addClass(e.activeClass)):(c.css({position:"",top:"",left:""}),e.activeClass&&c.removeClass(e.activeClass))}}i=a}},l=function(){a(),r()};return this.each(function(){var e=t(this),o=t(this).data("pin")||{};o&&o.update||(i.push(e),t("img",this).one("load",a),o.update=l,t(this).data("pin",o))}),n.scroll(r),n.resize(function(){a()}),a(),n.on("load",l),this}}(jQuery),function(t){"use strict";var e,o={action:function(){},runOnLoad:!1,duration:500},i=!1,s={init:function(){for(var e=0;e<=arguments.length;e++){var i=arguments[e];switch(typeof i){case"function":o.action=i;break;case"boolean":o.runOnLoad=i;break;case"number":o.duration=i}}return this.each(function(){o.runOnLoad&&o.action(),t(this).resize(function(){s.timedAction.call(this)})})},timedAction:function(t,s){var n=function(){var t=o.duration;if(i){var s=new Date-e;if((t=o.duration-s)<=0)return clearTimeout(i),i=!1,void o.action()}a(t)},a=function(t){i=setTimeout(n,t)};e=new Date,"number"==typeof s&&(o.duration=s),"function"==typeof t&&(o.action=t),i||n()}};t.fn.afterResize=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):s.init.apply(this,arguments)}}(jQuery),jQuery(document).ready(function(t){var e,o,s=2500,n=3800,a=n-3e3,r=50,l=150,c=500,d=c+800,p=600,h=1500;function u(e){var o=v(e);if(e.parents(".word-rotator").hasClass("type")){var i=e.parent(".word-rotator-words");i.addClass("selected").removeClass("waiting"),setTimeout(function(){i.removeClass("selected"),e.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out")},c),setTimeout(function(){f(o,l)},d)}else if(e.parents(".word-rotator").hasClass("letters")){var h=e.children("i").length>=o.children("i").length;!function e(o,i,n,a){o.removeClass("in").addClass("out");o.is(":last-child")?n&&setTimeout(function(){u(v(i))},s):setTimeout(function(){e(o.next(),i,n,a)},a);if(o.is(":last-child")&&t("html").hasClass("no-csstransitions")){var r=v(i);g(i,r)}}(e.find("i").eq(0),e,h,r),m(o.find("i").eq(0),o,h,r)}else e.parents(".word-rotator").hasClass("clip")?e.parents(".word-rotator-words").animate({width:"2px"},p,function(){g(e,o),f(o)}):e.parents(".word-rotator").hasClass("loading-bar")?(e.parents(".word-rotator-words").removeClass("is-loading"),g(e,o),setTimeout(function(){u(o)},n),setTimeout(function(){e.parents(".word-rotator-words").addClass("is-loading")},a)):(g(e,o),setTimeout(function(){u(o)},s))}function f(t,e){t.parents(".word-rotator").hasClass("type")?(m(t.find("i").eq(0),t,!1,e),t.addClass("is-visible").removeClass("is-hidden")):t.parents(".word-rotator").hasClass("clip")&&t.parents(".word-rotator-words").animate({width:t.outerWidth()+10},p,function(){setTimeout(function(){u(t)},h)})}function m(t,e,o,i){t.addClass("in").removeClass("out"),t.is(":last-child")?(e.parents(".word-rotator").hasClass("type")&&setTimeout(function(){e.parents(".word-rotator-words").addClass("waiting")},200),o||setTimeout(function(){u(e)},s),e.closest(".word-rotator").hasClass("type")||e.closest(".word-rotator-words").animate({width:e.outerWidth()})):setTimeout(function(){m(t.next(),e,o,i)},i)}function v(t){return t.is(":last-child")?t.parent().children().eq(0):t.next()}function g(t,e){if(t.removeClass("is-visible").addClass("is-hidden"),e.removeClass("is-hidden").addClass("is-visible"),!e.closest(".word-rotator").hasClass("clip")){var o=0,i=e.outerWidth()>t.outerWidth()?0:600;(e.closest(".word-rotator").hasClass("loading-bar")||e.closest(".word-rotator").hasClass("slide"))&&(o=3,i=0),setTimeout(function(){e.closest(".word-rotator-words").animate({width:e.outerWidth()+o})},i)}}t(".word-rotator.letters").find("b").each(function(){var e=t(this),o=e.text().split(""),s=e.hasClass("is-visible");for(i in o)e.parents(".rotate-2").length>0&&(o[i]="<em>"+o[i]+"</em>"),o[i]=s?'<i class="in">'+o[i]+"</i>":"<i>"+o[i]+"</i>";var n=o.join("");e.html(n).css("opacity",1)}),e=t(".word-rotator"),o=s,e.each(function(){var e=t(this);if(e.hasClass("loading-bar"))o=n,setTimeout(function(){e.find(".word-rotator-words").addClass("is-loading")},a);else if(e.hasClass("clip")){var i=e.find(".word-rotator-words"),s=i.outerWidth()+10;i.css("width",s)}else if(!e.hasClass("type")){var r=e.find(".word-rotator-words b"),l=0;r.each(function(){var e=t(this).outerWidth();e>l&&(l=e)}),e.find(".word-rotator-words").css("width",l)}setTimeout(function(){u(e.find(".is-visible").eq(0))},o)})}),function(t){t.fn.hover3d=function(e){var o=t.extend({selector:null,perspective:1e3,sensitivity:20,invert:!1,shine:!1,hoverInClass:"hover-in",hoverOutClass:"hover-out",hoverClass:"hover-3d"},e);return this.each(function(){var e=t(this),i=e.find(o.selector);currentX=0,currentY=0,o.shine&&i.append('<div class="shine"></div>');var s=t(this).find(".shine");e.css({perspective:o.perspective+"px",transformStyle:"preserve-3d"}),i.css({perspective:o.perspective+"px",transformStyle:"preserve-3d"}),s.css({position:"absolute",top:0,left:0,bottom:0,right:0,transform:"translateZ(1px)","z-index":9}),e.on("mouseenter",function(){return i.addClass(o.hoverInClass+" "+o.hoverClass),currentX=currentY=0,void setTimeout(function(){i.removeClass(o.hoverInClass)},1e3)}),e.on("mousemove",function(t){return function(t){var e=i.innerWidth(),n=i.innerHeight(),a=Math.round(t.pageX-i.offset().left),r=Math.round(t.pageY-i.offset().top),l=o.invert?(e/2-a)/o.sensitivity:-(e/2-a)/o.sensitivity,c=o.invert?-(n/2-r)/o.sensitivity:(n/2-r)/o.sensitivity,d=a-e/2,p=r-n/2,h=180*Math.atan2(p,d)/Math.PI-90;h<0&&(h+=360),i.css({perspective:o.perspective+"px",transformStyle:"preserve-3d",transform:"rotateY("+l+"deg) rotateX("+c+"deg)"}),s.css("background","linear-gradient("+h+"deg, rgba(255,255,255,"+t.offsetY/n*.5+") 0%,rgba(255,255,255,0) 80%)")}(t)}),e.on("mouseleave",function(){return i.addClass(o.hoverOutClass+" "+o.hoverClass),i.css({perspective:o.perspective+"px",transformStyle:"preserve-3d",transform:"rotateX(0) rotateY(0)"}),void setTimeout(function(){i.removeClass(o.hoverOutClass+" "+o.hoverClass),currentX=currentY=0},1e3)})})}}(jQuery),function(t){t.isFunction(t.fn.hover3d)&&t(function(){t(".hover-effect-3d").each(function(){t(this).hover3d({selector:".thumb-info"})})})}.apply(this,[jQuery]),$("[data-title-border]").get(0)){var $pageHeaderTitleBorder=$('<span class="page-header-title-border"></span>'),$pageHeaderTitle=$("[data-title-border]"),$window=$(window);$pageHeaderTitle.before($pageHeaderTitleBorder);var setPageHeaderTitleBorderWidth=function(){$pageHeaderTitleBorder.width($pageHeaderTitle.width())};$window.afterResize(function(){setPageHeaderTitleBorderWidth()}),setPageHeaderTitleBorderWidth(),$pageHeaderTitleBorder.addClass("visible")}!function(t){var e={$wrapper:t(".footer-reveal"),init:function(){this.build(),this.events()},build:function(){var e=this.$wrapper.outerHeight(!0);e>t(window).height()-t(".header-body").height()?(t("#footer").removeClass("footer-reveal"),t("body").css("padding-bottom",0)):(t("#footer").addClass("footer-reveal"),t("body").css("padding-bottom",e))},events:function(){var e=this,o=t(window);o.on("load",function(){o.afterResize(function(){e.build()})})}};t(".footer-reveal").get(0)&&e.init()}(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement