$(document).ready(function(){	
	
		var params = { allowScriptAccess: "always", allowfullscreen: "true" };
		var atts = { id: "video-player-ID" };
		swfobject.embedSWF("http://www.youtube.com/e/IS0f7sw1_Yw?enablejsapi=1&playerapiid=player-instance&modestbranding=1&rel=0&showinfo=0&fs=1",
	   "home-intro-video", "550", "310", "8", null, null, params, atts, 
	   playerReady);

        // callback function for SWFObject. Need to place JQuery code inside the callback function because the SWFObject
        // won't be ready to use (or reference from JQuery) until the callback is called. Also, I had to manually set the width 
        // and height of the Flash object because for some reason applying a class to it didn't work. 
		function playerReady(e) {
		    $("#video-player-ID").hide();
			$("#home-video-link").click(function() {
    			$("#video-player-ID").css("margin-left","50px");
				$("#video-player-ID").show();
			});
		}
	
});

