// jquery config
$(function () {
	if (! $.browser.safari) {
		$('a.uplink').click(function () {
			$(this).blur();
			$('html,body').animate({ scrollTop: 0 }, 'easeout');
			return false;
		});
		$('.uplink a').click(function () {
			$(this).blur();
			$('html,body').animate({ scrollTop: 0 }, 'easeout');
			return false;
		});
	}
});


function openwin(href,w,h){
	var win;
	win = window.open(href,'win','toolbar=0 , location=0 , directories=0 , status=0 , menubar=0 , scrollbars=1 , resizable=1 , width='+w+' , height='+h);
	win.focus();
}


function initRollOverImages() {
	var image_cache = new Object();
	$("img.btn").not("[src*='_on.']").each(function(i) {
		var imgsrc = this.src;
		var dot = this.src.lastIndexOf('.');
		var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
		image_cache[this.src] = new Image();
		image_cache[this.src].src = imgsrc_on;
		$(this).hover(
			function() { this.src = imgsrc_on; },
			function() { this.src = imgsrc; }
		);
	});
}

$(document).ready(initRollOverImages);
