jQuery(document).ready(function($) {
//	$('#topphoto').cycle({
//		fx: 'fade', 
//		timeout: 5000
//	});

	$('#nav a img, form input:image, #toptopicsblock ul li a img').rollover(); 

    $("#tabs a[href=#news]").click(function(event){
		$("#newproduct").hide();
		$("#exhibition").hide();
		$("#news").fadeIn();
		$(".tab1").attr("src","images/top_tab_1_on.gif");
		$(".tab2").attr("src","images/top_tab_2.gif");
		$(".tab3").attr("src","images/top_tab_3.gif");
		event.preventDefault();
	});
    $("#tabs a[href=#newproduct]").click(function(event){
		$("#news").hide();
		$("#exhibition").hide();
		$("#newproduct").fadeIn();
		$(".tab1").attr("src","images/top_tab_1.gif");
		$(".tab2").attr("src","images/top_tab_2_on.gif");
		$(".tab3").attr("src","images/top_tab_3.gif");
		event.preventDefault();
	});
    $("#tabs a[href=#exhibition]").click(function(event){
		$("#news").hide();
		$("#newproduct").hide();
		$("#exhibition").fadeIn();
		$(".tab1").attr("src","images/top_tab_1.gif");
		$(".tab2").attr("src","images/top_tab_2.gif");
		$(".tab3").attr("src","images/top_tab_3_on.gif");
		event.preventDefault();
	});

    $(".moreinfo a.more").click(function(event){
		if ($(this).html() == "続きを表示する") {
			$(this).html("折りたたむ");
			$(this).next().show();
//			$(".backnumber").show();
		} else {
			$(this).html("続きを表示する");
			$(this).next().hide();
//			$(".backnumber").hide();
		}
		$(this).parent().prev().slideToggle("fast");
		$(this).blur();
	});
	
	
	//search
    $("#search_input").focus(function(event){
		$("#search_input").removeClass("watermark");
	});

	$("#search_input").blur(function(event){
		if ($("#search_input").val() == '') {
			$("#search_input").addClass("watermark");
		}
	});

	$("<address>Copyright &copy; 2012. Nabeya Bi-tech Kaisha All Rights Reserved.</address>").replaceAll("address"); 

});


