startList = function() {

//thyme toggle
// FOR SITE NAVIGATION
$$('#topnav>ul>li').each(function(x)
{
	if(x.className.search('on') === -1)
	{
		//console.log(x);
		if($$('li.on')[0].down('ul'))
		{
			x.observe('mouseover', function(){ $$('li.on')[0].down('ul').hide(); })
			x.observe('mouseout', function(){$$('li.on')[0].down('ul').show()})
		}	
	}
})

// IE :(
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.nodeName=="LI") {
  node.onmouseover=function() {
  this.className+=" over";
    }
  node.onmouseout=function() {
  this.className=this.className.replace
      (" over", "");
   }
   }
  }
 }

// FOR FOOTER NEWSLETTER SIGNUP
$('emailInput').observe('focus',function(event){
	if($('emailInput').value == 'Enter your e-mail address')
	{ $('emailInput').value = ''; }
})
$('emailInput').observe('blur',function(event){
	if($('emailInput').value == '')
	{ $('emailInput').value = 'Enter your e-mail address'; }
})
 
 
} // cose startList function definition
window.onload=startList;




/* all below are custom javascript for Lanelle's quicksearch */

function loadcommunities(daselect) {
    var url = "/xhr.quicksearch.php";
    var island = daselect.value;
    var pars = "island=" + island;
    var myProcess = new Ajax.Updater("quick_community", url, {method:"post", parameters:pars});
}

function priceSwitch(saleORrent)
{
	if (saleORrent == 'buy'){saleORrent='sale';}
	if (saleORrent == 'sale' || saleORrent == 'rent')
	{
		var url = '/xhr.quicksearch.php';
		var pars = 'cmd=priceSwitch&switchTo=' + saleORrent;
		
		var myProcess = new Ajax.Updater ('minmax',url,{method: 'post',parameters:pars});
	}
}

function propTypeSwitch(type)
{
		var url = '/xhr.quicksearch.php';
		var pars = 'cmd=propertyTypeList&type=' + type;
		var myProcess = new Ajax.Updater ('propTypeSelect',url,{method: 'post',parameters:pars});
}





