//from mredesign.com
function setup_text_change()
{
	// initialize the jquery code
	 $(document).ready(					   
		function()
		{
			// changer links when clicked
			$("a.changer").click(
				function()
				{
					//set the div with class mainText as a var called $mainText 
					var $mainText = $('div#content');
					// set the current font size of .mainText as a var called currentSize
					var currentSize = $mainText.css('font-size');
					var currentHeight = $mainText.css('line-height');
					
					// parse the number value out of the font size value, set as a var called 'num'
					var num = parseFloat(currentSize, 10);
					var heightNum = parseFloat(currentHeight);
					
					// make sure current size is 2 digit number, save as var called 'unit'
					var unit = currentSize.slice(-2);
					var heightUint = currentHeight.slice(-2);
					
					// javascript lets us choose which link was clicked, by ID

					if (this.id == 'linkLarge'){
						num = num * 1.4;
						heightNum = heightNum * 1.2;
					} else if (this.id == 'linkSmall'){
						num = num / 1.4;
						heightNum = heightNum / 1.2;
					}
	
					// jQuery lets us set the font Size value of the mainText div
					$mainText.css('font-size', num + unit);
					$mainText.css('line-height', heightNum+unit);
				   	return false;
				});

			// hover for links - toggle css background colors
		
			$("a.changer").hover(
				function()
				{
					$(this).css('background-color', '#0099fb');
				}, 
				function()
				{
					$(this).css('background-color', '#fff');
				});

			// hide switchLinks on page load
			$('#switchLinks').hide();
			

			// show the switchLinks div if showme is clicked
			$('#showMe').click(
				function(){
					$(this).hide();
					$('#switchLinks').show();
					return false;
				});

			// hide switchlinks if it is clicked
			$('#switchLinks').click(
				function()
				{
					$(this).hide();
				$('#showMe').show();
				return false;
				});
	});
}




/* these functions from http://be.twixt.us/jquery/suckerFish.php */

$(document).ready(function(){
    $("#menu li").hover(
        function(){ $("ul", this).fadeIn("fast"); }, 
        function() { } 
    );
    if (document.all) {
        $("#menu li").hoverClass ("sfHover");
    }
});

$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};    
