  $(document).ready(function(){
	// Questions hide/show animation.
    $("div.questions dl.item dd").hide();
	$("div.questions dl.item dt span").hide();
    $("div.questions dl.item dt").click(function () {
      if ($(this).parent().find("dd").is(":hidden")) {
	  	//console.log($(this).parent().parent().find("dd"));
        $(this).parent().find("dd").slideDown("fast");
		$(this).parent().find("span").slideDown("fast");
		return false;
      } else {
        $(this).parent().find("dd").slideUp("fast");
		$(this).parent().find("span").slideUp("fast");
		return false;
      }
    });
    // Show the selected question.
    $("div.questions dl.item #selected").trigger("click");
	// Style new question items differently.
	$("div.questions dl:contains('NEW')").addClass("new");
	
	// Make parent news div clickable for increased usability based on child's link (only if link has a value).
	$("div.newsItem").click(						function(){openDeepLink(this);}	);
	$("div.SoYChoose .soY").click(					function(){openDeepLink(this);}	);
	$("div.recipe").click(							function(){openDeepLink(this);}	);
	$(".home .whatsNewItem").click(					function(){openDeepLink(this);}	);
	$(".home .row2.featured.product").click(		function(){openDeepLink(this);}	);
	$(".home .row2.featured.recipeOfMonth").click(	function(){openDeepLink(this);}	);
	
	//Open a link passed in in parent browser window.
	function openDeepLink(element, linkValue){
		var linkValue = $(element).find("a").attr("href");
		if(linkValue){
			window.open(linkValue, '_parent');	
		}
	}
	
  });