'use strict';var epdofitvids=epdofitvids||function(b){b.fn.fitVidsEP=function(h){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));var d={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("style"),l=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];f.className="fit-vids-style";f.id="fit-vids-style";f.textContent=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}"; l.parentNode.insertBefore(f,l)}h&&b.extend(d,h);return this.each(function(){var e=_EPYT_.epresponsiveselector;d.customSelector&&e.push(d.customSelector);e=b(this).find(e.join(","));e=e.not("object object");e.each(function(){var a=b(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length||"absolute"===a.css("position"))){a.is("[data-origwidth]:not([width])")&&a.attr("width",a.data("origwidth"));a.is("[data-origheight]:not([height])")&& a.attr("height",a.data("origheight"));var k="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),g=isNaN(parseInt(a.attr("width"),10))?a.width():parseInt(a.attr("width"),10);k/=g;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));var m=a.attr("width"),n=a.attr("height");if(a.parent().hasClass("epyt-video-wrapper"))try{a.parent().addClass("fluid-width-video-wrapper").attr("style","padding-top: "+100* k+"% !important;"),a.removeAttr("height").removeAttr("width"),setTimeout(function(){if("function"===typeof Event)var c=new Event("resize");else c=document.createEvent("Event"),c.initEvent("resize",!0,!0);window.dispatchEvent(c)},10),setTimeout(function(){parseInt(a.parent().css("padding-top"),10)>a.height()+20&&(a.parent().removeClass("fluid-width-video-wrapper").css("padding-top",""),a.attr("width",m),a.attr("height",n))},100)}catch(c){}else{g=document.createElement("div");g.className="fluid-width-video-wrapper"; try{a.wrap(g).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*k+"% !important;"),a.removeAttr("height").removeAttr("width"),setTimeout(function(){if("function"===typeof Event)var c=new Event("resize");else c=document.createEvent("Event"),c.initEvent("resize",!0,!0);window.dispatchEvent(c)},10),setTimeout(function(){parseInt(a.parent().css("padding-top"),10)>a.height()+20&&(a.parent().removeClass("fluid-width-video-wrapper").css("padding-top",""),a.attr("width",m),a.attr("height", n))},100)}catch(c){}}}})})};b(document).ready(function(){b("body").fitVidsEP();b(document).ajaxSuccess(function(h,d,f){d&&d.responseText&&-1!==d.responseText.indexOf("