/*!
 *
 * Copyright 2010
 *
 *      ;;;;;;;;;       ;;;;;;;;;;;;      ;;;;;;;;;;              
 *    ;;;       ;;;     ;;;       ;;;   ;;;        ;;;            
 *   ;;;          ;;    ;;;       ;;;   ;;          ;;            
 *   ;;;          ;;    ;;;;;;;;;;;;   ;;;          ;;;           
 *   ;;;          ;;    ;;;     ;;      ;;          ;;            
 *    ;;;        ;;;    ;;;      ;;;    ;;;        ;;;            
 *     ;;;;;  ;;;;      ;;;       ;;;     ;;;;  ;;;;          
 *          ;                                 ;;                     
 *
 * Date: Fri May 28 22:33:48 2010 -0900
 */
 
function FlashBlock2() {
/*マウスオーバー・アウト時の処理*/
$(".FlashBlock2").hover(
/*マウスオーバー時　1.5秒かけて30％に*/
    function(){$(this).fadeTo(100, 0.5);return false;},
/*マウスアウト時　100％に*/
    function(){$(this).fadeTo(50, 1);return false;}
  );
}
$(FlashBlock2);

			
$(document).ready(function(){
// Image Rollover
	$("img[src*='_on']").addClass("current");

	$("img,input").mouseover(function(){
		if ($(this).attr("src")){
			$(this).attr("src",$(this).attr("src").replace("_off.", "_on."));
		}
	});

	$("img[class!='current'],input").mouseout(function(){
			if ($(this).attr("src")){
				$(this).attr("src",$(this).attr("src").replace("_on.", "_off."));
			}
	});

// External Link
	$("a[rel=external]").click(function(){
		window.open(this.href,"_blank");
	return false;
	});
});


	
																

/**
 * jQuery Smoothie plugin
 * @name jquery.smoothie-0.1.js
 * @author Yuichi Takeuchi - http://takeyu-web.com/
 * @version 0.1
 * @date 2010.5.16
 * @copyright (c) 2010 Yuichi Takeuchi
 * @lincense MIT License
 */

/*
  <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  <script type="text/javascript">
    google.load("jquery", "1.4");
  </script>  

  <!-- なめらかにする！ -->
  <script type="text/javascript" charset="utf-8" src="../zwei/js/jquery.smoothie-0.1.js"></script>
  <script type="text/javascript">
    $(document).ready(function(){
      $.Smoothie();
  });
  </script>
  <!-- これだけ！ -->
*/

(function($) {
  // 指定の id or name の要素までスクロール
  // 要素が存在すればスクロール実行後 true
  $.__smoothScroll = function(name, duration, delay) {
    if (!name) return false;
    if (!delay) delay = 0;
    
    var target = $('a[name="'+name+'"], [id="'+name+'"]');
    if (target.length == 0) return false;
    
    // delay ミリ秒後にスクロール実行
    setTimeout(function (obj, t) {return function () { 
      $($.browser.safari ? 'body' : 'html').animate({scrollTop: obj.offset().top}, t, 'swing');
    } }(target, duration), delay);

    return true;
  }
    
  // $('#top').Smoothie();
  // 動的に作成したリンクに適用したりとか
  $.fn.Smoothie = function(settings) {
    settings = jQuery.extend({duration: 1000, delay: 0}, settings);
    var anchorLink = this;
    anchorLink.click(function() {
      var anchor;
      if (this.hash.match(RegExp("^#(.+)$"))) anchor = RegExp.$1;
      var ret = $.__smoothScroll(anchor, settings.duration);
      return ret ? false : true;
    });
  };
  
  // なめらかに
  $.Smoothie = function(settings) {
    settings = jQuery.extend({duration: 1000, delay: 0}, settings);
    
    // 現在の location.hash を取得
    var anchor = location.hash;
    if (anchor) {
    	anchor = anchor.replace(/^#/, "");
    	anchor = $.browser.fx ? anchor : decodeURIComponent(anchor);
    } else {
      anchor = null;
    }
    
    // 現在のURLでアンカーが付いているならそこになめらかスクロール
    $.__smoothScroll(anchor, settings.duration, settings.delay);
    
    // ページ内アンカーリンクをクリックした際にスクロール
    $('a[href^=#]'+'a[rel!=tab]').Smoothie(settings);
    return true;
  };
})(jQuery);

	$(document).ready(function(){
	  $.Smoothie();
});
	
// 文字列に「Firefox」が含まれている場合
if(navigator.userAgent.indexOf("Firefox") != -1){ 
	window.onpageshow  = function resetRollover() {
		if(document.getElementsByTagName) {
			var images = $("img[class!=current]");
			for(var i=0; i < images.length; i++) {
				if(images[i].getAttribute("src").match("_on.")) {
					images[i].setAttribute("src", images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}



