$(document).ready(function(){

})

function getOptionsForSelect(src, params, target,block)
{
	if (typeof(block) != 'undefined') {
		$(block).block();
	}
  params['target'] = target;
  $.get(src, params,function() {
	  if (typeof(block) != 'undefined') {
	    $(block).unblock();
	  }
  });
}

atual = false;
function showNextTarget(first)
{
	if(atual == false) {
		atual = $(first);
	}
	next = atual.next('.detached');
	if(next.hasClass('detached')) { 
    atual.hide();
		next.show();
	  atual = next;
	} 
}
function showPreviousTarget(first)
{
  if(atual == false) {
    atual = $(first);
  }
  previous = atual.prev('.detached');
  if(previous.hasClass('detached')) {
    atual.hide();
    previous.show();
    atual = previous;
  }
}