// Accordion
$(document).ready(function() {
	$("div.section h3.messagetitle").hover(function(){
		$(this).css("cursor","pointer"); 
	},function(){
		$(this).css("cursor","default"); 
		});
	$("div.section div.message").css("height","4em");
	$("div.section h3.messagetitle").click(function(){
		$(this).next().slideToggle("normal");
		});
});

// Scroll
//$(function(){
//   $('p.pagetop a').click(function(){
//　　$('#wrapper').ScrollTo(1000, 'easeout');
//　　return false;
//   });
//})


//RollOver
$(function () {
    $.rollover = {
        init: function () {
            $('a img,input[type="image"]').not('[src*="_on."]')
                .bind('mouseover', this.over)
                .bind('mouseout',  this.out)
                .each(this.preload);
        },

        over : function () {
            this.setAttribute('src', this.getAttribute('src').replace('_off.', '_on.'));
        },

        out : function () {
            this.setAttribute('src', this.getAttribute('src').replace('_on.', '_off.'));
        },

        preload : function () {
            new Image().src = this.getAttribute('src').replace('_off.', '_on.');
        }
    };

    $.rollover.init();
});