//External Link
$(function(){
  $('a[href^="http"]').not('[href^="http://www.1day.co.jp/"]').attr({ target: "_blank" });
});

// img rollover
$(function(){
  $("img[src*='link']").not("[src*='-on.']").each(function(){
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '-on' + this.src.substr(dot, 4);
    $(this).hover(
      function(){this.src = imgsrc_on;},
      function(){this.src = imgsrc;}
    );
  });
});

// anchor scroll
$(function(){
  $('a[href^=#]').not("[href='#']").click(function() { 
  var href= this.hash; 
  var $target = $(href == '#top' ? 'body' : href);
    if($target.size()) {
      var top = $target.offset().top;
      $($.browser.safari ? 'body' : 'html').animate({scrollTop:top}, 600, 'swing');
    }
  return false;
  });
});


$(function() {

// select the thumbnails and make them trigger our overlay
$(".thumbs a").overlay({

	// each trigger uses the same overlay with the id "gallery"
	target: '#gallery',

	// optional exposing effect
	expose: '#f1f1f1'

// let the gallery plugin do its magic!
}).gallery({

	// the plugin accepts its own set of configuration options
	speed: 800
});
});




