// RollOver
$(function () {
    $.rollover = {
        init: function () {
            $('a img,input')
                .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();
});


// flatHeights
$(function() {
    $('div.estimate p.comment,div.takamoto p.comment').flatHeights();
    $('div.staff li.staff1').flatHeights();
	$('div.staff li.staff2').flatHeights();
    $('div.staff li.staff3').flatHeights();
    $('div.staff li.staff4').flatHeights();
});

// Accordion
$(document).ready(function() {
	$("div.qa dl dt").hover(function(){
		$(this).css("cursor","pointer");
		$(this).css("text-decoration","underline"); 
	},function(){
		$(this).css("cursor","default");
		$(this).css("text-decoration","none");
		});
	$("div.qa dl dd").css("display","none");
	$("div.qa dl dt").click(function(){
		$(this).next().slideToggle("normal");
		});
});