$(document).ready(function() {
    // var hbody = $('body').height() + 18;
    //  var hcontent = $('.yui-g').height() + 18;
    //  if (hbody > hcontent) {
    //      $('.yui-g').height(hbody);
    //  } else {
    //      $('.yui-g').height(hcontent);
    //  }
	$('.ingredients').hide();
	$('h4.toggler')
	    .wrap("<a href='#nogo'></a>")
	    .click(function() {
	        $(this).toggleClass('toggler_active').parent().next('.ingredients').slideToggle('slow');
	    });
    $.localScroll();
   
    // fix strange ie7 bug (thx http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/)
    /*$(function() {
    	var zIndexNumber = 1000;
    	$('div').each(function() {
    		$(this).css('zIndex', zIndexNumber);
    		zIndexNumber -= 10;
    	});
    });*/
    
    
    $('#main_menu li a').hover(
        function() {  $(this).parent().parent().children().not($(this).parent()).children().stop().animate({ opacity: 0.5 }, 500 ); },
        function() {  $(this).parent().parent().children().not($(this).parent()).children().stop().animate({ opacity: 1 }, 500 ); }
    );
    opts = {
      distances : [40,40,40],
      leftShifts : [85,200,310],
      bubbleTimes : [400,400,400],
      hideDelays : [0,0,0],
      bubbleWidths : [200,200,200],
      bubbleImagesPath : "/images/skins/classic",
      msieFix : true
   };
   if($('.bubble').length){
   	$('.bubble').codaBubble(opts);
   }

	
});
