// jQuery - Setting file

jQuery(function($) {
	$.GATracker = function(ga_code) {
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		$.getScript(gaJsHost + "google-analytics.com/ga.js", function() {
			try {
				var pageTracker = _gat._getTracker(ga_code);
				pageTracker._trackPageview();
			} catch(err) {}
		});
	};
	$.GATracker('UA-7202200-30');

	$('a[@href^="http"]')
		.not('a[href^="http://'+ location.host +'"]')
		.click(function() {
			window.open(this.href, '');
			return false;
		});

	var image_cache = new Object();
	$("#gNavi a img").not(".active").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; }
		);
	});
});

