$(function() {
	$('#navlist a').tooltip({
		track: true,
		delay: 100,
		showURL: false,
		//showBody: " - ",
		fade: 250
	});
	$('#footernav a').tooltip({
		track: true,
		delay: 100,
		showURL: false,
		//showBody: " - ",
		fade: 250
	});
});



//PRELOAD IMAGES
jQuery.preloadImages = function() {
      for(var i = 0; i<arguments.length; i++) {           jQuery("<img>").attr("src", arguments[i]);
     }
}



$(document).ready(function(){
    
	//preload images  
	$.preloadImages('/img/tab_active.png','/img/tab_active.gif','/img/tab_hover.gif','/img/tab_hover.png','/img/tab_inactive.gif','/img/tab_inactive.png','/img/bg_sb_boton.gif','/img/bg_sb_boton_over.gif' );
   


    $("#sidebar li a").hover(
      function () {
        //$(this).animate({"left": "+=50px"}, "slow");
		//$(this).fadeOut("slow");


		  $(this).animate({ 
		/*
			width: "70%",
			opacity: 0.4,
			marginLeft: "0.6in",
			fontSize: "3em", 
			borderWidth: "10px"
		*/
			paddingLeft:"30px"
		  }, 500 );
      }, 
      function () {
        //$(this).animate({"left": "-=50px"}, "slow");
		//$(this).fadeIn("slow");
		  $(this).animate({ 
			//fontSize: "11px", 
			paddingLeft:"20px"

		  }, 200 );

     }
    );


});






$(document).ready(function(){
	$('.btn').each(function(){
		var b = $(this);
		var tt = b.text() || b.val();
		if ($(':submit,:button',this)) {
			b = $('<a>').insertAfter(this). addClass(this.className).attr('id',this.id);
			$(this).remove();
		}
		b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>').
		text(tt).append('<i></i><span></span>'));
	});
});
