$(document).ready(function() {
    // RollOver
    $('.rollover').hover(function(){
    	$(this).attr('src', $(this).attr('src').replace('_1', '_2'));
    }, function(){
    	if (!$(this).hasClass('currentPage')) {
    		$(this).attr('src', $(this).attr('src').replace('_2', '_1'));
    	}
    });
    
    // RollOver in /store/detail
    $('#store-menu-top img').hover(function(){
    	$(this).attr('src', $(this).attr('src').replace('_1', '_2')).attr('height', '31');
    }, function(){
    	if (!$(this).hasClass('currentPage')) {
    		$(this).attr('src', $(this).attr('src').replace('_2', '_1')).attr('height', '30');
    	}
    });
    
    // controller OFF + pagination OFF for index/index
	$('#mainImgSlider').simpleLoopSlider({
		controller: false,
		pagination: true,
		interval  : 5000
	});
	
	// colorbox
    $('a.inlineView').colorbox();
    
	/*
    // サイドバー検索
    $('#searchKeyword').focus(function(){
    	if ($(this).val() == '店舗検索') {
    		$(this).val('');
    	}
    }).blur(function(){
    	if ($(this).val() == '') {
    		$(this).val('店舗検索');
    	}
    });
    $('#searchBox').submit(function(){
    	if($('#searchKeyword').val() == '店舗検索') {
    		$('#searchKeyword').val('');
    	}
    });
    
    // datePicker
    $('.datePicker').datepicker({minDate: 0});
    $('.datePickerNoLimit').datepicker();
    
    // colorbox
    $('a.inlineView').colorbox();
    */
	
    // smooth scroll
	$("a.smooth").click(function(){
	     $('html, body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
	     return false;
	 });
	
	/*
	// focus
	$(".focusForm input[type='text']").focus(function(){
        $(this).addClass('focus');
    });
    $(".focusForm input[type='text']").blur(function(){
        $(this).removeClass('focus');
    });
    $(".focusForm textarea").focus(function(){
        $(this).addClass('focus');
    });
    $(".focusForm textarea").blur(function(){
        $(this).removeClass('focus');
    });
    */
});
