
// WP has to handle multiple js lins so the jquery '$' doesn't work by default.
var $ = jQuery.noConflict();


// -----------------------------------------------------------------------------
// Social Media Button Text Labels:

/* This drives the display of the floating "text label" boxes over the Social Media Buttons in the header. (requires jquery) 
/* NOTE: Non-IE Browsers get a nice fade-on. In IE the overlays just turn on/off. (there were problems with how IE was fading on the transparent PNG background) */ 

function initSocialMediaLabels() {
	// RSS Button
	$("#rssLink").hover(function () {
		if ($.browser.msie ) { $("#rssLabel").show(); }	// IE
		else { $("#rssLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#rssLink").mouseleave(function () {
    	$("#rssLabel").hide();
	});
	
	// Facebook Button
	$("#facebookLink").hover(function () {
		if ($.browser.msie ) { $("#facebookLabel").show(); }	// IE
		else { $("#facebookLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#facebookLink").mouseleave(function () {
    	$("#facebookLabel").hide();
	});
	
	// Twitter Button
	$("#twitterLink").hover(function () {
			if ($.browser.msie ) { $("#twitterLabel").show(); }	// IE
			else { $("#twitterLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#twitterLink").mouseleave(function () {
    	$("#twitterLabel").hide();
	});
	
	// YouTube Button
	$("#youtubeLink").hover(function () {
			if ($.browser.msie ) { $("#youtubeLabel").show(); }	// IE
			else { $("#youtubeLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#youtubeLink").mouseleave(function () {
    	$("#youtubeLabel").fadeOut(100);
	});
	
	// iFood Button
	$("#ifoodLink").hover(function () {
			if ($.browser.msie ) { $("#ifoodLabel").show(); }	// IE
			else { $("#ifoodLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#ifoodLink").mouseleave(function () {
    	$("#ifoodLabel").fadeOut(100);
	});
	
	// Email Button
	$("#emailLink").hover(function () {
			if ($.browser.msie ) { $("#emailLabel").show(); }	// IE
			else { $("#emailLabel").fadeIn(100); }			// Non-IE Browsers
	});
	$("#emailLink").mouseleave(function () {
    	$("#emailLabel").hide();
	});
}
