window.onresize = function() {
	var delta = document.documentElement.clientHeight - 255;
	if (delta < 540) delta = 540;
	if (document.getElementById('flash_movie')) {
		document.getElementById('flash_movie').style.height = delta + 'px';
	}
	if ($.browser.msie && $.browser.version == 6) {
		$('.submenu').css('bottom', delta - delta / 2);
	} else {
		$('.submenu').css('bottom', delta - 180 - delta / 2);
	}
}
$(document).ready(function(){
	function ClearAll(n) {
		for (i=1;i<8;i++){$('#but'+i+' a').removeClass('active');$('#but'+i+' a').addClass('nonactive');}
		$('#but'+n+' a').removeClass('nonactive');
		$('#but'+n+' a').addClass('active');
	}
	$('#but1 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'znakomstvo');
		ClearAll(1);
	});
	$('#but2 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'minibank');
		ClearAll(2);
	});
	$('#but3 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'razvitie');
		ClearAll(3);
	});
	$('#but4 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'lider');
		ClearAll(4);
	});
	$('#but5 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'partner');
		ClearAll(5);
	});
	$('#but6 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'lux');
		ClearAll(6);
	});
	$('#but7 a').bind("click",function(e){
		$('#flash_movie').get(0).SetVariable('razdel', 'constructor');
		ClearAll(7);
	});
  });

 $(function(){
	$('#flash_movie img, .static-wrapper .quote-wrapper .fon ').ifixpng();
});



/**
 * K
 */
	$(function() {
		var timer;
		
		$('.submenu ul li.consultant a').hover(function() {
			clearTimeout(timer);
			$(this).siblings().show();
		}, function() {
			var that = this;
			timer = setTimeout(function() {
				$(that).siblings().hide();
			}, 1500);
		});
		
		$('.submenu ul li.consultant span.description').hover(function() {
			clearTimeout(timer);
		}, function() {
			var that = this;
			timer = setTimeout(function() {
				$(that).hide();
			}, 1500);
		});
		
	});
	
	
	
