
var epdofitvids=epdofitvids||function(a){a.fn.fitVidsEP=function(b){if(_EPYT_.epresponsiveselector.constructor!==Array){_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector)}var c={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],e="&shy;<style>.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%;}</style>";f.className="fit-vids-style";f.id="fit-vids-style";f.style.display="none";f.innerHTML=e;d.parentNode.insertBefore(f,d)}if(b){a.extend(c,b)}return this.each(function(){var g=_EPYT_.epresponsiveselector;if(c.customSelector){g.push(c.customSelector)}var h=a(this).find(g.join(","));h=h.not("object object");h.each(function(){var o=a(this);if(this.tagName.toLowerCase()==="embed"&&o.parent("object").length||o.parent(".fluid-width-video-wrapper").length||o.css("position")==="absolute"){return}if(o.is("[data-origwidth]:not([width])")){o.attr("width",o.data("origwidth"))}if(o.is("[data-origheight]:not([height])")){o.attr("height",o.data("origheight"))}var i=(this.tagName.toLowerCase()==="object"||(o.attr("height")&&!isNaN(parseInt(o.attr("height"),10))))?parseInt(o.attr("height"),10):o.height(),l=!isNaN(parseInt(o.attr("width"),10))?parseInt(o.attr("width"),10):o.width(),m=i/l;if(!o.attr("id")){var n="fitvid"+Math.floor(Math.random()*999999);o.attr("id",n)}if(o.parent().hasClass("epyt-video-wrapper")){try{o.parent().addClass("fluid-width-video-wrapper").attr("style","padding-top: "+(m*100)+"% !important;");o.removeAttr("height").removeAttr("width")}catch(j){}}else{var k=document.createElement("div");k.className="fluid-width-video-wrapper";try{o.wrap(k).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+(m*100)+"% !important;");o.removeAttr("height").removeAttr("width")}catch(j){}}})})};a(document).ready(function(){a("body").fitVidsEP();a(document).ajaxSuccess(function(c,d,b){if(d&&d.responseText&&d.responseText.indexOf("<iframe ")!==-1){a("body").fitVidsEP()}})});return true};try{epdofitvids(window.jQuery)}catch(err){};