﻿document.oncontextmenu = function() { return false;};

$(function(){

	$('.indfaq>dt').mouseover(function(){
		$(this).next('dd').show();
		$(this).addClass('active').siblings('.active').removeClass('active').next('dd').hide();
		return false;
	})


	$('.tab_1 a').each(function(i){
		$(this).mouseover(function(){
			$('.tab_1 a').eq(i).addClass('cur').siblings().removeClass('cur');
			$('.tab_1_show .tab_1_text').eq(i).show().siblings().hide();
			return false;
		}).focus(function(){this.blur();});
	});

	$('.nav>li').each(function(i){
		$(this).mouseover(function(){
				$(this).addClass('show');
			}).mouseout(function(){
				$(this).removeClass("show");
		});
	});
	
})

/* index photo show */
/*var t = n = count = 0;
$(function(){
    count = $("#play_list a").size();
    $("#play_list a:not(:first-child)").hide();
    $("#play_info").html($("#play_list a:first-child").find("img").attr('alt'));
    $("#play_text li:first-child").addClass('cur');
    $("#play_info").click(function(){window.open($("#play_list a:first-child").attr('href'), "_blank")});
    $("#play_text li").click(function() {
        var i = $(this).text() - 1;
        n = i;
        if (i >= count) return;
        $("#play_info").html($("#play_list a").eq(i).find("img").attr('alt'));
        $("#play_info").unbind().click(function(){window.open($("#play_list a").eq(i).attr('href'), "_blank")})
        $("#play_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
        $(this).addClass('cur').siblings().removeClass('cur');
        
    });
    t = setInterval("showAuto()", 4000);
    $("#play").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 4000);});
})

function showAuto()
{
    n = n >= (count - 1) ? 0 : n + 1;
    $("#play_text li").eq(n).trigger('click');
}*/



/* products */
function ShowDiv(ObjID) {
	for(var i=1;i<6;i++) {
		if(document.getElementById("m0"+i)) {
			document.getElementById("m0"+i).className=(ObjID==i)?"cur":"";
			document.getElementById("c0"+i).className=(ObjID==i)?"":"hidden";
		} else return;
	}
}





function getRandom(){return Math.round(Math.random()*2147483647);}
function getCaptcha() {
	var image = new Image();
	var url = "ValidateCode.html?random=" + getRandom();
	image.src = url;
	image.onload = function() {
		$("#img_validate_code")
			.attr("src", url);
		$("#txtCaptcha").focus().select();
	}
}
