
function MM_preloadImages() { //v3.0
var d=document;
	if(d.images){ 
		if(!d.MM_p)
			d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image;
				d.MM_p[j++].src=a[i];
			}
	}
}
MM_preloadImages('/images/tipHeader.gif','/images/tipFooter.gif');

/*function tooltip_afterajaxpostback(){
	//Select all anchor tag with rel set to tooltip
	$('a[rel=tooltip]').mouseover(function(e) {
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('title');
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('title','');

		if(tip!=null){
			//Append the tooltip template and its value
			$(this).append('<div id="tooltips"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div><div class="tipFooter"></div></div>');
		}
		
		//Show the tooltip with faceIn effect
		$('#tooltips').fadeIn('500');
		$('#tooltips').fadeTo('10',1);
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltips').css('top', e.pageY);
		$('#tooltips').css('left', e.pageX + 20 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('title',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$(this).children('div#tooltips').remove();
		
	});
}
function tooltip_afterajaxpostback_name(){
	$('a[rel=tooltip]').show();
	//Select all anchor tag with rel set to tooltip
	$('a[rel=tooltip]').mouseover(function(e) {
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('name');
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('name','');

		if(tip!=null){
			//Append the tooltip template and its value
			$(this).append('<div id="tooltips"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div><div class="tipFooter"></div></div>');
		}
		
		//Show the tooltip with faceIn effect
		$('#tooltips').fadeIn('500');
		$('#tooltips').fadeTo('10',1);
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltips').css('top', e.pageY);
		$('#tooltips').css('left', e.pageX + 20 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('name',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$(this).children('div#tooltips').remove();
		
	});
}*/
function tooltip_afterajaxpostback(){
	//Select all anchor tag with rel set to tooltip
	$('a[rel=tooltip]').mouseover(function(e) {
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('title');
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('title','');

		if(tip!=null){
			//Append the tooltip template and its value
			$('body').append("<div id='tooltips'><div class='tipHeader'><\/div><div class='tipBody'>" + tip + "<\/div><div class='tipFooter'><\/div><\/div>");
		}
		
		//Show the tooltip with faceIn effect
		//$('#tooltips').fadeIn('500');
		//$('#tooltips').fadeTo('10',1);
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltips').css('top', e.pageY+5);
		$('#tooltips').css('left', e.pageX + 10 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('title',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$('body').children('div#tooltips').remove();
		
	});
}
function tooltip_afterajaxpostback_name(){
	$('a[rel=tooltip]').mouseover(function(e) {
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('title');
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('title','');

		if(tip!=null){
			//Append the tooltip template and its value
			$('body').append("<div id='tooltips'><div class='tipHeader'><\/div><div class='tipBody'>" + tip + "<\/div><div class='tipFooter'><\/div><\/div>");
		}
		
		//Show the tooltip with faceIn effect
		//$('#tooltips').fadeIn('500');
		//$('#tooltips').fadeTo('10',1);
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltips').css('top', e.pageY+5);
		$('#tooltips').css('left', e.pageX + 10 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('title',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$('body').children('div#tooltips').remove();
		
	});
}
