if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) == 6)
{
	try
  {
		document.execCommand("BackgroundImageCache", false, true);
	}
	catch (err)
	{
	}
}

/*
Cufon.replace('h1', {fontSize: '19px', wordSpacing: '-6%'});
Cufon.replace('h2', {fontSize: '15px', wordSpacing: '-6%'});
Cufon.replace('.relativebox_top', {fontSize: '14px', wordSpacing: '-3%'});
*/

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 15;
		yOffset = 5;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip").hover(function(e){
		this.t = this.title;
		this.title = "";
		$("body").append("<p id='tooltip'><span>"+ this.t +"</span></p>");
		
		tt = $("#tooltip");
		w = tt.width();
		tt.css("top",(e.pageY - yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px")
			.css("width", w > 300 ? 300 : w )
			.fadeIn("fast");
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - yOffset) + "px")
			.css("left",(e.pageX + xOffset) + "px");
	});			
};


var page_actions = {
	
	
};


$(document).ready(function(){
	
	body_id = document.body.id;
	if(page_actions[body_id])
	{
		page_actions[body_id]();
	}

 	$('#mood_list').innerfade({
	    	animationtype: 'fade'
			, speed: 1500
			, timeout: 6000
			, containerheight: '209px'
	}); 


	$("#mainnav").lavaLamp({
		fx: "easeOutExpo",
		speed: 1000
	});


	
	var i = 0;
	$(".relativebox_content li").each(function() {
		if(i++)
		{
			$(this).hide();
		}
	});
	 
	$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_square'});	
	
	tooltip();

});


