function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
/*$(function(){
	var tweeturl="http://twitter.com/status/user_timeline/shibuya1000.json?count=10&callback=?";
	$.getJSON(tweeturl, function(data){
		$("#twitter").append("<ul></ul>");
		$("#twitter ul").before("<h3><a href=\"http://www.shibuya1000.jp/blog/\" target=\"_blank\"><img src=\"img/title_twitter.gif\" alt=\"TWITTER\" title=\"TWITTER\" /></a></h3>");
		$.each(data, function(i, item){
			var txt = item.text
			.replace(/(https?:\/\/[-a-z0-9._~:\/?#@!$&\'()*+,;=%]+)/ig,'<a href="$1" target="_blank">$1</a>')
			.replace(/@+([_A-Za-z0-9-]+)/ig, '<a href="http://twitter.com/$1" target="_blank">@$1</a>')
			.replace(/#+([_A-Za-z0-9-]+)/ig, '<a href="http://search.twitter.com/search?q=$1" target="_blank">#$1</a>');
			$("<li></li>").html(txt).prependTo("#twitter ul");
		});
	});
});*/

(function(jQuery) {
	jQuery.fn.scRoller = function() {
		return this.each(function() {
			jQuery(this).click(function() {
				jQuery('html,body').animate({
					scrollTop: jQuery(jQuery(this).attr("href")).offset().top
				});
				return false;
			});
		});
	};
})(jQuery);

jQuery(function(){
	jQuery("p.pageTop a").scRoller();
});



