/*! For license information please see script-library-jquery.fitvids.js.LICENSE.txt */
!function(t){"use strict";t.fn.fitVids=function(i){var e={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],d=document.createElement("div");d.innerHTML='<p>x</p><style id="fit-vids-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>',r.appendChild(d.childNodes[1])}return i&&t.extend(e,i),this.each((function(){var i=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];e.customSelector&&i.push(e.customSelector);var r=".fitvidsignore";e.ignore&&(r=r+", "+e.ignore);var d=t(this).find(i.join(","));(d=(d=d.not("object object")).not(r)).each((function(){var i=t(this);if(!(i.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length)){i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16));var e=("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));if(!i.attr("name")){var d="fitvid"+t.fn.fitVids._count;i.attr("name",d),t.fn.fitVids._count++}i.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),i.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto),((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{})["scriptLibraryJquery.fitvids"]={};