// ENHANCE fadeIn FOR INET EXPLORER
$.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if ($.browser.msie)  
            this.style.removeAttribute('filter'); 
			
        if ($.isFunction(callback)) 
            callback();  
    }); 
}; 
$.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if ($.browser.msie)  
            this.style.removeAttribute('filter');  
        if ($.isFunction(callback)) 
            callback();  
    }); 
}; 
$.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && $.browser.msie)  
            this.style.removeAttribute('filter');  
        if ($.isFunction(callback)) 
            callback();  
    }); 
};

// add class to aid HIDE function
$('html').addClass('js');
// MAIN DOCUMENT READY POINT
$(document).ready(function() {
	// setup home page slideshow
	$('#pics').livequery(function(){
		$(this).cycle({fx:'fade', speed:  2500, pause: 1});
	});
	// link nav to show content function
	$('ul.sf-menu li a').click(function(){  
		var toLoad = $(this).attr('href')+' #content';  
    	$('#content').fadeOut('fast',loadContent);  
   		
     	return false; 
	});
	// UNHIDE
	$('html').removeClass('js');
});