
$(function(){
     $('a img').hover(function(){
        $(this).attr('src', $(this).attr('src').replace('_off', '_on'));
          }, function(){
             if (!$(this).hasClass('currentPage')) {
             $(this).attr('src', $(this).attr('src').replace('_on', '_off'));
        }
   });
});


//スムーススクロール id="toTop"指定
$(function(){
     $("#top a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});


$(function () {
     $('.container img').hide();
});

var i = 0;
var int=0;
$(window).bind("load", function() {
     var int = setInterval("doThis(i)",500);
});

function doThis() {
     var images = $('img').length;
     if (i >= images) {
          clearInterval(int);
    }
    $('img:hidden').eq(0).fadeIn(500);
    i++;
} 



$(function () {
     $("form :input").focus(function() {
          $("label[for='" + this.id + "']").addClass("labelfocus");
     });

     $("form :input").blur(function() {
          $("label[for='" + this.id + "']").removeClass("labelfocus");
     });
});


$(function(){
     $(".focus").focus(function(){
          if(this.value == "キーワードを入力"){
               $(this).val("").css("color","#f39");
          }
     });
     $(".focus").blur(function(){
          if(this.value == ""){
               $(this).val("キーワードを入力").css("color","#969696");
          }
     });
});


$(function(){
     $(".open").click(function(){
      $("#slideBox").slideToggle("slow");
     });
});



$(function() {
   $('#accordion dd').hide();
   $('#accordion dt a').click(function(){
       $('#accordion dd').slideUp();
       $(this).parent().next().slideDown();
       return false;
   });
});


$(document).ready(function() {
    $('.imgArea').children().hover(function() {
        $(this).siblings().stop().fadeTo(500,0.5);
    }, function() {
        $(this).siblings().stop().fadeTo(500,1);
    });
});


$(document).ready(function(){
$(".fade").fadeTo(0,1.0);
$(".fade").hover(function(){
        $(this).fadeTo(100,0.8);
    },
    function(){
        $(this).fadeTo(300,1.0);
    });
});
