jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
}; 

$(function () {
	$('#pageTop a,.pageTop a')
		.click(function () {
			$('html,body').animate({ scrollTop: 0 }, 300, 'quart');
			return false;
		 });
	$('a.blank')
		.click(function(){
			window.open(this.href,"","");
			return false;
		});
		
	//#maintenance
	$('#wn dl,#blog dl').each(function (){
		var elm = $(this).find('a');
		var eHref = elm.attr('href');
		if(eHref != null){
			$(this)
				.css('color','#016e92')
				.hover(
					function (){
						$(this).addClass('hover');
					},
					function (){
						$(this).removeClass('hover');
					}
				)
				.click(
					function(){
						if(elm.attr("class") == "blank"){
							window.open(eHref,'','');
							return false;
						} else if(elm.attr("class") == "thickbox") {
							return false;
						} else {
							location.href = eHref;
						}
				})
				.css('cursor','pointer')
			.end();
		}else{
			$(this).addClass('none');
		}
	});
	$('#wn dl:last-child').css('border','none');
	
    $('#read div.mainContents dl:first').addClass('first');
		
	$('div#utility a').hover(
		function(){
			$(this).parent().addClass('hover');
		},
		function(){
			$(this).parent().removeClass('hover');
		}
	);
});
