/*!
* Vidbg v1.0 (https://github.com/blakedotvegas/vidbg)
* Vidbg By Blake Wilson
* @license Licensed Under MIT (https://github.com/blakedotvegas/vidbg/master/LICENSE)
*/
!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):e.jQuery)}(this,function($){"use strict";function e(e){var t={},o,i,s,n,r,a,c;for(r=e.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,",").split(","),c=0,a=r.length;a>c&&(i=r[c],-1===i.search(/^(http|https|ftp):\/\//)&&-1!==i.search(":"));c++)o=i.indexOf(":"),s=i.substring(0,o),n=i.substring(o+1),n||(n=void 0),"string"==typeof n&&(n="true"===n||("false"===n?!1:n)),"string"==typeof n&&(n=isNaN(n)?n:+n),t[s]=n;return null==s&&null==n?e:t}function t(e){e=""+e;var t=e.split(/\s+/),o="50%",i="50%",s,n,r;for(r=0,s=t.length;s>r;r++)n=t[r],"left"===n?o="0%":"right"===n?o="100%":"top"===n?i="0%":"bottom"===n?i="100%":"center"===n?0===r?o="50%":i="50%":0===r?o=n:i=n;return{x:o,y:i}}function o(t,o,i){this.$element=$(t),"string"==typeof o&&(o=e(o)),i?"string"==typeof i&&(i=e(i)):i={},this.settings=$.extend({},s,i),this.path=o;try{this.init()}catch(r){if(r.message!==n)throw r}}var i="vidbg",s={volume:1,playbackRate:1,muted:!0,loop:!0,autoplay:!0,position:"50% 50%",overlay:!1,resizing:!0},n="Not implemented";o.prototype.init=function(){var e=this,o=e.path,s=o,r="",a=e.$element,c=e.settings,d=t(c.position),p,u;u=e.$wrapper=$('
').css({position:"absolute","z-index":-1,top:0,left:0,bottom:0,right:0,overflow:"hidden","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover","background-repeat":"no-repeat","background-position":d.x+" "+d.y}),"object"==typeof o&&(o.poster?s=o.poster:o.mp4?s=o.mp4:o.webm&&(s=o.webm)),u.css("background-image","url("+s+")"),"static"===a.css("position")&&a.css("position","relative"),a.css("z-index","1"),a.is("body")&&u.css({position:"fixed"}),a.prepend(u),"object"==typeof o?(o.mp4&&(r+='