﻿// JScript 文件

$(document).ready(function(){
  // 在这里写你的代码...
  $("#ShopInfo").hover(
  function () {
    HtmlMiniCart();
  },
  function () {
    //$("#MiniShoppingCart").hide("slow");
  }
); 
}); 


function hidMiniShoppingCart(){
  $("#MiniShoppingCart").hover(
  function () {
  
  },
  function () {
    $("#MiniShoppingCart").hide("slow");
  }
  );
}


function HtmlMiniCart(){
    var BaskxmlHttp;
    if (window.ActiveXObject) {
		BaskxmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else if (window.XMLHttpRequest) {
		BaskxmlHttp = new XMLHttpRequest();
	}
    var now= new Date();
	url="/Ajax/ShowBastInfo.aspx?type=Mini&Key=" + now.getSeconds();
	BaskxmlHttp.onreadystatechange = function(){
	
	    if(BaskxmlHttp.readyState == 4) {
			if(BaskxmlHttp.status == 200) {
				 $("#main_title").append(BaskxmlHttp.responseText); 
                $("#MiniShoppingCart").show("slow");
			}
		}

	
	};
	BaskxmlHttp.open("GET", url, true);
	BaskxmlHttp.send(null);
		
		
    
   
}