function initMenu() {
  $('#productmenu ul').hide();
  $('#productmenu li a').click(
    function() {
        $(this).next().slideToggle('normal');	
      }
    );
  }
	
$(document).ready(function(){
//Feature Product													 
	$(".featured_product a").append("<em></em>");
	$(".featured_product a").hover(function() {
		$(this).find("em").animate({opacity: "show", top: "70"}, "slow");
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide", top: "-70"}, "fast");
	});
	$('.feature_pro img').hover(
		function(){
			$(this).animate({opacity: "0.8"}, "slow");
		},
		function () {
			$(this).animate({opacity: "1"}, "slow");
		  }
	);
//Page Load
/*	$(window).load(function(){
		$("#loading").fadeOut("slow");	
		$("#backgroundPopup").fadeOut("slow");
	});
*///Fload Menu	
	 var top = $('#productmenu').offset().top - parseFloat($('#productmenu').css('margin-top').replace(/auto/, 0));
    $(window).scroll(function (event) {
      // what the y position of the scroll is
      var y = $(this).scrollTop();
      // whether that's below the form
      if (y >= top) {
        // if so, ad the fixed class
        $('#productmenu').addClass('fixed');
      } else {
        // otherwise remove it
        $('#productmenu').removeClass('fixed');
      }
    });
	
//accordion
	initMenu();
//Numberic	
	$("#quantity").keypress(function(e){ 
		if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)){
			return false;
		}	
	});
//Form
		$("#form-receive").css("display","none");
		$("#sameaddress").click(function(){
			if ($("#sameaddress").is(":checked")){
				$("#form-receive").slideDown(1200);
			}else{	   
				$("#form-receive").slideUp('slow');
			}
		});
});

