(function($) {

	$(function() {
		$.malpu.rollover();
		//$.malpu.scroll();
		//$.malpu.rollover_easing();
		//$.malpu.contextmenu();

	});

	$.malpu = {
		

		/* ロールオーバー　*/
		rollover: function(options) {
			
			$(".btn").each(function(){

			// 変数の宣言
			var originalSrc; // 元のイメージのソース
			var rolloverSrc; // ロールオーバーのソース
			var rolloverImg; // プリロード用画像

			// ロールオーバー画像のsrc属性の値を代入
			this.originalSrc = $(this).attr('src');

			// ロールオーバー画像を正規表現で画像名+"_on"に置換
			this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)$/, '_on'+"$1");

			// ロールオーバー画像をプリロード
			this.rolloverImg = new Image();
			this.rolloverImg.src = this.rolloverSrc;

			}).hover(function(){
			
				$(this).attr('src',this.rolloverSrc);
			},function(){
				$(this).attr('src',this.originalSrc);
			});
		},
		
		
		// ローカルナビイージング
		rollover_easing : function(options) {
		
			$('#local_nav a').each(function(){
			var a = $(this).backgroundColor;
				a.mouseover(function(){
					a.animate({ opacity: 0.5 },500);
				});
				a.mouseout(function(){
					
					a.animate({ opacity: 1 },1000);
				});
			});
		},
		
		
		// コンテクストメニュー禁止
		contextmenu : function(options) {
		
			$(document).bind("contextmenu", function(){
						alert("全ての記載事項の無断転載をお断りいたします");
						return false;
			})
		},
			
		
	}

})(jQuery);


// Google Analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23321493-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

