var $q_index = jQuery.noConflict();

	function addlista(val) {
		$q_index('#linklista'+val).html('<img src="/images/core/loading_mini.gif">Aguarde...');
		$q_index.get('/index/addlista',{'id': val}, function(data) {
			if (data != 'cancel') {
				$q_index('#linklista'+val).html(data);
			}
			else
			{
				$q_index('#linklista'+val).html('<a href="#" onclick="addlista('+ val +')">Adicionar à lista</a>');
			}
		});
	}
	
	function dellista(val) {
		$q_index('#linklista'+val).html('<img src="/images/core/loading_mini.gif">Aguarde...');	
		$q_index.get('/index/dellista',{'id': val}, function(data) {
			if (data != 'cancel') {
				$q_index('#linklista'+val).html(data);
			}
			else
			{
				$q_index('#linklista'+val).html('<a href="#" onclick="dellista('+ val +')">Remover da lista</a>');
			}
			
		});
	}	
	
	function impressao(valor)
	{	
	    GB_showCenter('Impressao do Imovel', '/imoveis/impressao/?id=' + valor);		
	}	

	function indicar(valor)
	{
	
	    GB_showCenter('Indicar Imovel', '/imoveis/indica/?id=' + valor);		
	}	

	function imagem(valor)
	{
	    GB_showCenter('Visualizacao da Imagem', '/imoveis/getimagemdeumagaleria/?id=' + valor, 500, 660);		
	}	

	function play()
	{
		myGallery.options.delay = $q_index("select#segundos").val();
		myGallery.options.timed = true;
		myGallery.prepareTimer();			    	
	}	

	function stop()
	{
		myGallery.clearTimer();
	}	
	
	$q_index(function(){
		$q_index("select#segundos").change(function(){
			myGallery.options.delay = $q_index("select#segundos").val();
		})			
	})
	
	
