$(document).ready(function(){
		
	/*
	if($(\'.overlay\',top.document).length){
		$(\'.overlay\',top.document).hide(500);
	}
	
	$('.button').live('click', function() { 
		var m_action = $(this).attr('rel');	  	  
		firstStep(m_action);
		return false;
	});
	
	function firstStep(m_action){				
	  var data = 'eID=timecon_ajax&action=' + m_action;			  
	  $.ajax({
			url: "index.php",			
			type: "GET",
			data: data,
			success: function(resp) {								
				//window.location.replace(window.location+'#'+objId);		
				$('.administration').slideToggle(100, function() {
					$('.administration').html(resp).slideToggle('slow');					
				});
			}
		});
	}
	*/
	
	
	
	$('#citySelector').change(function(){				
		$('.tx-timeconlocations-pi1').append('<div class="overlay">&nbsp;</div>');							
		$('.location').animate({opacity: 0.2},100);
		var locid = $(this).val();	  	  				
		var data = 'eID=timecon_ajax&action=showLoc&locid=' + locid;			  
	  $.ajax({
			url: "index.php",			
			type: "GET",
			data: data,
			success: function(resp) {								
				$('.location').html(resp);									
				if($('.overlay').length){
					$('.location').animate({opacity: 1.0},100);
					$('.overlay').hide();
				}	
			}
		});
	});
	
});
