/**
 *	@purpose:   handles the hiding/showing of content on the homepage
 *	@author:    robert.leurs@cooloxygen.com
 *	@version:   1.0
 */    

$(function(){
     
     
     var autoHideObjects = $(".auto_hide");
     
     initLoad(autoHideObjects);
     
     function initLoad(objects){
     
        $(objects).hide();
        $(".btn_auto_hide_hide").hide();
     };     
     
     function hideObjects(objects){
        
        $(objects).hide(0);
        
        $(".btn_auto_hide_show").show();
        $(".btn_auto_hide_hide").hide();
     };
     
     
     function showObjects(objects){
     
        $(objects).fadeIn("slow");
        
        $(".btn_auto_hide_show").hide();
        $(".btn_auto_hide_hide").show();
        
        return false;
     };     
     
     $(".btn_auto_hide_show").click(function(){
     
        showObjects(autoHideObjects);
     });
     
     $(".btn_auto_hide_hide").click(function(){
     
        hideObjects(autoHideObjects);
     });
});