	$(function() {
		$('div.tabstext').hide();
		$('div.tabconner').hide();
		$('.accordion .a-cont').hide();
		$('.c-tab > a').click(function () {
			var rootid = $(this).closest('tr').attr('id');
			var tabid = $(this).attr('class');
			var tabContainers = $('#'+rootid+' > td > div.tabstext');
			if ($('#'+rootid+' > td > div.tabs'+tabid).is(':visible')){
				$('#'+rootid+' > td > div.tabconner').hide('fast');
				$('#'+rootid+' > td > div.tabs'+tabid).hide('fast');
			} else {
				tabContainers.hide('fast');
				$('#'+rootid+' > td > div.tabconner').show('fast').removeClass().addClass('tabconner').addClass('tc'+tabid);
				$('#'+rootid+' > td > div.tabs'+tabid).show('fast');
			}

			//tabContainers.hide(); // прячем все табы

			return false;
		});
		//$('table.free').show();
		//$('#globtab > div#free').addClass('select');
		$('table.paid').hide();
		$('table.mf').hide();
		$('table.oth').hide();
		$('table.info').hide();
		$('table.free').hide();
		if (location.hash!=""){
        var tsel=location.hash;
        tsel = tsel.replace(/#/g,"");
        $('table.'+tsel).show();
		    $('#globtab > div#'+tsel).addClass('select');
    } else {
        $('table.free').show();
		    $('#globtab > div#free').addClass('select');
    }
		
		$('#globtab > div').click(function () {
			$('table.free').hide();
			$('table.paid').hide();
			$('table.mf').hide();
			$('table.oth').hide();
			$('table.info').hide();
			$('.accordion .a-cont').hide();
			$('div.tabstext').hide();
			$('div.tabconner').hide();
			$('#globtab > div').removeClass();
			$('table.'+$(this).attr('id')).show();
			$(this).addClass('select');
			return false;
		});
		$(".test1").jHelperTip({
			trigger: "hover",
			source: "container",
			dC:"#tip1",
			position:"relative"
		});
		$('.accordion .a-head').click(function() {
			var actemp=$(this).next();
			if(actemp.is(':visible')){
				$('.accordion .a-cont').hide();
			}else{
				$('.accordion .a-cont').hide();
				actemp.show();
			};
			return false;
			});

	});
