(function($) {  

    $.fn.slideNav = function() {  
		
        return this.each(function() {

  			var $this 		= $(this);
  			var back_level 	= 0;
			
			$('.back-button').click(function(){
				$this.animate({
    				left: '-'+back_level*500+'px'
  					}, 200, function() {
    				// Animation complete.
  				});
				if(back_level != 0){
					back_level--;
				}
			})
			
			$this.find('a[class!=product]').click(function(){
				
				//Find List Level
				var collection		= $(this).parents().eq(4).find('a[class!=product]').index($(this));
				var level 			= $(this).parents().eq(4).index()+1;
				var section			= $(this).parent().index();
				var position		= level*500;

				back_level 			= level-1;
				
				$this.children("ul li").eq(level).css("top", "-"+collection*200 +"px" );
				$this.animate({
    				left: '-'+position+'px'
  					}, 200, function() {
    				// Animation complete.
  				});
				return false;
			});
			
			$this.find('a[class=product]').click(function(){
				parent.location.replace($(this).attr("href"));
				return false;
			});
		}); // end each  
  
    }  
  
})(jQuery);  
