
//
$(function(){

	$('.change-pref-list').mouseover(function(){
		$(this).css('cursor','pointer');
	});
	$('.change-pref-list').click(function(){
		$('.pref-list').css('display','block');
	});
	$('.pref-list').hover(function(){
	},
	function(){
		$(this).css('display','none');
	});

	// MainPage delivery area select
	$('.pref-label').click(function(){
		var exPrefValue = $(this).find('input').val();
		$.cookie('n2-pref',exPrefValue,{ expires: 365, path: '/', domain: 'pururu.co.jp' });
		location.reload(false);
	});

	// switch smartphone
	$('.switch-smartphone').click(function(){
		$.cookie('spvm','',{ path: '/', domain: 'pururu.co.jp' });
		location.reload(false);
	});


	// remove cml
	$('.remove-cookie-cml').click(function(){
		$.cookie('cml','',{ expires: -1, path: '/', domain: 'pururu.co.jp' });
		location.reload(false);
	});

	// brand
	$('.brand-list-open').hover(
		function() {
			$(this).append($("<small></small>"));
		},
		function() {
			$(this).find("small:last").remove();
		}
	);

	// genre
	$('.genre-list-open').hover(
		function() {
			$(this).append($("<small></small>"));
		},
		function() {
			$(this).find("small:last").remove();
		}
	);

	// size
	$('.size-list-open').hover(
		function() {
			$(this).append($("<small></small>"));
		},
		function() {
			$(this).find("small:last").remove();
		}
	);

	// brand
	$('.brand-list-open').toggle(function(){
		$('.brand-list').slideDown('fast');
	},function(){
		$('.brand-list').slideUp('fast');
	});

	// genre
	$('.genre-list-open').toggle(function(){
		$('.genre-list').slideDown('fast');
	},function(){
		$('.genre-list').slideUp('fast');
	});

	// size
	$('.size-list-open').toggle(function(){
		$('.size-list').slideDown('fast');
	},function(){
		$('.size-list').slideUp('fast');
	});
});


