/* =====================================================================
*
*    About
*
* =================================================================== */

$(document).ready(function() {
	var j_thumb = $("#main .menuList .thumb, #instituteSec .thumb");
	var j_instituteCont = $("#instituteCont");

	if (j_thumb.length) {
		j_thumb.each(function() {
			$(this).css({ "opacity": 0.5 });
			$(this).closest("article").biggerlink();
		});
		
		j_thumb.closest("article").each(function() {
			$(this).hover(
				function() {
					if (ieflag) {
						$(this).find(".thumb").css({ "opacity" : 1 });
					} else {
						$(this).find(".thumb").animate({ "opacity" : 1 }, "fast");
					}
				},
				function() {
					if (ieflag) {
						$(this).find(".thumb").css({ "opacity" : 0.5 });
					} else {
						$(this).find(".thumb").animate({ "opacity" : 0.5 }, "fast");
					}
				}
			);
		});

		j_instituteCont.biggerlink();
		j_instituteCont.hover(
		    function() {
		    	if (ieflag) {
		    		$(this).find(".thumb").css({ "opacity" : 1 });
		    		$(this).find(".contR").css({ "opacity" : 1 });
		    	} else {
		    		$(this).find(".thumb").animate({ "opacity" : 1 }, "fast");
		    		$(this).find(".contR").animate({ "opacity" : 1 }, "fast");
		    	}
		    },
		    function() {
		    	if (ieflag) {
		    		$(this).find(".thumb").css({ "opacity" : 0.5 });
		    		$(this).find(".contR").css({ "opacity" : 0.8 });
		    	} else {
		    		$(this).find(".thumb").animate({ "opacity" : 0.5 }, "fast");
		    		$(this).find(".contR").animate({ "opacity" : 0.8 }, "fast");
		    	}
		    }
		);
	}

	j_floatMenu = $("#floatMenu");
	if (j_floatMenu.length) {
		if ($("body").hasClass("salonmenu")) {
			j_floatMenu.scrollFollow({ speed: 500, container: "salonMenu", offset: -24, delay: 200 });
		}
		else {
			j_floatMenu.scrollFollow({ speed: 500, container: "contentsContainer", offset: 0, delay: 200 });
		}
	}

	if (_ua.os.name != "iPad" && _ua.os.name != "iPhone" && _ua.os.name != "iPod touch") {
		j_thumb.lazyload({ placeholder : "/common/images/blank.gif", effect : "fadeIn", backgroundImage : "/common/images/loading_dk.gif" });
	}
});

