// jQuery Easing v1.3
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

$(document).ready(function() {
	if ($("#contents").height() > $("#aside").height()) {
		$("#aside").height($("#contents").height());
	}
	// easingScroll
	$('a[@href^="#"]').click(function() {
		$('html:animated, body:animated').queue('fx', []).stop();
		var targetOffset = 0;
		
		var targetId = $(this).attr("href");
		if (targetId != "#") {
			if (targetId.search(/^#tabs/i) == -1) {
				targetOffset = $(targetId).offset().top;
			} else {
				return false;
			}
		}
        	$('html,body').animate({ scrollTop: targetOffset }, 500, 'easeOutQuart');
		return false;
	});

	// mouseWheel
	
	if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false);
	window.onmousewheel = document.onmousewheel = wheel;
	
	
	// rollover
	$('.rollOver img').rollover('_over');
	$('.rollOver input:image').rollover('_over');
	
});

function wheel()
{
	$('html:animated, body:animated').queue('fx', []).stop();
}
