/*	function salez(){
	pathname = window.location.pathname;
	//alert(pathname);
	if (pathname=='/main' || pathname=='/main/' || pathname== '/' || pathname=='') {showhide('sale','buy');}
	else window.location.href="/main?opensale";
}
	
	div_zaya="<div  style=\"margin-left:0px;\" class='tooltip_'><div id='zaya_tool' class='tooltip_body'></div></div>";
	
    
    zay=$('a[href=/zayavka/]:eq(0)');
    
    zay.attr('href','#zayzay');
    zay.simpletip({content: div_zaya});
    $('#zaya_tool').load('/ajax/zaya.php');
    */
    
$(document).ready(function(){    
	
	
	$("a[href='/service/']").removeAttr('href');
	
	$('.tooltipClue').each(function()
			{
			hiddendiv=$(this);
			alink=$(this).prev();			
			alink.mouseenter(function(){$(this).next().show();}).mouseleave(function(){$(this).next().hide();});
			hiddendiv.mouseleave(function(){$(this).hide();}).mousemove(function(){$(this).show();});
			});
			
	$('#1').change(function(eventObject)
			{
			tv=$(this).attr('value');
			//form_clear();
			$(this).attr('value',tv);
			});
	
	$('#blocklayer').click(function()
			{
			$('#cluetip').hide();
			$('#blocklayer').animate({width:"hide"},700);
			});
	
	$('#city_tt, #type_tt').each(function()
			{
				$(this).cluetip(	
				{
					width:220,
					dropShadow:false,
					sticky:true,
					closePosition:'title', 
					activation:'click',
					cluezIndex:9999,
					closeText:"<span style=\"padding: 0 10px;background:url('/img/closeform.png') no-repeat 0 0 transparent\"> </span>",
					position:'fixed',
					onShow: function(c,ct)
					{
					if ($(ct).children('#cluetype').attr('value')=='type')
					{
						$('#cluetip').addClass('cluetype');
						$('#cluetip-title').prepend('<div style="float:left;" id="delme">Выберите категорию транспортного средства</div>');
					}
					else
					{
						$('#city'+$('#hcity').attr('value')).parent().addClass('activeitemcluetip');
						$('#cluetip-title').prepend('<div style="float:left;" id="delme">Выберите город</div>');
					}
					},
					onHide: function(c,ct)
					{
						
						$('#delme').remove();
						$('#cluetip').removeClass('cluetype');
						$('#blocklayer').animate({width:"hide"},700);
						
					},
					onActivate: function(e) 
					{
						$('#blocklayer').show().animate({width:"hide"},0).animate({width: "show" },700); 
						return true;
					}
				})
			
			});
						
				

	
});
    

