$(function(){
	$(".search-submit").click(function(event){
		$(this).removeAttr("name");
		event.preventDefault();
		var val = $.trim($(".search-title").val());
		if(val!==""){
			$(".wp-search").find("form").submit();
		}else{
			alert("璇疯緭鍏ュ叧閿瘝");
		}
		return false;
	});
	$(".wp-navi .wp-menu li").hover(function() {
			/* Stuff to do when the mouse enters the element */
			$(this).addClass("i20");
			$(this).siblings().find('.sub-menu').stop(true,true).slideUp(150)
			$(this).children('.sub-menu').stop(true,true).slideDown(200);
	}, function() {
			/* Stuff to do when the mouse leaves the element */
			$(this).removeClass("i20");
			$(this).children('.sub-menu').stop(true,true).slideUp(150);
    });
	
	if ($(".banner").html() == "") {
		$(".banner").addClass("none");
	}else {
		$(".banners").addClass("none");
	}
	if( !('placeholder' in document.createElement('input')) ){
	  $('input[placeholder],textarea[placeholder]').each(function(){
		  var that = $(this),
		  text= that.attr('placeholder');
		  // console.log(text);
		  if(that.val()===""){
			  that.val(text).addClass('placeholder');
		  }
		  that.focus(function(){
			  if(that.val()===text){
				  that.val("").removeClass('placeholder');
			  }
		  }).blur(function(){
			  if(that.val()===""){
				  that.val(text).addClass('placeholder');
			  }
		  }).closest('form').submit(function(){
			  if(that.val() === text){
			  that.val('');
			  }
		  });
	  });
	}
});// JavaScript Document
