$(document).ready(function() { 
		$('#menuList ul li strong').click(function(){
			if($(this).parent().children('.list')){
				if($(this).parent().hasClass('hover')){
					$(this).parent().removeClass('hover');
					$(this).parent().children('.list').hide();
				}else{						
					$(this).parent().addClass('hover');
					$(this).parent().children('.list').show();

				$('#menuList .list li').hover(function(){
					$(this).addClass('active');
					},function(){
					$(this).removeClass('active');
				});
			}
		}
	});
	$('.mainLink').click(function(){
		if ($(this).next().hasClass('mainLinkOff')){
			$(this).next().removeClass('mainLinkOff');			
			$(this).next().addClass('mainLinkOn');			
		}else{
			$(this).next().removeClass('mainLinkOn');		
			$(this).next().addClass('mainLinkOff');		
		}
		return false;
	});
	$('tr td div a[rel=lightbox]').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	 var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8842235-33']);
  _gaq.push(['_addOrganic', 'qip.ru', 'query']);
  _gaq.push(['_addOrganic', 'go.mail.ru', 'q']);
  _gaq.push(['_addOrganic', 'nova.rambler.ru', 'query']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
});
