!function(a){a.extend(a.fn,{simpleLightboxVideo:function(){var b={delayAnimation:300,keyCodeClose:27};a.simpleLightboxVideo.vars=a.extend({},b);var c=this;return c.click(function(){if(window.innerHeight>540)var b=(window.innerHeight-540)/2;else var b=0;var c='',d='
',e='
',f='
',g='
',h='
',i="
";if(a("body").append(h+g+f+e+d+c+i),a("#slvj-window").hide(),"youtube"==a(this).data("videosite"))var j="http://www.youtube.com/embed/"+a(this).data("videoid")+"?autoplay=1";else if("vimeo"==a(this).data("videosite"))var j="http://player.vimeo.com/video/"+a(this).data("videoid")+"?autoplay=1";return a("#slvj-window").fadeIn(),a("#slvj-video-embed").attr("src",j),a("#slvj-close-icon").click(function(){a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),a("#slvj-background-close").click(function(){a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),!1}),a(document).keyup(function(b){27==b.keyCode&&a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),a(window).resize(function(){if(window.innerHeight>540)var b=(window.innerHeight-540)/2;else var b=0;a(".slvj-lightbox").css({marginTop:b+"px"})}),!1}})}(jQuery),function(a){a.simpleLightboxVideo=function(b,c){return a(c).simpleLightboxVideo()}}(jQuery);