!function(i){i(document).on("metaslider/initialized",function(t,s){if(i(s).closest(".metaslider.ms-theme-architekt").length){var e=i(s),n=i(s).closest(".metaslider.ms-theme-architekt"),o=e.find(".caption");o.length&&n.addClass("ms-has-caption"),n.addClass("ms-loaded")}i(window).trigger("resize")}),i(window).on("resize",function(s){i(".metaslider.ms-theme-architekt").each(function(s){var e=i(this).outerWidth();e<600?i(this).addClass("ms-is-small"):i(this).removeClass("ms-is-small"),setTimeout(function(){var s=0,e=i(this).find(".filmstrip, .flex-control-thumbs, .nivo-thumbs-enabled"),n=t(i(this).find(".ms-image > img, .rslides > li > img, .nivoSlider > img"));if(i(this).find(".filmstrip").length){var o=e.find("img").prop("height");i(this).is(".ms-has-caption")&&e.css({top:n+5}),i(this).find(".flex-control-nav, .flexslider .flex-direction-nav").css({top:n+o+15,bottom:"auto"}),i(this).find(".caption-wrap").css({"margin-top":o})}else i(this).find(".flex-control-thumbs, .nivo-thumbs-enabled").length?(i(this).find(".flex-direction-nav, .nivo-directionNav").css({top:Math.round(n+e.outerHeight()+6),bottom:"auto"}),s+=e.outerHeight(),i(this).find(".flex-direction-nav").length&&i(this).css("padding-bottom",s+15)):i(this).find(".flex-control-nav, .flexslider:not(.filmstrip) .flex-direction-nav, .rslides_nav, .rslides_tabs, .nivo-directionNav, .nivo-controlNav").css({top:n+15,bottom:"auto"})}.bind(this),50)})});var t=function(t){var s=0;return i(t).each(function(t){i(this).height()>s&&(s=i(this).height())}),s}}(jQuery);