/** * Theme scripts. * Includes all the script functions for this theme. */ !function(t){"use strict";t(document),t("body");var e=".post iframe, .post object, .post video, .widget-content iframe, .widget-content object, .widget-content iframe",o=function(e){t(e).each(function(){var e=t(this),o=e.parent().width();e.attr("data-origwidth")||(e.attr("data-origwidth",e.attr("width")),e.attr("data-origheight",e.attr("height")));var r=o/e.attr("data-origwidth");e.css("width",o+"px"),e.css("height",e.attr("data-origheight")*r+"px")})};o(e),t(window).resize(function(){o(e)}),jQuery("#scroll-to-top").hide(),jQuery(function(){jQuery(window).scroll(function(){jQuery(this).scrollTop()>1e3?jQuery("#scroll-to-top").fadeIn():jQuery("#scroll-to-top").fadeOut()}),jQuery("#scroll-to-top a").on("click",function(){return jQuery("html, body").animate({scrollTop:0},500),!1})}),jQuery("a.searchOpen").on("click",function(){return jQuery("#curtain").toggleClass("open"),jQuery(this).toggleClass("opened"),!1}),jQuery("a.curtainclose").on("click",function(){return jQuery("#curtain").removeClass("open"),jQuery("a.searchOpen").removeClass("opened"),!1})}(jQuery);