
$(document).ready(function(){
	$('.view-content-kortingen').attr('id', 'resultlist_panden');
	$('#edit-filter0-<all>-wrapper').hide();


	$('#webform-component-prijsinfo, #webform-component-prix_info, #webform-component-preis_info').hide();	
	
	/* zoekstuff in juiste taal */
	var language = $('html').attr('lang');
	if(language != 'fr' && language != 'de' && language != 'en'){
		language = 'nl';
	}
	$('#views-filters').each(function(){
		var ac = $(this).attr('action');
		if(ac == '/vakantieverhuur/koksijde-st-idesbald'){
			$(this).attr('action', '/' + language + ac);
		}
	});
	
	
	/* Enter site ID in reservation form */
	$('#edit-submitted-drupal-subsite-id').val('Servimo Vakantieverhuur');
	
	$('.select-to-checkboxes').each(function(){
		var $wrapper = $(this),
			$select = $(this).children('div').children('select').remove(),
			name = $select.attr('name'),
			$options = $select.children('option');
		
		$options.each(function(){
			var $opt = $(this).select(),
				optid = $select.attr('id') + '-' + $opt.val();
			$wrapper.append('<label for="' + optid + '"><input type="checkbox" checked="checked" id="' + optid + '" name="' + name + '" value="' + $opt.val() + '" /> ' + $opt.text() + '</label>' );
		});
	});
});

