$(function(){

$(".lv2_bg_long")
.wrapInner("<div></div>")
.prepend("<img src='./imgs/common/lv2_bg_long_head.gif'/>")
.append("<img src='./imgs/common/lv2_bg_long_foot.gif'/>");

$(".lv2_bg_short")
.wrapInner("<div></div>")
.prepend("<img src='./imgs/common/lv2_bg_short_head.gif'/>")
.append("<img src='./imgs/common/lv2_bg_short_foot.gif'/>");

$("#search").hover(
	function(){
		$(this).addClass("over");
	},function(){
		$(this).removeClass("over");
	}).bind("click", function(){
		if($(".query").val()=='') return false;
});


/* Rollover */
$(".rollover").each(function(){
	if($(this).hasClass('current')){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
	} else {
		$(this).mouseover(function(){
				$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
		}).mouseout(function(){
				$(this).attr("src",$(this).attr("src").replace(/^(.+)_o(\.[a-z]+)$/, "$1$2"));
		});
	}
});

/* AnchorScroll */
$(function(){
	$("a[href^=#]").click(function(){
		var Hash = $(this.hash);
		var HashOffset = $(Hash).offset().top;
		$("html,body").animate({
			scrollTop: HashOffset
		}, 500);
		return false;
	});
});


});

