$(document).ready(function() {
	if ($('body.products').length>0||$('body.home').length>0) {
		$('.category_item_first').each(function(){
			var h1 = $(this).height();
			var h2 = $(this).next().height();
			var m = Math.max(h1,h2);
			$(this).next().height(m);
			$(this).height(m);
			//alert(h1+' '+h2);
		});
	}
	$('select#criterion').change(function(){
		window.location = '/index.php/products/dc-dc-converters/'+$(this).find('option:selected').val();
	});
	$('#inquiry input[name="short_circuit_protection_time"]').focus(function(){ $('input[name="short_circuit_protection"][value="2"]').click(); });
	$('#inquiry input[name="isolation_voltage_free"]').focus(function(){ $('input[name="isolation_voltage"][value="5"]').click(); });
	$('#inquiry input[name="temperature_free"]').focus(function(){ $('input[name="temperature"][value="3"]').click(); });
	$('a.thumbnail').click(function() {
		GB_open($(this).attr('href'),$(this).attr('title'));
		return false;
  	});
	
});
