jQuery.noConflict();

(function($){$(function(){//BEGIN jQuery.ready()
	
	
	/*** other func ***/
	(function(){
		var $body = $("body");
		var pageClass = {
			".news": ".gNav01",
			".about": ".gNav02",
			".room": ".gNav03",
			".dish": ".gNav04",
			".spa": ".gNav05",
			".floor": ".gNav06",
			".access": ".gNav07"
		};
		for(var i in pageClass){
			if($body.is(i)){
				$(pageClass[i]).find("img").addClass("imgactive");
				break;
			}
		}
	})();
	
	
	/*** imgover ***
	■引数
	.imgover({
		exclude: "imgactive",
		postfix: "o",
		aPostfix: "", //指定なしならpostfixと同じ
		isSelf: false,
		isSelfOver: false
	});
	*/
	//$(".imgover").imgover();
	
	$(".gNav ul, .catNav").imgover({dynamic:true})
		.find(".imgactive")
			.each(function(){
				var $this = $(this);
				var src = $this.attr("src");
				var ftype = src.substring(src.lastIndexOf('.'), src.length);
				
				$this.attr("src", src.replace(ftype, "_o" + ftype))
			});
	$(".hdrNav01, .ftrNav01").imgover();
	$(".pageNav").imgover();
	
	
	/*** 画像切替 ***
	■引数
	.chimg({
		postfix: "o",
		targetAttr: "chimg"
	});
	*/
	//$(".chimg").chimg();
	
	
	/*** tableColor ***
	■引数
	.alternate({
		evenClass: "even"
		oddClass: "odd",
		onlyTbody: true
	});
	*/
	//$(".coloredRow").alternate();
	
	
	/*** myLightBox ***/
	$(".lightBox")
		.find("a")
			.myLightBox();
	
	
	
});
	
	
	/* myLightBox */
	$.fn.myLightBox = function(config){
		
		config = $.extend({
			imageLoading: "/_common/js/lightbox/images/lightbox-ico-loading.gif",
			imageBtnClose : "/_common/img/lightbox-btn-close.gif",
			imageBtnPrev : "/_common/js/lightbox/images/lightbox-btn-prev.gif",
			imageBtnNext : "/_common/js/lightbox/images/lightbox-btn-next.gif",
			imageBlank : "/_common/js/lightbox/images/lightbox-blank.gif"
		}, config);
		
		var $tObj = this;
		
		return $tObj
			.each(function(){
				var $this = $(this);
				$img = $this.is("img") ? $this : $this.find("img");
				$this.attr("title", $img.attr("alt"));
			})
			.lightBox(config);
	};
	
	
})(jQuery);//END jQuery.ready()
