﻿jQuery(function($){
	var len = $("#searchtype a").length;
	$("#searchtype").toggle(function(){
		if($("#selectoption").css("top") == "0px"){
			$(this).animate({height: (len*15+2)+'px'}, 200);
		} else {
			$(this).animate({height: (len*15+2)+'px'}, 200);
			$("#selectoption").css({top: '0px'});
		}
	}, function(){
		$(this).animate({height: '15px'}, 200);
	});
	$("#searchtype a").click(function(){
		var index = $("#searchtype a").index(this);
		var thisval = $(this).attr("lang");
		$("#selectoption").css({top: index*(-15)});
		$("#field option[value="+thisval+"]").attr("selected","selected");
	});
	//回到顶部
	$(".retruntop a").click(function(){
		$("html,body").animate({scrollTop: "0px"}, 600, "easeInOutQuad");
		return false;
	});
	$(".tips span.tipscon").toggle(function(){
		$(this).attr("title","展开").addClass("block");
		$(this).parents(".tips").animate({ 
			height: '20px'									   
		}, 300);										
	}, function(){
		$(this).attr("title","收起").removeClass("block");
		$(this).parents(".tips").animate({ 
			height: '100%'									   
		}, 300);	
	});
	var	RightPosition = Math.floor((window.screen.width-920)/2)-51;	
	$("#siderqq").css({right:RightPosition});
	$(window).scroll(function(){
		var windowTop=$(window).scrollTop();
		$("#siderqq").css({
   			top: windowTop+270
 		});
	});
	
	$("#siderqq h2 a").toggle(function(){
		$("#siderqq ul").slideUp(600);
		$("#siderqq h2 img").attr("src","/skin/timshine/images/index/sider_open.gif"); 
	},function(){
		$("#siderqq ul").slideDown(600);
		$("#siderqq h2 img").attr("src","/skin/timshine/images/index/sider_closed.gif"); 
	});
	/*$("#albumdetail li").hover(function(){
		$(this).addClass("hover");									
	}, function(){
		$(this).removeClass("hover");
	});
	$(".prorightlist li").hover(function(){
		$(this).addClass("hover");									
	}, function(){
		$(this).removeClass("hover");
	});
	
	//放大图Start
	$("#albumbig span").css({opacity: 0.65})
	var options = {
		zoomType: 'standard',
	    zoomWidth: 200,
	    zoomHeight: 200,
		position: "left"
	}
	$("#albumbig a").jqzoom(options);
	$("#isl_cont li").mouseover(function(){
		var ind = $("#isl_cont li").index(this);
		$("#albumbig a").eq(ind).show().siblings("a").hide();
		$("#isl_cont li").eq(ind).addClass("curr").siblings("li").removeClass("curr");
	});
	var LTime = 0;
	var len = $("#isl_cont li").length-2;
	$("#next_d").click(function(){
		if (LTime == len) return;
		$('#isl_cont ul').animate({top: (-86 * (++LTime))+19 +'px'}, 'slow');
	});
	$("#pre_d").click(function(){
		if (LTime == 0) return;
		$('#isl_cont ul').animate({top: (-86 * (--LTime))+19 +'px'}, 'slow');
	});*/
	//放大图End
});
function CheckPl(obj){
if(obj.saytext.value==""){
	alert("您没什么话要说吗？");
	obj.saytext.focus();
	return false;
}
	return true;
}
