/* +++Mission Statement++++++++++++++++++++++++++++++++++++++++++++++
+
+ Update:2010-11-04
+
+ http://www.ms-inc.co.jp/
+ 
+ EditiorID:MS
+
+ + use library:jquery-1.4.1.min.js
+ +@@@
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/* On Load Action ++++++++++++++++++++++++++++++++++++++++++ */
/*@cc_on var doc = document; eval('var document = doc');@*/

// escape conflict
jQuery(function($){

//Mouseover
function initRollOverImages() {
  var image_cache = new Object();
  $("img.imgOn,input.imgOn").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}
$(document).ready(initRollOverImages);


/*Auto TargetBlank*/
$(document).ready( function () {
    $('.blank').click(function(){
        window.open(this.href, '_blank');
        return false;
    });
});


//Page scroll
jQuery.fn.extend({
  scrollTo : function(speed, easing) {

    if(!$(this)[0].hash || $(this)[0].hash == "#") {
      return false;
    }
    return this.each(function() {
      var targetOffset = $($(this)[0].hash).offset().top;
      $('html,body').animate({scrollTop: targetOffset}, speed, easing);
    });
  }
});

$(document).ready(function(){
  $('a[href*=#]').click(function() {
    $(this).scrollTo(300);
    return false;
  });
});



// escape conflict close
});
