/*
* jQuery Background video plugin for jQuery
* ---
* Copyright 2011, Victor Coulon (http://victorcoulon.fr)
* Released under the MIT, BSD, and GPL Licenses.
* based on jQuery Plugin Boilerplate 1.3
*/
(function(c){c.backgroundVideo=function(g,h){var a=this;a.settings={};var f=function(){var b;b=c(window).width();var d=c(window).height(),e=d/a.settings.height;if(b/d>=a.settings.width/a.settings.height)e=b/a.settings.width;b=e;c("#"+a.settings.videoid).width(b*a.settings.width);c("#"+a.settings.videoid).height(b*a.settings.height)};a.settings=c.extend({},{videoid:"video_background"},h);a.el=g;(function(){var b="";b+='<video id="'+a.settings.videoid+'" preload="auto" autoplay="autoplay" loop="loop"';
b+='style="display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:-100;width:100%;height:100%;">';for(var d=0;d<a.settings.types.length;d++)b+='<source src="'+a.settings.path+a.settings.filename+"."+a.settings.types[d]+'" type="video/'+a.settings.types[d]+'" />';b+="bgvideo</video>";c("body").prepend(b);c("#"+a.settings.videoid).fadeIn(2E3);f()})();c(window).resize(function(){f()});c("#"+a.settings.videoid).bind("ended",function(){this.play()})}})(jQuery);

