/*javaScript_Information===========================================
File_name:jquery.script.js
Author:Nitroplus Web Team
============================================================
*/


;(function($){   //;抜け関数処理
	$.fn.jqueryRollover = function (options) {//置換関数
	    var options = jQuery.extend({//初期設定
			$Image : $("#Image") ,	//置き換え処理したい画像のID
			ImageOff : "images/spec_case.jpg" , // 元の画像
			ImageOn : "images/spec_case2.jpg" , // 置換後の画像
	    },options);
		
		
    	return this.each(function(){ //実行したい内容
			$(options.$Image).attr("src",$(this).attr("src").replace( options.ImageOff, options.ImageOn));//preload
			$(options.$Image).mouseover(function () {
				$(this).attr("src", options.ImageOff );
			}).mouseout(function () {
				$(this).attr("src",  options.ImageOn );
			})
			return false;			
		});
  };
  
  
	$.fn.jqueryTopscroll = function (options) {//スクロール関数
	    var options = jQuery.extend({//初期設定
			$Scroll : $("#Top") //スクロールしたい所のID
	    },options);
		
    	return this.each(function(){ //実行したい内容			
			//デリゲート　設定した要素の中身をクリックすると関数実行
			$(options.$Scroll).unbind("click").click(function (e) {
				$('html,body').animate({
					scrollTop: $($(e.target).attr("href")).offset().top
				}, 'slow', 'swing');
				return false;
			});
		});
  };
})(jQuery);
