$(document).ready(function() {
   // tooltips for footer logos/images
   $('#footer-logo a[title], #awards img[alt]').qtip({
		content: { text: false, 'font-size': 10 },
		position: { corner: { tooltip: 'bottomMiddle' , target: 'topMiddle' } },
		style: { fontSize: 10, name: 'dark', tip: 'bottomMiddle', title: { 'color': 'red', 'font-size': 10 }, border: { width: 2, radius: 4 } }
   });
   
   $('#lang2 a[title]').qtip({
		content: { text: false, 'font-size': 10 },
		position: { corner: { tooltip: 'topMiddle' , target: 'bottomMiddle' } },
		style: { fontSize: 10, name: 'dark', tip:{ corner: 'topMiddle', size:{ x:10, y:5}}, title: { 'color': 'red', 'font-size': 10 }, border: { width: 1, radius: 2 } }
   });
   
   // add swap image and css class to rightbox
   $(".rightbox").hover(function() {
	  var srcOn = $(this).find("img:first").attr("src");
	  srcOn = srcOn.replace(".gif","_on.gif");
	  $(this).find("img:first").attr("src",srcOn);
	  $(this).find("p").addClass("rightboxHover");
	  }, function() {
	  var srcOff = $(this).find("img:first").attr("src");
	  srcOff = srcOff.replace("_on.gif",".gif");
	  $(this).find("img:first").attr("src",srcOff);
	  $(this).find("p").removeClass("rightboxHover");
	});
   
   // remove border-bottom from last rightbox on page
   $('.rightbox:last').css('border','0px');
   
   // set up mega menu
   function addMega(){
        $(this).addClass("hovering");
   }
   function removeMega(){
        $(this).removeClass("hovering");
   }
   var megaConfig = {
         interval: 200,
         sensitivity: 4,
         over: addMega,
         timeout: 500,
         out: removeMega
   };
   $("li.mega").hoverIntent(megaConfig);
   
   // megamenu for restaurants

//    $(".mega").hoverIntent(megaConfig);
   
});
