﻿
function goToAddress(x) {
				document.location = x;
			}	
			
			
$(document).ready(function(){
    	// BUTTONS
    	$('.fg-button').hover(
    		function(){ $(this).removeClass('ui-state-default').addClass('ui-state-focus'); },
    		function(){ $(this).removeClass('ui-state-focus').addClass('ui-state-default'); }
    	);
    	
    	// MENUS    	
		$('#flat1').menu({ 
			content: $('#flat1').next().html(), // grab content from this page
			showSpeed: 200 
		});

		$('#flat3').menu({ 
			content: $('#flat3').next().html(), // grab content from this page
			showSpeed: 200 
		});

		$('#flat4').menu({ 
			content: $('#flat4').next().html(), // grab content from this page
			showSpeed: 200 
		});
		
		$('#flat7').menu({ 
			content: $('#flat7').next().html(), // grab content from this page
			showSpeed: 200 
		});
		$('#flat9').menu({ 
			content: $('#flat9').next().html(), // grab content from this page
			showSpeed: 200 
		});


	$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 
   	 $(pager).find('td').removeClass('activeLI') 
      	  .filter('td:eq('+currSlideIndex+')').addClass('activeLI'); 
      	 	}; 
         
	$('#cycle').cycle({ 
	    timeout: 5000, 
	    pager:  '#nav', 
  	    pauseOnPagerHover: true,  
  	    pause: true,	    
	    pagerAnchorBuilder: function(idx, slide) { 
	  return '<tr><td height="50px" bgcolor="#e5f4fb" class="inactiveLI" style=" cursor:pointer;" align="center"><a href="#"><font color=#ffffff><b>' + slide.name + '</b></font></a></td></tr>'; 


	    } 
	}); 
	 
    });
    
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}
