/*
 *  E-dreamz JQuery Utilities
 *  JJohnson | Fall 2008
 *  
 *  If you are using this file, you also need 
 *  to be sure you have the following JS files
 *  (included in this order)
 *  
 *  jquery.js
 *  ui.jquery.js
 *  edreamz.jquery.js (this file)
 *  
 *  
 */

 
 /* Tabbed Content Panel 
  *  HTML
  *  	<ul class="tabnav">  
  *			<li><a href="#panel1">Panel 1</a></li>  
  *	 		<li><a href="#panel2">Panel 2</a></li>  
  *		</ul>	
  *		 
  *		 <div id="panel1">
  *			--content for panel 1 here--		 
  *		 </div>
  *		 
  *		 <div id="panel2">
  *			--content for panel 2 here --		 
  *		 </div>
  *
  *	 JS
  *	  $('.tabnav').tabz();
  */
   
	$.fn.tabz = function(){  
		var el = this;
		$(el).tabs();
	}


/* Font Sizing Links
 * 
 * 	HTML (note that you don't have to use images, you could use text links)
 * 	<ul id="fontsize">
 *		<li>Font Size</li>
 *		<li><a href="" title="Make Text Smaller" class="minus"><img src="/images/btn_txtSmall.gif" alt="Make Text Smaller"></a></li>
 *		<li><a href="" title="Make Text Larger" class="add"><img src="/images/btn_txtLarge.gif" alt="Make Text Larger"></a></li>
 *	</ul>
 * 
 * 	JS
 * 	$('#fontsize').fontz();
 * 
 */


	$.fn.fontz = function(){
		$("#fontsize .add").click(function(){
			var currentFontSize = $('.admin_content').css('font-size');
			var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum + 2;
			
			if (newFontSize < 25) {
				$('.admin_content').css('font-size', newFontSize);
			}
			return false;
		})
		$("#fontsize .minus").click(function(){
			var currentFontSize = $('.admin_content').css('font-size');
			var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum - 2;
			if (newFontSize > 12) {
				$('.admin_content').css('font-size', newFontSize);
			}
			return false;
		})		
	} 

