$(document).ready(function(){
           mainmenu(); 

    
function mainmenu()
{
    $(" #nav ul ").css({display: "none"}); // Opera Fix
    $(" #nav li").hover
	(
		function()
		{
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(60);
		},
	
		function()
		{
		     $(this).find('ul:first').css({visibility: "hidden"});
		}
	);

}
	
    });
	$(document).ready(function()
	{
	
		$("#emaillogo").hover
		(
			function ()
			{
				$("#emailtitle").show();
			}, 
			function () 
			{
				$("#emailtitle").hide();
			}
		);

		$("#bloglogo").hover
		(
			function () 
			{
				$("#blogtitle").show();
				$("#bloghover").show();

			}, 
			function () 
			{
				$("#blogtitle").hide();
				$("#bloghover").hide();
			}
		);

		$("#maplogo").hover
		(
			function () 
			{
				$("#maptitle").show();
			}, 
			function () 
			{
				$("#maptitle").hide();
			}
		);

		$("#loginlogo").hover
		(
			function () 
			{
				$("#logintitle").show();
			}, 
			function () 
			{
				$("#logintitle").hide();
			}
		);

		
		$(function() {
			$('img[data-hover]').hover(function() {
				$(this).attr('tmp', 
						$(this).attr('src')).attr('src', 
							$(this).attr('data-hover')).attr('data-hover', 
								$(this).attr('tmp')).removeAttr('tmp');
			}, function() {
				$(this).attr('tmp', 
						$(this).attr('src')).attr('src', 
							$(this).attr('data-hover')).attr('data-hover', 
								$(this).attr('tmp')).removeAttr('tmp');
			});
		});



	});

	jQuery.fn.inlineOffset = function() {
    var el = $('<i/>').css('display','inline').insertBefore(this[0]);
    var pos = el.offset();
    el.remove();
    return pos;
	};


/*	

	$(document).ready(function()
	{


		$('.wp_keywordlink_affiliate').mouseenter(function(){

			

			var theurl = "/get-term/?term=" + escape($(this).html());
			var return_value= $.ajax({ type: "GET", url: theurl, async: false }).responseText;

			$("#bubblecontent").html(return_value);
			//$("#bubblecontent").html("positionleft; " + $(this).inlineOffset().left + "<br />" + $(this).width());
			$("#mybubble").css({"left": $(this).inlineOffset().left + "px", "top": ($(this).position().top - $("#mybubble").height() + 6) + "px"});
			$("#mybubble").stop(true, true).fadeIn("slow");

		
		});

		$('.wp_keywordlink_affiliate').mouseleave(function(){ 
			
			$("#mybubble").stop(true, true).fadeOut("slow");
		});


	});
	
	*/
