!function(a){"use strict";a.fn.fitvids=function(b){var c={customselector:null,ignore:null};if(!document.getelementbyid("fit-vids-style")){var d=document.head||document.getelementsbytagname("head")[0],e=document.createelement("div");e.innerhtml='

x

',d.appendchild(e.childnodes[1])}return b&&a.extend(c,b),this.each(function(){var b=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];c.customselector&&b.push(c.customselector);var d=".fitvidsignore";c.ignore&&(d=d+", "+c.ignore);var e=a(this).find(b.join(","));e=e.not("object object"),e=e.not(d),e.each(function(){var b=a(this);if(!(b.parents(d).length>0||"embed"===this.tagname.tolowercase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){b.css("height")||b.css("width")||!isnan(b.attr("height"))&&!isnan(b.attr("width"))||(b.attr("height",9),b.attr("width",16));var c="object"===this.tagname.tolowercase()||b.attr("height")&&!isnan(parseint(b.attr("height"),10))?parseint(b.attr("height"),10):b.height(),e=isnan(parseint(b.attr("width"),10))?b.width():parseint(b.attr("width"),10),f=c/e;if(!b.attr("name")){var g="fitvid"+a.fn.fitvids._count;b.attr("name",g),a.fn.fitvids._count++}b.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*f+"%"),b.removeattr("height").removeattr("width")}})})},a.fn.fitvids._count=0}(window.jquery||window.zepto);