// JavaScript Document
function submitForm(){
	$("#promotionForm").submit();
}
$(document).ready(function(){
	$("#name").addClass("inputName");
	$("#name").focus(function(){
		$(this).addClass("inputNameActive").removeClass("inputName");
		if ($(this).val() == "姓名") $(this).val("");
	}).blur(function(){
		$(this).removeClass("inputNameActive").addClass("inputName");
		if ($(this).val() == "") $(this).val("姓名");
	});
	$("#mobile").addClass("inputMobile");
	$("#mobile").focus(function(){
		$(this).addClass("inputMobileActive").removeClass("inputMobile");
		if ($(this).val() == "手机号码") $(this).val("");
	}).blur(function(){
		$(this).removeClass("inputMobileActive").addClass("inputMobile");
		if ($(this).val() == "") $(this).val("手机号码");
	});
	$("#email").addClass("inputEmail");
	$("#email").focus(function(){
		$(this).addClass("inputEmailActive").removeClass("inputEmail");
		if ($(this).val() == "电子邮箱") $(this).val("");
	}).blur(function(){
		$(this).removeClass("inputEmailActive").addClass("inputEmail");
		if ($(this).val() == "") $(this).val("电子邮箱");
	});
	
	//lightbox
	$("#btPopupWinner").click(function(e){
		e.preventDefault();
		$("#lightbox").height($(document).height());
		$("#lightbox, #lightbox-panel").show();
		$(window).scroll(0,0);
	});
	$("#btCloseWinnderPopup").click(function(e){
		e.preventDefault();
		$("#lightbox, #lightbox-panel").hide();
	});
});

var params = {
	quality: "high",
	scale: "noscale",
	wmode: "transparent",
	allowscriptaccess: "always",
	bgcolor: "#B10097"
};
var flashvars = {
	siteXML: "swf/home/xml/site.xml",
	sitePath: "swf/home/"
};
var attributes = {
	id: "flashcontent",
	name: "flashcontent"
};
swfobject.embedSWF("swf/home/homepage.swf", "flashcontent", "980", "801", "9.0.124", "expressInstall.swf", flashvars, params, attributes);
