is_list = true;

$(document).ready( function()
	{	
		setDetailBtn();
		changeField();
		setAvailSlct();
	}
);

function setDetailBtn()
{
	if ( $( '.gallery_box').length)
	{
		
		$( '.gallery_box').hover( function()
				{
					$( '.to_detail', this).css( 'display', 'block');
				},
				function()
				{
					$( '.to_detail', this).css( 'display', 'none');
				}
		);
	}
}

function setCompareFnc()
{
	$( 'input:checked').attr( 'disabled', true);
}

function resetCompareFnc( sCaid)
{
	$( 'input[name=caid[' + sCaid + ']]').attr( 'disabled', false).attr( 'checked', false);
	oDivElm = document.getElementById( 'field_' + sCaid);
	$( oDivElm).removeClass( 'active');
}

function changeField()
{
	oDiv = $( '.product_list_cmp .field');
	if ( !$( oDiv).length)
	{
		oDiv = $( '.product_list .cmp');
	}
	$( 'input', oDiv).change( function()
	{
		if ($( this).attr( 'checked'))
		{
			$( this).parent().addClass( 'active');
		}
		else
		{
			$( this).parent().removeClass( 'active');
		}
	}
	);
	
}

function setAvailSlct()
{
	$( '#slct_availability').change( function()
	{
		$( '#_availability').submit();	  
	}
	);
}

