(function($){
	
	//used

	$.fn.getSubViewer = function (options){
		
		return this.each(function(){
			
			var $$ = $(this),
				$cat_id = $$.data('cat_id'),
				$sub_id = $$.data('sub_id');

			$$.click(function(e){
					
					e.preventDefault();  //erase if not needed
					
					$$.parent().parent().find('li a').removeClass('active');
					$$.addClass('active');

					
					getViewer({cat_id:$cat_id, sub_id:$sub_id});	
			});						
		
		});
	
	};
	
})(jQuery);
