//SmoothScroll

Event.observe(window, "load", function(){
									   
$$(".scroll-top").each(function(ele){
	Event.observe(ele, "mouseover", function(){
	ele.setStyle({
	textDecoration: "underline",
	cursor : "pointer"
	});
	});
	Event.observe(ele, "mouseout", function(){
	ele.style.textDecoration="none";
	});

	Event.observe(ele, "click", function(){
	new Effect.ScrollTo($("header"));
	});

});

}, false);



// *** rollover

conf = {
       className : 'btn',
       postfix : '_on'
};
function setMouseOverImages() {
       $A(document.getElementsByClassName(conf.className)).each(function (node){
               node.onmouseout = changeSrcFunction(node.src);
               node.onmouseover =
			    changeSrcFunction(node.src.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1"));
       });
}
function changeSrcFunction(data){
       return function(){ this.src = data; }
}
Event.observe(window, 'load', setMouseOverImages, false);


// *** hyperlink
Event.observe(window, "load", function(){
	$$(".entry a").each(function(ele){
		if (ele.href.indexOf("iiyamaman.com")  < 0){
		ele.target = "_blank";
		}
	});
}, false);

