// 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() {
	
	// 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;
	});
	
	
	// rollOver
	
	$('.rollOver img:not([src$=_on.jpg])').rollover('_over');
	$('.rollOver input:image').rollover('_over');
	
	// mouseWheel
	if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false);
	window.onmousewheel = document.onmousewheel = wheel;
	
});

function wheel()
{
	$(':animated').queue('fx', []).stop();
}

var	w = null;
WinInfo = new Array();

function MM_openBrWindow(theURL,wid,hei){
	theName="sub";
	setupWin (theName,"scrollbars=no",wid,hei);
	if (theURL){
		w = open(theURL,theName,WinInfo[theName]);	
	}else{
		if(w) w.close();
	}
	if (w.focus) w.focus();
}

function setupWin(theName, theScrollbars, W, H) {
	X = 0;
	Y = 0;
	if (theName!="pop" && screen.availWidth) {
		X = (screen.availWidth-W) / 2;
		Y = (screen.availHeight-H) / 2;
	}
	WinInfo[theName] = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,dependent=yes,";
	WinInfo[theName] += theScrollbars + ",width=" + W + ",height=" + H + ",screenX=" + X + ",screenY=" + Y + ",left=" + X + ",top=" + Y;
}

