$(document).ready(function () {
	shortcut.add('F7', function () { fontsizedown(); }, { 'type': 'keydown', 'propagate': false, 'keycode': 118 });
	shortcut.add('F8', function () { fontsizeup(); }, { 'type': 'keydown', 'propagate': false, 'keycode': 119 });
	shortcut.add('F9', function() { fontsizereset(); }, { 'type': 'keydown', 'propagate': false, 'keycode': 120 });

	$(".social_icons.with_hover a, .home_icons.with_hover a, .home_links.with_hover a").hover(ReplaceImage, ReplaceImage);
	
	function ReplaceImage(imgSrc, isHover)
	{
		var oldsrc = $("img", this).attr("src");				
		var isHover = oldsrc.indexOf('_over') > -1;
		var from = !isHover ? "" : "_over";
		var to = !isHover ? "_over" : "";
			
		if (oldsrc.match(/.jpg$/))
			$("img", this).attr("src", oldsrc.replace(from + ".jpg", to + ".jpg"));
		else if (oldsrc.match(/.png$/))
			$("img", this).attr("src", oldsrc.replace(from + ".png", to + ".png"));
		else if (oldsrc.match(/.gif$/))
			$("img", this).attr("src", oldsrc.replace(from + ".gif", to + ".gif"));
	}
});

