$(function() {
                $(window).scroll(function(){
					var scrollTop = $(window).scrollTop();
					if(scrollTop != 0)
						$('#top-nav-holder').stop().animate({'opacity':'0.2'},400);
					else	
						$('#top-nav-holder').stop().animate({'opacity':'1'},400);
				});
				
				$('#top-nav-holder').hover(
					function (e) {
						var scrollTop = $(window).scrollTop();
						if(scrollTop != 0){
							$('#top-nav-holder').stop().animate({'opacity':'1'},400);
						}
					},
					function (e) {
						var scrollTop = $(window).scrollTop();
						if(scrollTop != 0){
							$('#top-nav-holder').stop().animate({'opacity':'0.2'},400);
						}
					}
				);
            });

$(document).ready(function() {

            $(".login").click(function(e) {          
				e.preventDefault();
                $("fieldset#login_menu").toggle();
				$(".login").toggleClass("menu-open");
            });
			
			$("fieldset#login_menu").mouseup(function() {
				return false
			});
			$(document).mouseup(function(e) {
				if($(e.target).parent("a.login").length==0) {
					$(".login").removeClass("menu-open");
					$("fieldset#login_menu").hide();
				}
			});			
			
        });

(function($){
 $.fn.extend({
 
 	customStyle : function(options) {
	  if(!$.browser.msie || ($.browser.msie&&$.browser.version>6)){
	  return this.each(function() {
	  
			var currentSelected = $(this).find(':selected');
			$(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner">'+currentSelected.text()+'</span></span>').css({position:'absolute', opacity:0,fontSize:$(this).next().css('font-size')});
			var selectBoxSpan = $(this).next();
			var selectBoxWidth = parseInt($(this).width()) - parseInt(selectBoxSpan.css('padding-left')) -parseInt(selectBoxSpan.css('padding-right'));			
			var selectBoxSpanInner = selectBoxSpan.find(':first-child');
			selectBoxSpan.css({display:'inline-block'});
			selectBoxSpanInner.css({width:288+"px", display:'inline-block'});
			var selectBoxHeight = parseInt(selectBoxSpan.height()) + parseInt(selectBoxSpan.css('padding-top')) + parseInt(selectBoxSpan.css('padding-bottom'));
			$(this).height(selectBoxHeight).change(function(){
				selectBoxSpanInner.text($(this).val()).parent().addClass('changed');
			});
			
	  });
	  }
	}
 });
})(jQuery);
 
 
$(function(){
 
$('select.select-style').customStyle();
 
});
$(function(){ 
								
				
				$('a.comments').aToolTip({
		    		fixed: true,
					toolTipClass: 'more-tip',
    				xOffset: -138,
    				yOffset: -35
				});
				$('a.read-more').aToolTip({
		    		fixed: true,
					toolTipClass: 'more-tip',
    				xOffset: -112,
    				yOffset: -35
				});
				$('a.print').aToolTip({
		    		fixed: true,
					toolTipClass: 'more-tip',
    				xOffset: -115,
    				yOffset: -35
				});
				
				$('ul.spottip li a').aToolTip({
		    		toolTipClass: 'spottip',
    				xOffset: 10,
    				yOffset: 5
				});
				
				$('#bak-rec a.comments').aToolTip({
		    		fixed: true,
					toolTipClass: 'bak-more-tip',
    				xOffset: -138,
    				yOffset: -35
				});
				$('#bak-rec a.read-more').aToolTip({
		    		fixed: true,
					toolTipClass: 'bak-more-tip',
    				xOffset: -112,
    				yOffset: -35
				});
				$('#bak-rec a.print').aToolTip({
		    		fixed: true,
					toolTipClass: 'bak-more-tip',
    				xOffset: -115,
    				yOffset: -35
				});
					
				$('#baby-rec a.comments').aToolTip({
		    		fixed: true,
					toolTipClass: 'baby-more-tip',
    				xOffset: -138,
    				yOffset: -35
				});
				$('#baby-rec a.read-more').aToolTip({
		    		fixed: true,
					toolTipClass: 'baby-more-tip',
    				xOffset: -112,
    				yOffset: -35
				});
				$('#baby-rec a.print').aToolTip({
		    		fixed: true,
					toolTipClass: 'baby-more-tip',
    				xOffset: -115,
    				yOffset: -35
				});
				$('#ent-win a.comments').aToolTip({
		    		fixed: true,
					toolTipClass: 'ent-more-tip',
    				xOffset: -138,
    				yOffset: -35
				});
				$('#ent-win a.read-more').aToolTip({
		    		fixed: true,
					toolTipClass: 'ent-more-tip',
    				xOffset: -112,
    				yOffset: -35
				});
				$('#ent-win a.win-more').aToolTip({
		    		fixed: true,
					toolTipClass: 'ent-more-tip',
    				xOffset: -112,
    				yOffset: -35
				});
				$('#ent-win a.print').aToolTip({
		    		fixed: true,
					toolTipClass: 'ent-more-tip',
    				xOffset: -115,
    				yOffset: -35
				});
			}); 


       jQuery(document).ready(function () {
           jQuery('#Recipe').replaceWith('<div id="outer_recipe"><div id="inner_recipe"><div id="Recipe">'+ $('#Recipe').html() + '</div></div></div>');
       });
	   

