$(document).ready(function() {
	if($('.googlemap').length && GBrowserIsCompatible()){
		var map = new GMap2($('.googlemap')[0]);
		var point = new GLatLng(51.0694624,7.5593498);
		map.setCenter(point, 8);
		
		marker = new GMarker(point);
		map.addOverlay(marker);
		var customUI = map.getDefaultUI();
		map.setUI(customUI);
		map.disableScrollWheelZoom();

		$('form.jqtransform').submit(function(){
			$('.directions').html('');
			  var addr = $('#address').val();
			  
			  directionsPanel = $('.directions')[0];
			  directions = new GDirections(map, directionsPanel);
			  directions.load('from: '+ addr +' to: Eichendorffstra&szlig;e 2, 51709 Marienheide, Deutschland');
				GEvent.addListener(directions, "load", function(m) {
					$('#inn').height('2000px');
						$('.scroll-pane').jScrollPane({
							scrollbarWidth: 5,
							dragMinHeight: 55,
							dragMaxHeight: 55,
							scrollbarMargin: 0
						});
					 }
					 
			  ); 	
			  //console.log($('.googlemap').height());
			  

			  return false;

		});

		



	}

});

