!function(d){"use strict";d.fn.fitVids=function(t){var e,i,r={customSelector:null};return document.getElementById("fit-vids-style")||(e=document.head||document.getElementsByTagName("head")[0],(i=document.createElement("div")).innerHTML='

x

',e.appendChild(i.childNodes[1])),t&&d.extend(r,t),this.each(function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];r.customSelector&&t.push(r.customSelector),d(this).find(t.join(",")).not("object object").each(function(){var t,e,i=d(this);"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length||(t=("object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height())/(isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10)),i.attr("id")||(e="fitvid"+Math.floor(999999*Math.random()),i.attr("id",e)),i.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),i.removeAttr("height").removeAttr("width"))})})}}(window.jQuery||window.Zepto);