$(document).ready(function(){
	$(".trustholder").css("top",$(document).height()-105+"px");
	$(".trustholder").css("left",$(document).width()-110+"px");
	$(".trustholder").css("position","absolute");
	
	
	
	
	//webinar box
	fixwebi();
	setTimeout(fixwebi,5);
	setTimeout(fixwebi,1500);
	setTimeout(fixwebi,2500);
	function fixwebi(){
		//alert("I'm fixing"+$("#justwebi").height());
		if($("#justwebi").height()>0){
	$("#webinartext").css("top",(($("#justwebi").height()-$("#webinartext").height())/2)+"px");
		}
	
	}
	$("#justwebi img, #webinartext").css("opacity",.7);
	
						   
						   $("#justwebi").hover(function(){
														 
														
														 $("#justwebi img, #webinartext").animate({"opacity":1},{queue:false, duration:1000});
														 
														 
														 },
														 function(){
														 
														 $("#justwebi img, #webinartext").animate({"opacity":.7},{queue:false, duration:1000});
														 
														 
														 }
														 
														 
							); //end of just webi hover
	
	
	
	
	
	
	
	
	setmov();
	
	
	function setshrink(){
	
	$("#player").mouseout(function(){
		
		$(this).css({"width":"300px","height":"250px","top":"0px"});
		
		//$(this).animate({"width":"300px","height":"250px","top":"0px"},{queue:false, duration:1000});
		$("#player").unbind();
		setmov();
	});
	}
	
	
	function setmov(){
		
		
		$("#vidstarter a,#player").click(function(){
			if($("#vidstarter").length>0){
				$("#player").html(" ");
			}
			
			//alert("i clicked");
		
		$("#player").css({"width":"542px","height":"452px","top":"-202px"});
		$("#vidshrinker").css("top","-200px");
		
		
		$("#player").unbind();
		
		
		
		
		flowplayer("player", {src: '/js/flowplayer-3.2.7-0.swf', wmode: 'opaque'}
		
		,  {
		
	// player configuration goes here
	clip: {
//url:"http://www.purecaps.com/vid/pierrefitzgibbon.500k.mp4",
url:"http://www.purecaps.com/vid/RejuvenAge.mp4",
autoPlay: true,
autoBuffering: true
}
	
	
	
	
});
		
		
		
		
		
		
		
		
		
		
		
		
		//$(this).animate({"width":"500px","height":"417px","top":"-167px"},{queue:false, duration:1000});
		
		//$("#player").unbind();
		//setshrink();
	}); //end of player click
		
		
	}
	
	
	$("#vidshrinker a").click(function(){
		$("#player").css({"width":"300px","height":"250px","top":"0px"});
		$("#vidshrinker").css("top","-2800px");
		$("#player").html("<div id=\"vidstarter\"><a href=\"Javascript:;\"><img src=\"images_11/loadcirc.gif\" width=\"300\" height=\"250\" border=\"0\" /></a></div>");
		setmov();
		
	});
	
	
	
	
						   });





