$(function (){
// hide #back-top first
	$("#back-top").hide();
	
	// fade in #back-top
		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#back-top').fadeIn(1500);
			} else {
				$('#back-top').fadeOut("slow");
			}
		});
	});
	
	$(function (){
// hide #sidebarLogo first
	$("#sidebarLogo").hide();
	
	// fade in #sidebarLogo
		$(window).scroll(function () {
			if ($(this).scrollTop() > 200) {
				$('#sidebarLogo').fadeIn(1000);
			} else {
				$('#sidebarLogo').fadeOut("fast");
			}
		});
	});

$(function(){
	$("img.rollover").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
	});
});


	$(function(){
	$(".best3Contents img , #shopThumb img").mouseover(function(){
		$(this).fadeTo(0,0.5).fadeTo(1000,0.7);
	}).mouseout(function(){
		$(this).stop().fadeTo(0,1);
	});
	
});

$(function () {
     $("form :input").focus(function() {
          $("label[for='" + this.name + "']").addClass("labelfocus");
		  $(this).addClass("focus");
     });
 
     $("form :input").blur(function() {
          $("label[for='" + this.name + "']").removeClass("labelfocus");
		   $(this).removeClass("focus");
     });
});

$(document).ready(function() {
  $('#slider').cycle({
    fx : 'fade', /* fade, scrollLeft, scrollUp など */
    speed : 1500, /* エフェクトのスピード */
    timeout : 5000, /* スライドの間隔 */
    easing : 'swing', /* easing */
    pause : 1 /* ホバー時の一時停止 */
  });
});

