/*
 * simpletabs.js 
 *
 * 10/28/2008 Christian Montoya - Mappdev.com / ChristianMontoya.net
 * You are welcome to use this script as long as you keep this comment in the header 
 *
 */ 
 
jQuery(document).ready(function($) { 
	// Do jQuery stuff using $
	$("#panels > div").hide(); 
  $("#panels > div").eq(0).show(); 
  $("ul#panelstabs a").eq(0).addClass(''); 
	$("ul#panelstabs a").click( 
		function() { 
			if($(this).hasClass('selected')) { 
				/* do nothing */
			}
			else { 
				$("ul#panelstabs a.selected").removeClass('selected');
				$(this).addClass('selected'); 
				$("#panels > div").hide();
				$(""+$(this).attr("href")).fadeIn('fast');  
			}
			return false; 
		}
	);
}); 

// fixing fade behavior in IE 
jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
jQuery.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
jQuery.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 