// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function show_item(id){
	 Effect.Appear(id, {duration: 0.5});
}

function hide_all(id){
}

function empty_all(id){
	$(id).style.display = 'inline-block';
	var scope = Effect.Queues.get(id);
	scope.each( function( effect ){ effect.cancel() } );
}

function redirect() {
  setTimeout("location.href='http://localhost:3000/home'", 5000);
}

function switch_display(id){
	var elem = document.getElementById(id);
	if (elem.style.display == 'none'){
		elem.style.display = '';
	}
	else{
		elem.style.display = 'none';
	}
}

function mark_for_destroy(element, name){
	$(element).next('.should_destroy').value = 1;
	$(element).up(name).hide();
}
