$(function(){
	if ($('#pageID').length == 1) {
	 	var id = '#' + $('#pageID').val();
	 	if ($(id).length == 1) {
//			$(id).removeClass('imgover').attr('src', $(id).attr('src').replace(/\_off.(gif|jpe?g|png)$/, '_on.$1'));
			$(id).removeClass('imgover').attr('src', $(id).attr('src').replace(/\.(gif|jpe?g|png)$/, '_ov.$1'));
		}
	}

	if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 9){
		$('.imgover').not('[src*="'+ '_ov' +'."]').mouseover(function(){
			$(this).attr('src', $(this).attr('src').replace(/\.(gif|jpe?g|png)$/, '_ov.$1'));
		});
		$('.imgover').not('[src*="'+ '_ov' +'."]').mouseout(function(){
			$(this).attr('src', $(this).attr('src').replace(/_ov\.(gif|jpe?g|png)$/, '.$1'));
		});
	} else {
		$('.imgover').not('[src*="'+ '_ov' +'."]').mouseover(function(){
			$(this).animate({opacity:"0.5"},10).attr('src', $(this).attr('src').replace(/\.(gif|jpe?g|png)$/, '_ov.$1')).animate({opacity:"1"},1000);
		});
		$('.imgover').not('[src*="'+ '_ov' +'."]').mouseout(function(){
			$(this).attr('src', $(this).attr('src').replace(/_ov\.(gif|jpe?g|png)$/, '.$1')).animate({opacity:"1"},10);
		});
	}
});
$(window).unload(function() {	});

$(function(){
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 300);
				return false;
			}
		}
	});
});


//$(function(){
//   $.fadeRollover();
//});


$(function(){
	$('#header li a').focus(function(){
		$(this).blur();
	});
});


