var zorggids = function() {

	var config = {
	}
	
	var init = function() {
		initMap();
		initSelect();
	}
	
	
	var initSelect = function() {
	
		jQuery("#gzonderverdelinginp-form").hide();
		
		if( jQuery("#sectorinp").length ) {
			
			jQuery("#sectorinp,input[name='kavelsubgroepinp']").change(function() {

				if(jQuery("#sectorinp").val() == 'GZ' && jQuery("input[name='kavelsubgroepinp']:checked").val() == 'Intramuraal') {
					jQuery("#gzonderverdelinginp-form").show();
				} else {
					jQuery("#gzonderverdelinginp").val("");
					jQuery("#gzonderverdelinginp-form").hide();
				}
			});
			
			if(jQuery("#sectorinp").val() == 'GZ' && jQuery("input[name='kavelsubgroepinp']:checked").val() == 'Intramuraal') {
				jQuery("#gzonderverdelinginp-form").show();
			}
		}
	}
	
	var initMap = function() {
	
		var zorggidsawbz_map = [];
		
		zorggidsawbz_map['Amsterdam'] = {	"tooltip":"Amsterdam", 
											"imagehover": contextPath + "/styles/default/images/zorggidsawbz/amsterdam.gif" }
											
		zorggidsawbz_map['t Gooi'] = {	"tooltip":"t Gooi", 
											"imagehover": contextPath + "/styles/default/images/zorggidsawbz/gooi.gif" }
											
		zorggidsawbz_map['Apeldoorn-Zutphen'] = {	"tooltip":"Apeldoorn/Zutphen", 
											"imagehover": contextPath + "/styles/default/images/zorggidsawbz/zutphen.gif" }
											
		zorggidsawbz_map['Utrecht'] = {	"tooltip":"Utrecht", 
											"imagehover": contextPath + "/styles/default/images/zorggidsawbz/utrecht.gif" }
											
		jQuery("#kaartMap area").click(function() {
			jQuery("#regioinp").attr("value", jQuery(this).attr('title'));
		});

		if( jQuery("#regioinp").length ) {
			if( jQuery("#regioinp").attr("value") ) {
				jQuery("#kaart").attr("src", zorggidsawbz_map[jQuery("#regioinp").attr("value")].imagehover);
			}
		}
		
		jQuery("#kaartMap area").mouseover(function() {
			jQuery("#kaart").attr("src", zorggidsawbz_map[jQuery(this).attr('title')].imagehover);
		}).mouseout(function() {
			jQuery("#kaart").attr("src", contextPath + "/styles/default/images/zorggidsawbz/maptranspa.gif");
		});
	}

	return {
		init:init
	}

}();

