<!--
var curr = 0;
var delay = 5000;//ms
var autos;
$(document).ready(function() {
					  $(".nav>div>a").bind("focus",function(){$(this).blur();});
					  $("#menu_0").addClass("hover");
					  $("#block_0").css("display","block");
					  $(".img_s>ul>li:eq("+curr+")").addClass('hover');
					  $(".menu_right>ul>li").bind("mouseover",function(){
																	   $(".menu_right>ul>li").removeClass("hover");
																	   $(this).addClass("hover");
																	   $(".about_content").css("display","none");
																	   $("#block_"+$(this).attr("item")).css("display","block");
																	   });
					  $(".nav>div>a>img").bind("mouseover",function(){
											  init();
											  $(this).fadeOut("normal",function(){
																			  $(this).attr("src",$(this).attr("src").replace(".gif","_curr.gif"));
																			  $(this).fadeIn("slow");
																			  });
										  });
					 $(".nav>div>a>img").bind("mouseout",function(){
											  $(this).fadeOut("normal",function(){
																			  $(this).attr("src",$(this).attr("src").replace("_curr.gif",".gif"));
																			  $(this).fadeIn("slow",function(){init();});
																			  });
										  });
					 autos = setInterval(autoplay,delay);
					 $.each($("img"),function($k,$v){
												  if ($v.getAttribute("resize") == 1) {
													$v.style.visibility = "hidden";
												  }
											  });
					 $.each($(".nav>div>a>img"),function($k,$v){
														 $v = $($v);
												  if ($v.attr("src").indexOf("curr") != -1) {
													$v.unbind("mouseover");
													$v.unbind("mouseout");
												  }
											  });
				  });

function init() {
	$(".nav>div>a>img").stop();
	$.each($(".nav>div>a>img"),function($k,$v){
											$v.setAttribute("src",$v.getAttribute("pre"));
											$v.style.opacity = "1";
											$v.style.filter = "(opacity=100)";
										});
}

function showimg($item) {
	$("#focus").stop();//¼ÓÒ»¸östop·ÀÖ¹ÆðÅÝ
	$mtop = -($item*$("#focus").parent().height());
	$("#focus").animate({"margin-top":$mtop+"px"},"slow");
}
function autoplay(){
	size = $(".thumb").length;
	 if (curr<size-1) {
		curr = curr+1;
	 } else {
		curr = 0;
	 }
	 $(".thumb").removeClass('hover');
	 $(".thumb:eq("+curr+")").addClass('hover');
	 showimg(curr);
}

function resizeimg(){
	$.each($("img"),function($k,$v){
								  $v = $($v);
								  if ($v.attr("resize") == "1") {
									  $v.css("visibility","visible");
									  $v.css("position","relative");
									  $pw = $v.parent().parent().width();
									  $ph = $v.parent().parent().height();
									  $iw = $v.width();
									  $ih = $v.height();
									  if ($iw<=$pw && $ih<=$ph) {
										  $pl = parseInt(($pw-$iw)/2,10);
										  $pt = parseInt(($ph-$ih)/2,10);
										  $v.css({"left":$pl+"px","top":$pt+"px"});
									  } else {
										  if ($iw/$pw >= $ih/$ph) {
											  $ow = $pw;
											  $oh = parseInt($ih/($iw/$pw),10);
											  $pt = parseInt(($ph-$oh)/2,10);
											  $v.css({"width":$ow+"px","height":$oh+"px","top":$pt+"px"});
										  } else {
											  $oh = $ph;
											  $ow = parseInt($iw/($ih/$ph),10);
											  $pl = parseInt(($pw-$ow)/2,10);
											  $v.css({"width":$ow+"px","height":$oh+"px","left":$pl+"px"});
										  }
									  }
								  }
								  });
}

window.onload = function(){
	resizeimg();
}
-->
