var index = 0;
$(function(){
	var tab = document.getElementById("tab");
	var menus = $("#tab>ul.tabMenu li a");
	var changeTab = function(a){
			if(a.id=="selectedTab")return;
			document.getElementById("selectedTab").removeAttribute("id");
			a.setAttribute("id","selectedTab");
			tab.className = a.rel;
		};
	menus.each(function(){
		var a = this;
		a.onmouseover = function(){changeTab(a);}
	});
	var anchor = menus.get();
	menus = null;
	var o = false;
	var st = setInterval(function(){if(!o){changeTab(anchor[0]);anchor.push(anchor.shift());}}, 2000);
//	tab.onmouseover = function(){clearInterval(st);anchor.length=0;};
	$(tab).hover(function(){o=true;},function(){o=false;});

	var flashvars = {
			pics: [
				
				"/uploadfile/active/kingspec-promotion.jpg",
				"/uploadfile/active/apacer.jpg",
				
				"/uploadfile/active/soliware.jpg"
			].join("|"),
			links: [
				
				"http://www.ssdshop.cn",
				"http://www.dzl.cc/News/news-apacer-dazle.html",
				
				"http://www.dzl.cc/News/news-dazle-ocz-ssd.html"
			].join("|"),
			texts: "",
			borderwidth:948,
			borderheight:180,
			textheight:0
	};
	var params = {
			menu: "false", wmode: "opaque", bgcolor: "#ffffff"
	}
	swfobject.embedSWF("f/pic.swf", "flashWrapper", "948", "180", "9.0.0", "expressInstall.swf",flashvars, params);
});

