<!--

	// login prompt
	function login(){
	var login = prompt("Please, enter your Twitter username:", "")
	if(login){
	document.location.href = "http://"+login+".foodfeed.us";
	}
	}


	// show subscribe
	function subscribe() {
    new Effect.Toggle('feeds','blind');
	}


	// refresh updates
	function latestUpdates(){
	var url = '/latest.php';
	var target = 'foodList';	
	var myAjax = new Ajax.Updater(target, url, {method: 'get', encoding: 'UTF-8', onSuccess: function(transport){
	var efeito = new Effect.Appear(target);
    }
    });
	}
	function refreshUpdates() {
	new Effect.Fade('foodList', {duration: 0.5, afterFinish: latestUpdates});
	}
	

	// find
	function findFood(){
	var url = '/find.php';
	var target = 'middle_split';	
	var pars = 'q='+$F('q');
	var myAjax = new Ajax.Updater(target, url, {method: 'POST', parameters: pars, encoding: 'UTF-8', onSuccess: function(transport){
	var efeito = new Effect.Appear(target);
    }
    });
	}
	function find() {
	new Effect.BlindUp('middle_split', {duration: 0.5, afterFinish: findFood});
	}
	
	// back to home
	function home(){
	var url = '/home.php';
	var target = 'middle_split';	
	var myAjax = new Ajax.Updater(target, url, {method: 'get', encoding: 'UTF-8', onSuccess: function(transport){
	var efeito = new Effect.Appear(target);
    }
    });
	}
	function backHome() {
	new Effect.BlindUp('middle_split', {duration: 0.5, afterFinish: home});
	}
	
	function hideloading(){
	    new Effect.Fade($('loaderThumb'), {duration: 0.5, afterFinish: function(effect){
Effect.BlindDown($('thumbs'), {duration: 0.1});
}});
	}
	
	//thumbs
	function init(){
   	var url = '/thumbs.php';
    var target = 'thumbs';
    new Ajax.Updater(target, url, {method: 'get', onComplete:hideloading});
	}


	// submit search with enter
	function searchEnterKey(e)
	{
     var key;
     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox
     if(key == 13)
          find();
     else
          return true;
	}	
-->