$(document).ready(function(){
	$('#tabs').tabs();
	$('.menu_block img').css({opacity : .5});	
	$(".menu_block").hover(
      function () {        $(this).find('img').animate({opacity: 1}, { queue:false, duration:100 });      }, 
      function () {        $(this).find('img').animate({opacity: .5}, { queue:false, duration:200 });     }
    );

	$(".banner_image").cycle({
	    fx:     'fade', 
	    timeout: 5000, 
	    delay:  40
	});

	quicklinkgo();
});	

function quicklinkgo(){
	var btn = document.getElementById('quicklinks_go');
	if(!btn)
		return false;
	btn.style.display='none';//hide the button

	btn = document.getElementById('quicklinks_select');
	if(btn)btn.onchange=function(){this.parentNode.submit();}
}
function cleanOnFocus(field,defaultText){
	try{
		if(!field.tagName == "INPUT" || !field.type=="text" || !field.value)
			return false;
		if(field.value == defaultText)
			field.value='';
	}catch(e){
		return false;
	}
}
function resetOnLostFocus(field,defaultText){
	try{
		if(!field.tagName == "INPUT" || !field.type=="text")
			return false;
		if(!field.value)
			field.value=defaultText;
	}catch(e){
		return false;
	}
}
