   $(document).ready(function() {

		$('#home_slideshow').cycle({
			fx:     'fade', 
			timeout: 10000, 
			next: '#hover_next',
			prev: '#hover_prev',
			cleartype: 1
			}); 
	
		$("#textOnly").append("<a title='text only' href='javascript:textonly();'>Text Only</a>");
		
		$("#news_bar_box2").livequery(function(){$(this).attr("style","display:block");});
				
	   $('#news_text').livequery(function(){
			$(this).cycle({
			fx:     'fade', 
			timeout: 6000, 
			next: '#news_next',
			cleartype: 1
			});
		});
		
		$('#news_next').livequery(function(){
			$(this).click(function(){
				$('#news_text').cycle('resume');
			});
		});
		$('#news_pause').livequery(function(){
			$(this).click(function(){
				$('#news_text').cycle('pause');
			});
		});
		
		$('#hover_pause').livequery(function(){
			$(this).hover(function(){	
				$(this).fadeTo("slow", 0.55);
				}, function() {
				$(this).fadeTo("slow", 0.00);
			});			
			$(this).click(function(){
				$('#home_slideshow').cycle('pause');
			});
		});
		
		$('#hover_next').livequery(function(){
			$(this).hover(function(){	
				$(this).fadeTo("slow", 0.55);
				}, function() {
				$(this).fadeTo("slow", 0.00);
			});
			$(this).click(function(){
				$('#home_slideshow').cycle('resume');
			});			
		});
		$('#hover_prev').livequery(function(){
			$(this).hover(function(){
				$(this).fadeTo("slow", 0.55);
				}, function() {
				$(this).fadeTo("slow", 0.00);
			});
			$(this).click(function(){
				$('#home_slideshow').cycle('resume');
			});
		});
		
		$('#box_btm').agile_carousel({
			number_slides_visible: "4",
			timer_length: "7000",
			transition_duration: 1000,
			transition_type: "carousel",
			timer_on: "no"
		 });

		$("#query").bind('blur',function(){		
			if (this.value=='')
			{ this.value="Search SFGOV";}
		});
		$("#query").bind('focus',function(){	
			if (this.value=='Search SFGOV')
			{ this.value="";}
		});
		
		$("#txtHowDoI").bind('blur',function(){		
			if (this.value=='')
			{ this.value="How Do I...?";}
		});
		$("#txtHowDoI").bind('focus',function(){	
			if (this.value=='How Do I...?')
			{ this.value="";}
		});

		$("bnt_go").hover(function(){	
			this.src="images/homepage/go.png";
		},function(){
			this.src="images/homepage/go_hover.png"
		});
					   
		$("#map_div a").hover(function(){
			var x=this.id.split('_');		
			$('#dll_' + x[1]).css('text-decoration','underline');	
			$('#dist_' + x[1]).addClass('hover');			
		},function() {
			var x=this.id.split('_');
			$('#dll_' + x[1]).css('text-decoration','none');	
			$('#dist_' + x[1]).removeClass('hover');			
		});
							
  });
  
 function textonly() {
	for(i=0;i<document.styleSheets.length;i++) {
		void(document.styleSheets.item(i).disabled=true);
	}
	el = document.getElementsByTagName('*');
	for ( i=0; i<el.length; i++) {
		void(el[i].style.cssText = '');
		el[i].setAttribute('hover','');
	}
		$(document).ready(function(){
			$('img').each(function(){
				var alt=$(this).attr('alt');
				if(alt != 'space' && typeof(alt)!='undefined')
				$(this).replaceWith(' ' + alt + ' ');
			});
		});
	$('*').each(function(){
		$(this).unbind();
	});
}
  
