var flashvars = {};
var params = {};
params.wmode = "transparent";
params.allowfullscreen = "true";
params.allowscriptaccess = "always";
var attributes = {};
attributes.id = "flashvid";
	
$(function(){
	// setTimeout("hideAll()", 1000);
	swfobject.embedSWF("http://blip.tv/play/gr0dgYb1CgA", "video", "400", "300", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

	$("a.tip").each(function() {
		$(this).qtip({
			style: {
				border: {
					width: 5,
					radius: 5
				},
				width: {
					max: 400
				},
				textAlign: "left",
				tip: true,
				"padding": "8px 12px",
				name: "dark"
			},
			position: {
				corner: {
					target: "rightMiddle",
					tooltip: "leftMiddle"
				},
				adjust: {
					x: 4,
					screen: true
				}
			},
			content: {
				text: $(this).attr("rev"),
				title: {
					text: $(this).html(),
					button: "Close"
				}
			},
			show: "click",
			hide: {
				when: {
					event: "unfocus"
				},
				fixed: true
			}
		});
	});
});

function hideAll(){
	for (i = 0; i < 6; i++) {
		$("#month" + i).slideUp("medium");
	}
}

function toggleDiv(id){
	$("#" + id).slideToggle("fast");
}

function loadVideo(playId, clickTarget) {
	$("#flashvid").remove();
	$("#div_video").html("<div id='video'></div>");
	htmlText = clickTarget.innerHTML;
	$("#featured_tip").html(htmlText);
	if ($(".edit").length == 0) {
		clickTarget.innerHTML = htmlText + '<img src="/i/training/loader_small.gif" class="edit"/>';
	}
	var flashURL = "http://blip.tv/play/" + playId;
	swfobject.embedSWF(flashURL, "video", "400", "300", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
	setTimeout("$('.edit').remove();", 1000);
}
fbPageOptions = {
	disableScroll: true
};