/* function clc(){
	if(document.getElementById('ikw').value=='请输入查询内容'){
		document.getElementById('ikw').value='';
		document.getElementById('ikw').tip="1";
	}
}
function bout(){
	if(document.getElementById('ikw').value==''){
		document.getElementById('ikw').value='请输入查询内容';
		document.getElementById('ikw').tip="0";
	}else{
		document.getElementById('ikw').tip="1";	
	}
}
 */
function startmarquee(elementID,h,n,speed,delay){
	var t = null;
	var box = '#' + elementID;
	$(box).hover(function(){
		clearInterval(t);
		}, function(){
		t = setInterval(start,delay);
	}).trigger('mouseout');
	function start(){
		$(box).children('ul:first').animate({marginTop: '-='+h},speed,function(){
			$(this).css({marginTop:'0'}).find("li").slice(0,n).appendTo(this);
		})
	}
}

$(document).ready(function(){

/*------渐变按钮------*/
	$('.nav a').css('opacity', 0).hover(
	function(){
		$(this).stop().fadeTo(400, 1)
	},function(){
		$(this).stop().fadeTo(350, 0);
	});

/*------tab click------*/
	$(".tabnt span,.picst span,.ft span").mouseover(function(){
		$(this).addClass("hovern").siblings("span").removeClass("hovern").parent().next().children().hide();
		$("."+$(this).attr("id")).show();
	});
	
/*------hot hover------*/
	$(".hots dl").mouseover(function(){
		$(this).attr("class","hover").siblings("dl").attr("class","no");
	})
	
/*------hover------*/
$(".sidernav1 a,.smenu a").hover(
  function () {
    $(this).addClass("hover");
  },
  function () {
    $(this).removeClass("hover");
  });
  $(".sguide a").hover(
  function () {
    $(this).addClass("current");
  },
  function () {
    $(this).removeClass("current");
  });
	
	
/*------input value------*/
$("#ikw").focus(function(){
	if(this.value == this.title)
	this.value = '';
});
$("#ikw").blur(function(){
	if(this.value == '')
	this.value = this.title;
});

/*------marquee------*/
	
	startmarquee('media_logo',48,3,1000,3000);
});
