<!--
  
function window_open(url,sizex,sizey,r,scrollb)
{
	var r,titlepage,scrollb;
	if (!scrollb) scrollb=0;
	window.open (url, r, 'Toolbar=0, Titlebar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbars='+scrollb+', Resizable=0, Copyhistory=1, width='+sizex+',height='+sizey);
}



function mail_hide(user,domain,zone){
	document.write('<a href="mailto:' + user + '@' + domain + '.' + zone + '">' + user + '@' + domain + '.' + zone + '</a>');
}

/// Menu
function loadimage()
{
	d = document;
	if(d.images)
	{
	  if(!d.massimg) d.massimg = new Array();
	  
	  var i,j = d.massimg.length, a = loadimage.arguments;
	  for(i=0; i < a.length; i++)
	  {
		  if (a[i].indexOf("#") != 0)
		  {
			  d.massimg[j] = new Image;
			  d.massimg[j++].src = a[i];
		  }
	  }
	}
}

function gomenu(sh,curr)
{
	var divshow = document.getElementById('submenu');	
	var ulshow = document.getElementById('submenu_ul' + sh);
	
	if(ulshow)
	{
		for(i=1;i < 6;i++)
		{
			if(sh !== i)
			{
				document.getElementById('submenu_ul' + i).style.display = 'none';
			}				
		}
		ulshow.style.display = 'block';
	}
	
	if(divshow)	divshow.className = curr;
}
/// Menu End;

//-->

$(document).ready(function() {
   $('#output li:eq(0)').addClass('current').siblings().hide();
   $('#tabs li:eq(0) a').addClass('current');
 $('#tabs').find('li').each(function(i) {
      $(this).click(function(){
        $('#output li.current').removeClass('current').hide().end().find('#output li:eq('+i+')').addClass('current').fadeIn(400);
         $(this).children('a').addClass('current');
         $(this).siblings().children('a').removeClass('current');
      });})
      $('.tprice').click(function(){$(this).toggleClass('noactive').next().toggle();});
      $('.tpricete').click(function(){$(this).toggleClass('noactive').next().toggle();});
      $('.sm a').click(function(){$(this).parent().next().toggle();
     $(this).parent().toggleClass('active');
      return false; });
/* 12.10.2011 */
	  if ((document.location.href == 'http://lzsk-okna.ru/') || (document.location.href == 'http://lzsk-okna.ru/price.html')) {
		$(".tpricein").css('display','block');
		};
/* end */	  
	Cufon.replace('.top_info,.content_header, .tel div, .bname, .header h3,h4.header, .header2 h3,h4.header2,.zvonok, .fullmoney span, .fullmoney b, .tprice dt span, .tprice dd span span'); // Works without a selector engine
    Cufon('#smenu .sm a', {hover: {color: '#e94f0b'}});


});

function quicker(form,select,clear) {
$.post('/quicker.php',$(form).serialize(), function(data) {
  if (clear)  $(clear).html('');
  data=data.split('!');
  if (!data[1])    data[1]='';
  $(select).html(data[0]+'<br />'+data[1]).parent().css('background','none');

});

}
  	$(function(){      $('#onlineb a').hide();
			$('#slides').slides({
				preload: true,
				preloadImage: 't/img/loading.gif',
				play: 5000,
				pause: 2500,
				hoverPause: true
			});
           	$('#onlineb').click( function (){
           	  if ($(this).css('width')=='170px'){
           	    $('#onlineb').animate({ width: 0}, 500,function(){     $(this).css('background-position','0 0');   });


               $('#onlineb a').hide();
           	  }  else  {    $('#onlineb a').show();
			   $(this).css('background-position','0 -68px');
			     $('#onlineb').animate({ width: 170}, 500);  }
			});

    	});


