/*********************************************************************
 *
 *  </homecook/js_v2/form.js>
 *
*********************************************************************/
(function($){ // $ = jQuery encapsulation

/**
 * productSearchFormHelper
 */
var productSearchFormHelper = (function(){

	var o = {};
	var v = {};

	/**
	 * init
	 */
	o.init = function(){
		v.form = $('#productsearchform');
		v.resetContainer = $('#productsearchform-reset');
		setupResetButton();
	};

	/**
	 * setupResetButton
	 */
	function setupResetButton(){
		if(v.resetContainer.size()){
			var elem = $('<a href="#"><img src="/homecook/image_v2/_search-buttonbox/btn_02.gif" alt="条件をクリア" onclick="form_reset()" /></a>');
			v.resetContainer.append(elem);
		}
	}

	/**
	 * setupAllCheck
	 */
	function setupAllCheck(){
		new AllCheck({
			multiple: true,
			container: 'div.checkall-container',
			all: 'h4 input[type=checkbox]',
			children: 'div.checks input[type=checkbox]'
		});
	}

	return o;

})();

$(function(){
	productSearchFormHelper.init();
});

})(jQuery); // end $ = jQuery encapsulation

