$(document).ready(function(){
	$('h1').css({fontSize:'24px'}).sifr({
		font:'/css/gillsmt.swf',
		height:28,
		afterEach: function(t){
			$('h1.sIFR-replaced').css({fontSize:'18px'});
		}
	});
	$('div.frow input,div.frow textarea,#kw').focus(function(){
		if($(this).attr('title') == $(this).val()){
			$(this).val('');
		}else{
			$(this).val($(this).val());
		}
	});
	$('div.frow input,div.frow textarea,#kw').blur(function(){
		if($(this).val() == ''){
			$(this).val($(this).attr('title'));
		}else{
			$(this).val($(this).val());
		}
	});

	var x;
	$('a', $('.subnav').parent()).mouseover(function(){
		$('.subnav', $(this).parent()).fadeIn(function(){
			var thisid = $(this).attr('id');
			$(this).unbind('mouseout').mouseout(function(){
				x = setTimeout("$('#" + thisid + "').fadeOut();", 500);
			});	
			$('a.parent').unbind('mouseout').mouseout(function(){
				x = setTimeout("$('#" + thisid + "').fadeOut();", 500);
			});	
		});
		$('.subnav,a', $(this).parent()).mouseover(function(){
			clearTimeout(x);
		});
	});

	if($('#slideshow1')[0]){
		try{
			$('#slideshow1').cycle({ 
				speed:  2500,
				timeout:  10000 
			});
			$('#slideshow2').cycle({ 
				speed:  2500,
				delay: 2000, 
				timeout:  10000 
			});
		}catch(e){}
	}
});
