function success(position){var params='latitude='+position.coords.latitude+'&longitude='+position.coords.longitude;$j.ajax({type:"GET",url:"location.php",data:params,beforeSend:function(){$j('#box-location #locations').height($j('#box-location #locations').height());$j('#box-location').addClass('loading');if($j('#box-location .box-content .box-loading').length==0){$j('#box-location .box-content').append('<div class="box-loading"><span>wird geladen...</span></div>');}},success:function(data){if(''!=data){$j('#box-location #locations').html(data);$j('#box-location #locations').height('auto');$j('#box-location #locations .box-station').fadeIn(500,function(){if($j('#box-location .box-content .box-loading').length!=0){$j('#box-location .box-content .box-loading').remove();}});$j('#box-location').removeClass('loading');}}});}function error(){var params='location=no';$j.ajax({type:"GET",url:"location.php",data:params,success:function(data){if($j('#box-location .box-content .box-loading').length!=0){$j('#box-location .box-content .box-loading').remove();}$j('#box-location #locations').html('<p>Es konnten keine Haltestellen in der Umgebung gefunden werden.<br/><br/>M&ouml;gliche Gründe:<br/>Ihr Handy unterst&uuml;tzt die Standortbestimmung nicht.<br/>Sie haben die Standortbestimmung nicht freigegeben.<br/>Es gibt keine Bahnh&ouml;fe in der n&auml;heren Umgebung.</p>');}});}if(geo_position_js.init()){geo_position_js.getCurrentPosition(success,error);}else{error();}function refreshLocation(){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(success,error);}else{error();}}$j('.refresh-location').click(function(){refreshLocation();return false;});

