﻿$(document).ready(function(){
	// Выравнивание колонок
	height = 0;
	$(".stella").each(function(){
		if($(this).attr("offsetHeight") > height){
			height = $(this).attr("offsetHeight");
		}//if
	});
	$(".stella").css("height", height+"px");
	
	prm = 1;
	
	// Открытие большой флешки
	$(".clickFlash").click(function(){
		if(prm == 1){
			prm = 0;
			nextFace(1);
			/*
			rand=Math.ceil(1*Math.random());
			
			iFlash = $("#fl_"+rand);
			iFlash.css("display","inline");
			
			iFlash.oneTime("7s", function() {
				$(this).css("display","none");
				prm = 1;
			});
			*/
			
		}//if
	});
	
	function nextFace(id){
		iFlash = $("#fl_"+id);
		iFlash.css("display","inline");
		
		iFlash.oneTime("6s", function() {
			$(this).css("display","none");
			id++;
			if(id < 5){
				nextFace(id);
			}else{
				prm = 1;
			}//else
		});
		
	}// function nextFace
	
});

