﻿$(document).ready(function(){
	
	$("ul.bannerArea p.overText:not(.white)").FontEffect({
		outline: true,
		outlineColor1: "#FFFFFF",
		outlineWeight: 2
	});
	$("ul.bannerArea p.white").FontEffect({
		outline: true,
		outlineColor1: "#666666",
		outlineWeight: 1
	});

	$("#localSearchText, #keyText")
	.focus( function(){ $(this).css("background-color", "#FFFFFF"); } )
	.blur( function(){
		if ($(this).val()==""){
			$(this).css("background-color", "transparent");
		}
	});
	$("#localSearchButton, #keyButton")
	.hover(
		function(){ $(this).attr("src","/2009/images/town/search_btn_02.gif"); },
		function(){ $(this).attr("src","/2009/images/town/search_btn_01.gif"); }
	)
	.click( function(){ $(this).submit(); });
	
	$("#toSmall").click(function(event){
		$("body").css("font-size","75%");
		writeCookie("75%");
		return false;
	});
	$("#toMiddle").click(function(event){
		$("body").css("font-size","0.95em");
		writeCookie("0.95em");
		return false;
	});
	$("#toLarge").click(function(event){
		$("body").css("font-size","150%");
		writeCookie("150%");
		return false;
	});
});

function writeCookie(Size) {
	var size = Size;
	$.cookie("fsize",size,{expires:30,path:'/'});
}
