// 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() {

	$('.rollOver img').rollover('_over');
	$('.rollOver input:image').rollover('_over');


	//easingScroll
	$('a[href="#top"], a[href="#content"]').click(function() {
		$(':animated').queue('fx', []).stop();
		var targetOffset = 0;
		var targetId = $(this).attr("href");
		if (targetId != "#top") {
			targetOffset = $(targetId).offset().top;
		}
		$('html,body').animate({ scrollTop: targetOffset }, 500, 'easeOutQuart');
		return false;
	});
	// 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 openWin(theURL, wid, hei, theName){
	SetupWin (theName,"scrollbars=yes,",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;
}