var obj = null;

function checkHover() {
	if (obj) obj.find('ul').fadeOut('fast');
}

jQuery(function() {
	
	/** begin submenu **/
	jQuery('#header ul > li').hover(
		function() {
			if (obj) {
				obj.children('ul:first')
					.css('display', 'none');
				obj = null;
			}
			jQuery(this).children('ul:first')
				.fadeIn();
		},
		function() {
			obj = jQuery(this);
			setTimeout("checkHover()", 1000);
		}
	);
	/** end submenu **/
	
	/** begin search **/
	jQuery('#s').attr({ 'value' : searchDefault });
	jQuery('#s').focus(function() {
		var temp = jQuery(this).attr('value');
		color = jQuery(this).css('color');
		jQuery(this).css({ 'color' : searchColor });
		if (temp==searchDefault)
			jQuery(this).attr({ 'value' : '' })
	});
	jQuery('#s').blur(function() {
		if (jQuery(this).attr('value')=='') {
			jQuery(this).attr({ 'value' : searchDefault });
		}
		jQuery(this).css({ 'color' : color });
	});
	/** end search **/
	
	/** begin images **/
	jQuery('#single a img').parent().attr({ 'rel' : 'lightbox[blah]' });
	/** end images **/
	
});

