$.updateDimensions = function() {
	
 	if ( ($.browser.msie && $.browser.version < 8) || $.browser.safari ) {
		bodyWidth = $(document).width();
		
		if (bodyWidth < 1001) {
			
			$('div.optimization').css('width', '1000px');
			
		}
		else if (bodyWidth > 1000) {
			
			$('div.optimization').css('width', '100%');
			
		}
		
		if (bodyWidth < 1201) {
			
			$('td.left-column, td.right-column').css('width', 'auto');
			$('td.centr-column').css('width', '1000px');
			
		}
		else if (bodyWidth > 1200) {
			
			$('td.left-column, td.right-column, td.centr-column').removeAttr('style');
			
		}
		
		if (bodyWidth > 1400) {
			
			$('table.container').css('width', '1400px');
			
		}
		else if (bodyWidth < 1401) {
			
			$('table.container').css('width', '100%');
			
		}
		
 	} 
	
};

$(document).ready(function() {
	
	$.updateDimensions();
	
	$(window).resize(function() {
		
		$.updateDimensions();
		$(".wellcome-left-bg2").height ($(".wellcome-bg1").height());
			
	});
	
	 $(".wellcome-left-bg3").height ($(".wellcome-bg1").height());
	 
	 
	 $.updateDimensions();
	
	$(window).resize(function() {
		
		$.updateDimensions();
		$(".other_block1_right").height ($(".about_block_back").height());
			
	});
	
	 $(".other_block1_right").height ($(".about_block_back").height());
	 
	 if (detectFlash()) {
		 
		 $(".no-flash").css("margin-top", "-480px"); 
		 $(".felloe").addClass("no-bg2");
		 $(".cup").css("display", "none");
		 $(".centr-column").addClass("no-bg2");
		 $(".right-column-bg").addClass("no-bg2");
		 
		 
	 
	 }
	 else {
		 
		 $(".flash").css("display", "none"); 
		 
	};
	 
	
	
	
});


function detectFlash() {
var result = false;
if ((navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") == -1 && navigator.appVersion.indexOf("3.1") == -1) || (navigator.plugins && navigator.plugins["Shockwave Flash"]) || navigator.plugins["Shockwave Flash 2.0"]){
result = true;
}
return result;
}





