/**********************
 @ brand
***********************/
$(function(){
	$(".shop-type .openchild").toggle(function(){
		 if(!$(".shop-type ul").is(":animated")){
			 $(".shop-type ul").stop();
			 $(this).removeClass("act");
			 $(this).parent().next(".shop-type ul").slideDown(200);
		}
	},function () {
		 if(!$(".shop-type ul").is(":animated")){
			 $(".shop-type ul").stop(true);
			 $(this).addClass("act");
			 $(this).parent().next(".shop-type ul").slideUp(200); 
		 }
	});
	
	$(".shop-rank dl").last().css({"background":"none"});
	$("div#itemImages ul.list li").last().css({"margin":"0"});
	$("dt.arrow").click(function(){$("#areaSelect").show();});
        $("#areaSelect").mouseover(function(){$("#areaSelect").show();});
        $("#areaSelect").mouseout(function(){$("#areaSelect").hide();});
	$(".local-box li").hover(
		function(){
			$(this).addClass("current");
		},
		function(){
			$(this).removeClass("current");
		}
	);	
	
	$(".arrow_more").toggle(
		function(){
			$(".morewl").show();
			$(this).addClass("arrow3");
			$(this).removeClass("arrow2");
		},
		function(){
			$(".morewl").hide();
			$(this).addClass("arrow2");
			$(this).removeClass("arrow3");
		}
	);
	

	function switchText(){
		if ($(this).val() == $(this).attr('title'))
			$(this).val('').removeClass('exampleText');
		else if ($.trim($(this).val()) == '')
			$(this).addClass('exampleText').val($(this).attr('title'));
		}
		$('.shop-info .s input[type=text][title!=""]').each(function(){
			if ($.trim($(this).val()) == '') $(this).val($(this).attr('title'));
			if ($(this).val() == $(this).attr('title')) $(this).addClass('exampleText');
		}).focus(switchText).blur(switchText);
		
		$('form').submit(function() {
			$(this).find('input[type=text][title!=""]').each(function(){
			if ($(this).val() == $(this).attr('title')) $(this).val('');
		});
	});


	
});















