   PHP superfish 
 
   A Codeigniter library that creates a superfish menu automatically with just few lines of code.

   Copyright (C) 2013  E.z 

   LICENSE

   Superfish is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).
   You don't have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using.
   Please see the corresponding license file for details of these licenses.
   You are free to use, modify and distribute this software, but all copyright information must remain.

   @package    	PHP Superfish
   @copyright  	Copyright (c) 2013, E.z
   @license    	As Above
   @version    	1.1 ****** New version
   @author     	E.z <ezgoen@gmail.com>

	Credits to 
 				- the creator of the jquery plugin SuperFish
 
 					http://users.tpg.com.au/j_birch/plugins/superfish/
 					http://archive.plugins.jquery.com/project/Superfish
 					https://github.com/joeldbirch/superfish/
   			
 				
 				Patrick Fitzgerald - the creater of csscolor.php
 
 					http://www.barelyfitz.com/projects/csscolor/
 	
 	Installation:
	
		This Package : 
			
			If you're using CI extract it into your CI tree 
			Maybe your root or www - if you're using CI its the parent of the application folder
			assuming www - it should look like this :
			
			/www/
				sf_install.txt (this file)
				sf_readme.txt
			
			/www/application/libraries/
				superfish.php
				index.html

			/www/application/config/
				superfish.php
				index.html
				
			/www/assets/
				index.html
				
			/www/assets/superfish/
				index.html

			/www/assets/superfish/css
				superfish-crumb.css
				index.html
				
			/www/assets/superfish/images
				index.html
			
			/www/assets/superfish/js
				index.html

			/www/assets/superfish/js
				superfish_css.php
				csscolor.php
				index.html
		
	
		
    Superfish jQuery plugin :
  
		Download the latest version if the jquery plugin SuperFish from git
	  
		https://github.com/joeldbirch/superfish/archive/master.zip
		
		extract it to assets/superfish
		when your done you should have 
		assets/superfish/
			changelog.txt
			example.html
			followed.html
			MIT-LICENSE.txt
			README.md
			superfish.jquery.json
			
		assets/superfish/css/
			superfish.css
			superfish-navbar.css
			superfish-vertical.css
			superfish-crumb.css       <-- our file - edit this to change the crumb style
			
		assets/superfish/images/
			arrows-ffffff.png
			
		assets/superfish/js/
			hoverIntent.js
			jquery-1.9.0.min.js 
			superfish.js
			supersubs.js
  
    
  	csscolors.php colors library:
   
		You can download the latest version and remove the pear dependancies yourself
		or you can use the included version which has all pear dependancies removed
		
		to install it by creating assets/superfish/theme/
		and placing csscolor.php into there along with superfish_css.php
		so when your done you'll have:
				
		assets/superfish/theme/
			csscolor.php
			superfish_css.php			<-- our file - this controls the color scheme/theme of the menu
	  
		to reduce processing superfish_css.php will cache copies if its css 
		and output that rather than computing a new theme.
 	

	
	Usage :
	
	To load the library in CI 
	
		$this->load->library('superfish',
							array('container_tag_id'=>'admin_menu', 
								  'container_tag_id'=>'nav',
								  'container_tag_class'=>'sf-menu',
								  'pathLevels'=>0,       
								  'home_url'=>'/admin',
								  'base_ref'=>site_url(),
								  'background_color'=>'FFD833',
								  'highlight_color'=>'FAC101',
								  'text_color'=>'670001',
								  'SESSION'=>$this->session));	
								  
								 
	To build a menu
	
		/make a shortcut to superfish 
		$SuperFish=$this->superfish;  
		
		//if you're using CI you get your active url like this (remember to $this->load->helper('url');)
		$active_item=$this->uri->uri_string();
		
		$SuperFish->set_menu_item('home','Home',$active_item);
		$SuperFish->set_menu_item('admin/usr_accounts','Administrative Tasks/Manage User Accounts',$active_item);
		$SuperFish->set_menu_item('admin/site_man','Administrative Tasks/Perform Site Management Tasks',$active_item);

	To get the rendered menu:
	
		$menu=$SuperFish->render();
		
	To get the menu rendered to your grocerycrud output:
	
		$output=$SuperFish->renderToCrud($output);
	
								  
	In your template put the following where you want the menu to appear							  
     			<div class="nav">
	 				<?php print $menu; ?>
	 				<div class="clear"> </div>
	 			</div>
				
				
	 The output will be :
	 							
	           <div class="nav">
	 				<!-- Start SuperFish Menu  //-->
	 					<ul id="nav" class="sf-menu">
	 						<li><a href="http://testing/index.php/home" title="Home">Home</a></li>
	 						<li>
	 							<a href="#" title="Administrative Tasks" >Administrative Tasks</a>
	 							<ul>
	 								<li><a href="http://testing/index.php/admin/usr_accounts" title="Manage User Accounts">Manage User Accounts</a></li>
	 								<li><a href="http://testing/index.php/admin/site_man" title="Site Management">Site Management</a></li>
	 							</ul>
	 						</li>
	 					</ul>
	 				<!-- End SuperFish Menu  //-->
	 				<div class="clear"> </div>
	 			</div>
	 
	 To render the breadcrumb trail just do this in your template
	 a basic stylesheet is in /assets/superfish/css/superfish-crumb.css
	 
	 Note the breadcrumb trail is experimental - it works for me but I havent 
	 texted it extensively and the code is pretty messy :(
	 
	 			<div class="crumb">
	  				<?php print $bread_trail; ?>
	 				<div class="clear"> </div>
	 			</div>
	 
	 								  