function tabTaglist(btns,content,cn){var btns=$(btns),cont=$(content),curDom=btns.eq(0);btns.each(function(i){$(this).attr('i',i);if(i>0){var domD=$(document.createElement('dd'));domD.addClass('hidden');cont.append(domD)}});btns.bind('click',function(){var tp=$(this),index=tp.attr('i'),dom_dd=cont.find('dd');if(index==0)tp.attr('hasdata','1');if(tp[0]==curDom[0])return;if(!tp.attr('hasdata')){cont.find('dd').eq(tp.attr('i')).html('<div id="marginloading">ÓÎÏ·¼ÓÔØÖÐ...</div>');$.ajax({type:'get',url:'http://localhost/tabdata/index2011/1.php?i='+index+'&d'+new Date().getDate(),dataType:'json',success:function(d){var datalist=d['gamedata'],htmlStr=[],thiscont=cont.find('dd').eq(tp.attr('i'));for(var j=0;j<datalist.length;j++){htmlStr.push('<a href="'+datalist[j]['l'].replace('*','/html/')+'"><img src="http://localhost/'+datalist[j]['i']+'" alt="'+datalist[j]['t']+'" />'+datalist[j]['t']+'</a>')}thiscont.html(htmlStr.join(''));tp.attr('hasdata','1')}})}tp.addClass(cn);curDom.removeClass(cn);dom_dd.eq(curDom.attr('i')).addClass('hidden');dom_dd.eq(index).removeClass('hidden');curDom=tp})}function tabTops(ids,casss,btns,cont,cls){var bid=$(ids),btn=$(btns),cls=cls||'current',cont=$(cont),preCur=btn.eq(0);btn.bind('mouseover',function(){var tp=$(this),i=btn.index(tp),pi=btn.index(preCur);if(tp[0]==preCur[0])return;if(i==0){bid.removeClass(casss)}else{bid.addClass(casss)}preCur.removeClass(cls);cont.eq(pi).addClass('hidden');tp.addClass(cls);cont.eq(i).removeClass('hidden');preCur=tp})}