/* ##############
Tooltip function
http://flowplayer.org/tools/tooltip/index.html
################ */

$(function() {

	// any elements with a class of "tip" will have the tooltip display the content in the next nested DIV with class "tooltip" for styling or "tooltipinversed" for one with pinter upwards
	$(".tip").tooltip({
		effect: 'fade',
		fadeInSpeed: '400',
		fadeOutSpeed: '200',
		opacity: '0.8'
	});
	

	$(".footertip").tooltip({
		effect: 'fade',
		fadeInSpeed: '400',
		fadeOutSpeed: '200',
		/* [X, Y] */
		offset: [-8, 0]
		/* For Inversed tooltip container use these 2 values and add a comma to above value
		position: 'bottom center',
		offset: [-5, 0]
		*/
	});
	
	// any elements with a title tag will be overiden and the tooltip will display the tiutle tag content
	/*
	$("[title]").tooltip({
		effect: 'fade',
	});
	*/
	
	/* example applied to the Demo ID and its child image and title tag content will be displayed
	$("#demo img[title]").tooltip(); 
	*/
	
});

/* ##############
Text (or element) Fade function
http://cssbeauty.com/skillshare/discussion/1593/jquery-fade-in-on-mouse-over/

fade options: slow, normal or fast are available - "normal" speed used below
this applies to the a elements in a containing div with the class "top-link" 
$(".top-links a").fadeTo...
################ */

/* Fade UP on hover */
$(function(){
$(".top-links a, span.voucher").fadeTo("normal", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads

$(".top-links a, span.voucher").hover(function(){
$(this).fadeTo("normal", 0.9999); // This should set the opacity to 99.99% on hover - counteract MAC FF and Camino blink
},function(){
$(this).fadeTo("normal", 0.6); // This should set the opacity back to 60% on mouseout
});
});

/* Fade DOWN on hover */
/* had this also... but mkaing font jagged in FF on MAC - may be due to being only 11px size:  .subfooter a  */ 
$(function(){
$(".button").fadeTo("normal", 0.9999); // This sets the opacity of the thumbs to fade down to 60% when the page loads - counteract MAC FF and Camino blink

$(".button").hover(function(){
$(this).fadeTo("normal", 0.6); // This should set the opacity to 100% on hover
},function(){
$(this).fadeTo("normal", 0.9999); // This should set the opacity back to 99.99% on mouseout - counteract MAC FF and Camino blink
});
});


/* ##############
Superfish jquery ease drop down sublevels script - it automatically adds the   &raquo; to elements that have a sub menu !!! WOW - can gide the class that displays these if required
http://users.tpg.com.au/j_birch/plugins/superfish/#examples
################ */

$(function(){
        $("ul.sf-menu").superfish(); 
    });
