//load jQuery
google.load("jquery", "1.2.6");

// on page load complete, fire off a jQuery json-p query
// against Google web search
google.setOnLoadCallback(function() {
	$("ul#tabs li").each(function (i) {
		$(this).click(function () {
			var curr = $(this).attr('id');
			curr = curr.replace(/li_/,'');
			$("ul#tabs li").each(function (i) {
				var el = $(this).attr('id');
				el = el.replace(/li_/,'');
				if(el==curr){
					$(this).addClass("on");
					$("div#"+el).show();
				} else {
					$(this).removeClass("on");
					$("div#"+el).hide();
				}
			});
			return false;
		});
	});
});
