<!-- hide script from old browsers

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

window.onload = function() {
	externalLinks();
}


// end hiding script from old browsers -->
$(document).ready(function() {
	$(".link").corner("rounded 3px");
	if ($('#cook-vegetarian').length > 0){
		$('#cook-vegetarian').css('display','none');
		$("#cook-vegetarian-link").click(function(event){
		  $("#cook-vegetarian").slideDown("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
		$("#cook-vegetarian-hide").click(function(event){
		  $("#cook-vegetarian").slideUp("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
	}
	if ($('#green-news').length > 0){
		$('#green-news').css('display','none');
		$("#green-news-link").click(function(event){
		  $("#green-news").slideDown("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
		$("#green-news-hide").click(function(event){
		  $("#green-news").slideUp("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
	}
	
	if ($('#deliciously-different').length > 0){
		$('#deliciously-different').css('display','none');
		$("#delicously-different-link").click(function(event){
		  $("#deliciously-different").slideDown("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
		$("#delicously-different-hide").click(function(event){
		  $("#deliciously-different").slideUp("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
	}
	if ($('#veggie-awards').length > 0){
		$('#veggie-awards').css('display','none');
		$("#veggie-awards-link").click(function(event){
		  $("#veggie-awards").slideDown("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
		$("#veggie-awards-hide").click(function(event){
		  $("#veggie-awards").slideUp("slow");
		   // Stop the link click from doing its normal thing
		   event.preventDefault();
		 });
	}

	$("ul.dropdown li").hover(function(){

		$(this).addClass("hover");
		$('ul:first',this).css('visibility', 'visible');
	
	}, function(){
	
		$(this).removeClass("hover");
		$('ul:first',this).css('visibility', 'hidden');
	
	});
	
	$("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

			

	//Execute the slideShow  
   slideShow();  
  
})

function slideShow() {  
  
    //Set the opacity of all images to 0  
    $('#mainImage img').css({opacity: 0.0});  
	$('#mainImage .hide').css({'display': 'block'});  
      
    //Get the first image and display it (set it to full opacity)  
    $('#mainImage img:first').css({opacity: 1.0});  
      
    //Call the gallery function to run the slideshow, 6000 = change to next image after 6 seconds  
    setInterval('gallery()',6000);  
      
}  
  
function gallery() {  
      
    //if no IMGs have the show class, grab the first image  
    var current = ($('#mainImage img.show')?  $('#mainImage img.show') : $('#mainImage img:first'));  
  
    //Get next image, if it reached the end of the slideshow, rotate it back to the first image  
    var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#mainImage img:first') :current.next()) : $('#mainImage img:first'));     
      
    //Set the fade in effect for the next image, show class has higher z-index  
    next.css({opacity: 0.0})  
    .addClass('show')  
    .animate({opacity: 1.0}, 1000);  
  
    //Hide the current image  
    current.animate({opacity: 0.0}, 1000)  
    .removeClass('show');  
      
    //Set the opacity to 0 and height to 1px  
    $('#mainImage .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });   
      
       
}  