$(function(){
 $.ajax({
   url: "/includes/topproducts.html",
   success: function(html){
     $("#products").html(html);
   }
});
var sm =$("#smenu");
var smdl =$("#smenu dl");

var ma = $("#nav a");

ma.hover(function(){
    var num =  ma.index($(this));
    smdl.hide();
	pp=ma.eq(num).offset().left-3;
    sm.find("dl").eq(num).show().css("left",pp);
	$(this).addClass("now");
 },function(){
	 smdl.hide();
	 $(this).removeClass("now");
 });
 
smdl.hover(function(){
   var num =  smdl.index($(this));
   ma.eq(num).addClass("now");
   ma.unbind("hover");
   $(this).show();    
 },function(){
   $(this).hide(); 
   var num =  smdl.index($(this));
   ma.eq(num).removeClass("now");
 })

  $("#menu li").eq(2).hover(function(){
									 $(this).addClass("now2");
									 $("#products").show();
									 },function(){
										 $(this).removeClass("now2");
										 $("#products").hide();
										 })
  $("#products").hover(function(){
								 $("#menu li").eq(2).addClass("now2");							
								 $("#products").show();
								 },function(){
									  $("#menu li").eq(2).removeClass("now2");
									  $("#products").hide();
									 })
  if(document.all){//for IE    
$(document).ready(function(){$("a").each(function(){this.hideFocus = true;});});}

})
