/*------------------------------------------------------------
	Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
	Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
	Web Site: http://txkang.com
	Script featured on Dynamic Drive (http://www.dynamicdrive.com)
	
	Please retain this copyright notice in the script.
	License is granted to user to reuse this code on 
	their own website if, and only if, 
	this entire copyright notice is included.
	var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' 
						var szs = new Array( '8px','9px','10px','11px','12px','15px','17px' );
--------------------------------------------------------------*/

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr','class','ul','li','a','span','font','table','p');

//Specify spectrum of different font sizes:
var szs = new Array( '8px','9px','10px','11px','12px','15px','17px' );
var startSz = 3;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}



 $(document).ready(function() {  
   
     //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','');  
           
         //Append the tooltip template and its value  
         $(this).append('<div id="tooltip"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div><div class="tipFooter"></div></div>');       
           
         //Set the X and Y axis of the tooltip  
         $('#tooltip').css('top', e.pageY + 5 );  
         $('#tooltip').css('left', e.pageX + 10 );  
           
         //Show the tooltip with faceIn effect  
         $('#tooltip').fadeIn('500');  
         $('#tooltip').fadeTo('10',0.8);  
           
     }).mousemove(function(e) {  
       
         //Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse  
         $('#tooltip').css('top', e.pageY + 5 );  
         $('#tooltip').css('left', e.pageX + 10 );  
           
     }).mouseout(function() {  
       
         //Put back the title attribute's value  
         $(this).attr('title',$('.tipBody').html());  
       
         //Remove the appended tooltip template  
         $(this).children('div#tooltip').remove();  
           
     });  
   
 });  
   
