
// rounded corners
jQuery("#bookingBot .tabNavigation li a").corner("top 7px");
jQuery("#featuredTop .jp_jquery_tabs li a").corner("top 5px");
jQuery("#left .menuWrap .menu").corner("bottom 5px");

jQuery(document).ready(function() {
	jQuery('#mainMenu').removeClass('noJS');
	jQuery("#mainMenu ul li.level-1").hover(
		function() {
			//jQuery(this).addClass("hover");
			jQuery("#mainMenu ul li.level-1").removeClass("active");
			jQuery(this).addClass("active");
		},
		function() {
			//jQuery(this).removeClass("hover");
			jQuery(this).addClass("active");
	});
	
	

	// EQUAL HEIGHT COLUMNS
	function equalHeight(group) {
	    tallest = 0;
	    group.each(function() {
	        thisHeight = jQuery(this).height();
	        if(thisHeight > tallest) {
	            tallest = thisHeight;
	        }
	    });
	    group.height(tallest);
	}
	// Add a unique class for any group of items
	// that need an equal height
	equalHeight(jQuery("#featuredHotels .item"));
	equalHeight(jQuery("#travelPlanner .item"));
	equalHeight(jQuery("#showcase .moduletable"));
	equalHeight(jQuery(".equalHeight1"));
	equalHeight(jQuery(".equalHeight2"));
	
	
	//temp hack to work with the slow load times of toplevel
	//we reset the height of the columns and then run the 
	//equalheight column function after 5 seconds
	setTimeout(function() {
		jQuery(".equalHeight1").removeAttr("style");
		equalHeight(jQuery(".equalHeight1"));
	}, 5000);
	

	// loads the URLs from a select drop down
	jQuery("#left .boxSelector select").change(function(){
		window.location=jQuery(this).val();
		return false;
	});

	jQuery("#diningWidget .url select").change(function(){
		window.location=jQuery(this).val();
		return false;
	});
	

	
	
}); // close document.ready



	//STRIPING ALTERNATING ITEMS
	//jQuery(".item div").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
	//jQuery(".item div:even").addClass("alt");
	//});

	// zebra striping (remember javascript starts counting at 0)
	jQuery('#contentWrap .cityNews .item:odd').addClass('even');
	jQuery('#contentWrap .cityNews .item:even').addClass('odd');
	
	jQuery('#contentWrap .TravelSpot.item:odd').addClass('even');
	jQuery('#contentWrap .TravelSpot.item:even').addClass('odd');

	jQuery('.restaurantCat a:odd').addClass('even');
	jQuery('.restaurantCat a:even').addClass('odd');
	
	jQuery('.dealFeed .item:odd').addClass('even');
	jQuery('.dealFeed .item:even').addClass('odd');
	
	// toggles the recommend link
	jQuery("#contentWrap .cityNews .item .recommend").hide();
	jQuery("#contentWrap .cityNews .item").hover(
		function(){
			jQuery(this).children("span.recommend").show();
		},
		function(){
			jQuery(this).children("span.recommend").hide();
		}
	);

	// toggles the view map link
	jQuery(".mapLink").hide();
	jQuery(".dealFeed .item").hover(
		function(){
			jQuery(this).children(".mapLink").show();
		},
		function(){
			jQuery(this).children(".mapLink").hide();
		}
	);
