// JavaScript Document
$(function(){
$('a[href*=#]').click(function(){
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
    && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target 
      || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body').animate({scrollTop: targetOffset}, 1000);
       return false;
      }
    }
});



    $(".grayTips") //所有樣式名中含有grayTips的input   
    .each(function(){   
       var oldVal=$(this).val();   //默認的提示性文本   
       $(this)   
       .css({"color":"#888"})  //灰色   
       .focus(function(){   
        if($(this).val()!=oldVal){$(this).css({"color":"#000"})}else{$(this).val("").css({"color":"#888"})}   
       })   
       .blur(function(){   
        if($(this).val()==""){$(this).val(oldVal).css({"color":"#888"})}   
       })   
       .keydown(function(){$(this).css({"color":"#000"})})   
         
    })   


})
