$(document).ready( function () {
    $("#merk_lijst li a").bind('click', function() {
      var merk = $(this).parent().attr('id');
      $.ajax({
        	type: "GET",
        	url: "getContent.php",
        	data: "&merk="+merk,
        	success: function(html){
        	      $("#text").html(html);
        	}
        });	
    });


	$('#winkels ul li a[title=Hoofdkantoor]').addClass('dimmed');    
	$('#Aalten').addClass('active');
			
	$("#winkels ul li a").click(function(event){
		
	    // remove active class	
		$('#winkels ul li a').removeClass('active');                 
		
	    $(this).addClass('active');
		
	    //add active class to the 'a' tag
		if( $(this).attr('title') == 'Hoofdkantoor' ) {
		    $(this).removeClass('dimmed');
	        $(this).addClass('active');             
		}
	    else {
	        $('#winkels ul li a[title=Hoofdkantoor]').addClass('dimmed');
	    }
	   
	});	


$.ajax({
	type: "POST",
	url: "getStoreInfo.php",
	data: "&winkel=Aalten",
	success: function(html){
	      $("#ajaxload").html(html);
	}
});	


$("#stores li a").bind('click', function() {
	var winkel = $(this).attr('id');
	$.ajax({
		type: "POST",
		url: "getStoreInfo.php",
		data: "&winkel="+winkel,
		success: function(html){
		      $("#ajaxload").html(html);
		}
	});	
});


});

