jQuery(function($) { 
	
	//IE6
	if ($.browser.msie) {
		if ($.browser.version <= 6){
			$('#nav li:first-child').addClass('first-child');
		}
		$('#subnav>li>ul>li').hoverIntent(
			function(){ $(this).addClass('hover'); },
			function(){ $(this).removeClass('hover'); }
		);
	}
	
	//Nav
	/*$('#subnav>li>a').click(function(){
		//New
		$li = $(this).parent();
		$li.addClass('active');
		$ul = $('>ul',$li).show('fast');
		
		//Old
		$siblings = $li.siblings('li');
		$('>ul',$siblings).hide('fast');
		$siblings.removeClass('active');
		return false;
	});*/
	
	//Search
	$('#search .input-text').hint();
	
	//Alphanumeric
	$('.quantity').numeric();
	
	//Product Table
	$('#single table tr:last').addClass('last-row');
	/*
	$('#searchStept1').submit(function(){
		var $conditions = $('#conditions');
		if ($conditions){
			if ($conditions.is(':checked')) {
				return true;
			} else {
				alert('Please accept the conditions');
				return false;
			}
		}
		
	});*/
	
	//Single Product Buy Checkboxes
	if ($('#tx-ttproducts-pi1-list')[0]) {
		var $input = $('#tx-ttproducts-pi1-list :text');
		$input.bind('click, change, blur, keyup', function(){
			var _id = this.id.split('_')[1];
			var $checkbox = $('#koopid_'+_id);
			$checkbox.attr('checked', (this.value == '')?'':'checked');
		});
	}
	//jQuery('#tx-srfeuserregister-pi1-tx_extfeuserstable_cond').attr('checked','checked');
	
	

	
});

jQuery.noConflict();

function submitFormUserRegister() {
	/*if (document.getElementById('tx-srfeuserregister-pi1-tx_extfeuserstable_cond').checked==1) { 
	} else { 
		alert('Om de bestelling te kunnen plaatsen moet u akkoord gaan met de algemene voorwaarden'); 
		return false;
	}*/
}

function submitFormBasket(formUrl) {
	if (document.getElementById('conditions').checked==1) { 
		document.getElementById('basketForm').action=formUrl; 
		document.BasketForm.submit(); 
	} else { 
		alert('Om de bestelling te kunnen plaatsen moet u akkoord gaan met de algemene voorwaarden'); 
	}
}