//
//
//	検索画面制御
//
//
function searchHandling(selector){
	
	this.form_obj = null;
	
	//操作対象とするフォーム要素（jQueryオブジェクト）
	if($(selector).length!=0) this.form_obj = $(selector);
	
}

//DOMツリー構築後処理
$(function(){  
	
	//詳細を見る
	$(".btn-detail a").toggle(
		function(){
			
			var el = $(this);
			$(".detail",el.parent().parent().parent()).slideDown(500,function(){
				el.parent().attr("class","btn-close");
				el.attr("title","詳細を閉じる");
			});
			
			return false;
		},
		
		function(){
			
			var el = $(this);
			$(".detail",$(this).parent().parent().parent()).slideUp(500,function(){
				el.parent().attr("class","btn-detail");
				el.attr("title","詳細を見る");
			});
			
			return false;
		}
	);
	
});


searchHandling.prototype.submit = function(){
	if(this.form_obj){
		this.form_obj.submit();
	}
}
function submitForm(p,c){
	var fh = new searchHandling("#easySearchForm");
	if (p) { $("#showPage").val(p); }
	if (c) { $("#showCnt").val(c); }
	fh.submit();
}

