// JavaScript Document

$(document).ready(function() {
	$("#slideshowHome").each(function() {
	    $(this).css("height", 200);
        $(this).css("width", 242);
        $(this).css("border", "4px solid #4c5254");
        $(this).cycle({ 
    		fx: "scrollDown" 
    	});
    	$(this).find("img").each(function() {
            $(this).css("border", "none");
            $(this).css("border-bottom", "4px solid #4c5254");
        });
    });
    
    $("a[rel=external]").each(function() {
        $(this).click(function() {
            window.open($(this).attr("href"));
            return false;
        });
    });  

    if (GBrowserIsCompatible() && (mapElement = document.getElementById("googleMapViewPort"))) {
        var address = "Kerkstraat 10, 2570 Duffel";
        var map = new GMap2(mapElement);
        map.addControl(new GSmallZoomControl());
        var geocoder = new GClientGeocoder();
        geocoder.getLatLng(
            address,
            function(point) {
              if (!point) {
                alert(address + " niet gevonden!");
              } else {
                map.setCenter(point, 15);
                var marker = new GMarker(point);
                map.addOverlay(marker);
              }
            }
          );
    }
});