$(function(){$("body").prepend('<div id="blackout">&nbsp;</div>');$("body").prepend('<div id="vidWindow"><img src="loading.gif"></div>');$("#vidWindow").vCenter();$("#blackout").css({width:"100%"});setHeight=(document.body.offsetHeight<screen.height)?screen.height+"px":document.body.offsetHeight+"px";$("#blackout").css({height:setHeight});$("#blackout").click(function(A){$(this).hide();$("#vidWindow").text("");$("#vidWindow").html('<img src="loading.gif">');$("#vidWindow").hide()});$(window).scroll(function(A){$("#vidWindow").vCenter()});$(".sampleVideoShow").click(function(A){$("#blackout").show();$("#vidWindow").show();$("#vidWindow").css({marginLeft:"-420px",width:"852px",height:"642px"});$("#vidWindow").text("");newHTML='<div class="innerVidDiv"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="852" HEIGHT="642" id="'+$(this).attr("id")+'VID" WMODE="transparent"> <PARAM NAME="movie" VALUE="/flash/'+$(this).attr("id")+'.swf"> <PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="transparent"><EMBED src="/flash/'+$(this).attr("id")+'.swf" quality="high"  wmode="transparent" WIDTH="852" HEIGHT="642" NAME="'+$(this).attr("id")+'.swf" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" ></EMBED></OBJECT></div><div class="clickAnywhereToClose">Click anywhere outside the video to close.</div>';$("#vidWindow").append(newHTML);$("#vidWindow").vCenter()})});(function(A){A.fn.vCenter=function(B){var C={sTop:function(){return window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},wHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight}};return this.each(function(F){if(F==0){var G=A(this);var E=G.height();var D=C.sTop()+(C.wHeight()/2)-(E/2);G.css({position:"absolute",marginTop:"0",top:D})}})}})(jQuery);