	$.fn.jtabs=function(options)
	{
		return this.each(function(i)
		{
			$('a',this).each(function()
			{
				if($(this).attr('href').indexOf('#')=='0')
				{
					$($(this).attr('href')).addClass('tab_content_'+i);
					$(this).attr('href', $(this).attr('href').replace('#',''));
				}
				$(this).click(function()
				{
					$('.activetab').removeClass('activetab');
					$(this).parent().addClass('activetab');
					$('.tab_content_'+i).css('position','absolute').css('top','-10000px');
					$('#'+$(this).attr('href')).css('position','relative').css('top','0');
					return false;
				});	
			});
			$('.tab_content_'+i).css('position','absolute').css('top','-100000px');
            var this_page = window.location.href;
            if(this_page.indexOf('#')>0)
            {
                var parts = this_page.split('#');
                var name = parts[1];

                if($('a[href='+name+']',$(this)))
                {
                    $('a[href='+name+']',$(this)).parent().addClass('activetab');
                    $('#'+name).css('position','relative').css('top','0');
                }
            }
            else
            {
                if($('.activetab').length>0)
    			{
    				$($('.activetab a').attr('href')).css('position','relative').css('top','0');
    			}
    			else
    			{
    				$('.tab_content_'+i+':first').css('position','relative').css('top','0');
    				$('a[href="'+$('.tab_content_'+i+':first').attr('id')+'"]').parent().addClass('activetab');
    			}
            }
             
						
		});
	}
