jQuery(function() {
				
        jQuery('.liansuo>ul>li.more').hover( function(){jQuery(this).find('span').css('display','block')},
											function(){jQuery(this).find('span').css('display','none')})
		 jQuery('.menubox>ul>li.ak').hover( function(){jQuery(this).find('div').css('display','block')},
											function(){jQuery(this).find('div').css('display','none')})

		var sbtn = jQuery('.searchBox>span>strong');
		var sele = jQuery('.searchBox>span>em');

		sbtn.click( function(){
			if( sele.is(':visible') )
				{sele.hide();}
			else{sele.show();return false;}
					      });
		jQuery("body").click(function(){
			sele.hide();
			});

		sele.find('b').click(function(){
						var vals = jQuery(this).text();
						sbtn.find('ins').text(vals);
						sele.hide()
						});

// tab function
jQuery('.itab>strong').mouseover(function() { TabSelect(".itab>strong", ".stbox", "off", jQuery(this)) });jQuery('.itab>strong').eq(0).trigger("mouseover");
jQuery('.newstop>h2>strong').mouseover(function() { TabSelect(".newstop>h2>strong", ".ntopbox", "off", jQuery(this)) });jQuery('.newstop>h2>strong').eq(0).trigger("mouseover");

function TabSelect(tab,con,addClass,obj) {
    var $_self = obj;
    var $_nav = jQuery(tab);
    $_nav.removeClass(addClass),
	$_self.addClass(addClass);
    var $_index = $_nav.index($_self);
    var $_con = jQuery(con);
    $_con.hide(),
	$_con.eq($_index).show();
}
})

// 单行滚动
function AutoScroll(obj){
$(obj).find("ul:first").animate({
marginTop:"-25px"
},500,function(){
$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
});
}
$(document).ready(function(){
setInterval('AutoScroll("#ticker")',3000)
});

// moodApp
var moodApp = new Object();
moodApp = {
	moodTotal: 8,
	$: function (s) {
		return (typeof s == "object") ? s : document.getElementById(s);
	},
    mouseOver: function (indexid) {
        for (var i=0;i<this.moodTotal;i++) {
			if(i == indexid){
				this.$('mood-app-btn-'+indexid+'').className = 'btn-active';
			} else {
				this.$('mood-app-btn-'+i+'').className = 'btn';
			}
        }
	}
};

//深度游策划
jQuery(function(){
	var page = 1;
	var len = parseInt(jQuery('.rollItems>ul>li').length/2);
	var t_width =parseInt(jQuery(".rollItems>ul>li:first").width()*2);  

	jQuery('.goR').click(function(){
			if( !jQuery('.rollItems>ul').is(":animated") ){
				if( page == len ){  
					jQuery('.rollItems>ul').animate({marginLeft:'0'}, 500); 
						page = 1;
				}else{
					jQuery('.rollItems>ul').animate({marginLeft:'-='+t_width}, 200); 
						page++;
				}
			 }
				});

	jQuery('.goL').click(function(){
			if( !jQuery('.rollItems>ul').is(":animated") ){
				if( page == 1 ){  
					jQuery('.rollItems>ul').animate({marginLeft:'-='+t_width*(len-1)}, 200); 
						page = len;
				}else{
					jQuery('.rollItems>ul').animate({marginLeft:'+='+t_width}, 500); 
						page--;
				}
			 }
				});
})

//深度游策划
jQuery(function(){
	var page = 1;
	var len = parseInt(jQuery('.rollItems2>ul>li').length/2);
	var t_width =parseInt(jQuery(".rollItems2>ul>li:first").width()*2);  

	jQuery('.goR2').click(function(){
			if( !jQuery('.rollItems2>ul').is(":animated") ){
				if( page == len ){  
					jQuery('.rollItems2>ul').animate({marginLeft:'0'}, 500); 
						page = 1;
				}else{
					jQuery('.rollItems2>ul').animate({marginLeft:'-='+t_width}, 200); 
						page++;
				}
			 }
				});

	jQuery('.goL2').click(function(){
			if( !jQuery('.rollItems2>ul').is(":animated") ){
				if( page == 1 ){  
					jQuery('.rollItems2>ul').animate({marginLeft:'-='+t_width*(len-1)}, 200); 
						page = len;
				}else{
					jQuery('.rollItems2>ul').animate({marginLeft:'+='+t_width}, 500); 
						page--;
				}
			 }
				});
})



