<!--[if IE]><style type="text/css"> div.code { overflow:auto; }</style><![endif]-->

<!--[if lte IE 6]><style> .gainlayout { height: 0px; }</style><![endif]-->

<!--[if IE 7]><style>.gainlayout { zoom: 1; }</style><![endif]-->

// JavaScript Document
// initialise plugins
	$(document).ready(function() { 
        $('ul.mainMenu').superfish({ 
        delay:       1000,
// one second delay on mouseout 
        animation:   {opacity:'show',height:'show'},// fade-in and slide-down animation 
        speed:       'normal',
// faster animation speed 
        autoArrows:  false,
// disable generation of arrow mark-up 
        dropShadows: false
// disable drop shadows 
        }); 
    });

$(document).ready(function(){

	$("a").addClass("tooltip");

});

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

// starting the script on page load
$(document).ready(function(){

	tooltip();

});
