﻿// JavaScript Document

$(document).ready(function() {
	
	$("#topMenu ul li ul li").hover(
	  function () {
		$(this).parent().parent().children("a").addClass("hover");
	  }, 
	  function () {
		$(this).parent().parent().children("a").removeClass("hover");
	  }
	);
	
	//Change color of Buy Wines nav item
	$("#topMenu ul li a:contains('Buy Wines')").addClass("altColor");
	
	//show drop down menu if you are in the current section
	$("#topMenu ul li a.v65-pageAParent").parent().children("ul").css("display", "block");
	
	//Hide pod outline if there is no content
	if ($(".leftPod").length > 0){
		
		var podText = $('.leftPod').html();
		//alert(podText.length);
		if (podText.length < 12) {
			$(".leftPod").css("display", "none");		
		}
		
	}
	
	//Activate Left//
	$('.toggle').css('cursor','pointer').click(function() {
	  
	 	$(this).toggleClass('toggleActive').next(".toggleBox").slideToggle("slow");
		return true;
	  
	});
	
	$('.v65-promoGroupProductTitle a').each(function(){
    	var first = $(this);
	    first.html(first.html().replace(/^(\w+)/, ''));
	});


});
