$(document).ready( function() {
// ;

});
<!--var partners = Number($('#count2').val());-->

function splay(id) {
	// ;
	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/main/video/"+id+".flv",
			"st":"/styles/video22-621.txt"
			
		},
		allowfullscreen: "true",
		width: "600",
		height: "400",
		wmode: "transparent"
	});

	
}

function splay2(id) {
	// ;

	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/portfolio/video/"+id+".flv",
			"st":"/styles/video22-623.txt"
			
		},
		allowfullscreen: "true",
		width: "500",
		height: "300",
		wmode: "transparent"
	});

	
}





function splay3(id) {
	// ;

	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/porno/video/"+id+".flv",
			"st":"/styles/video22-623.txt"
			
		},
		allowfullscreen: "true",
		width: "500",
		height: "300",
		wmode: "transparent"
	});

	
}






r = 1; 
function anim(x) {
	// ;

	$("#iii").html('').css("zIndex",0).hide();	
	if (x==1) {
    $("#area1").animate(  { width:"600px",
						   height:"400px",
						   left: "260px",
						   top: "120px"
						 }						 
						 );	
	
	$("#area2").animate( { width:"300px",
						   height:"200px",
						   left: "80px",
						   top: "430px"
						 }						 
						 );
	$("#area3").animate( { width:"200px",
						       height:"140px",
						       left: "250px",
						       top: "660px"
						 }						 
						 );
	$("#area4").animate( { width:"150px",
						       height:"100px",
						       left: "490px",
						       top: "630px"
						 }						 
						 );

	}
	



	
	
if (x==2) {
   $("#area1").animate( { width:"150px",
						   height:"100px",
						   left: "490px",
						   top: "630px"
						 }						 
						 );	
	
	$("#area2").animate( { width:"600px",
						   height:"400px",
						   left: "260px",
						   top: "120px"
						 }						 
						 );
		$("#area3").animate( { width:"300px",
						   height:"200px",
						   left: "80px",
						   top: "430px"
						 }						 
						 );
		$("#area4").animate( { width:"200px",
						   height:"140px",
						   left: "250px",
						   top: "660px"
						 }						 
						 );

	}
	

if (x==3) {
   		   $("#area4").css("z-index",1);
   		   $("#area1").animate( { width:"200px",
						   height:"140px",
						   left: "250px",
						   top: "660px"
						 }						 
						 );	
		   
	
		$("#area2").animate( { width:"150px",
						   height:"100px",
						   left: "490px",
						   top: "630px"
						 }						 
						 );
		
		
			$("#area3").animate( { width:"600px",
						   height:"400px",
						   left: "260px",
						   top: "120px"
						 }						 
						 );
			
			
		
				$("#area4").animate( { width:"300px",
						   height:"200px",
						   left: "80px",
						   top: "430px"
						 }						 
						 );
	}





if (x==4) {
   $("#area4").css("z-index",4);
   $("#area1").animate( { width:"300px",
						   height:"200px",
						   left: "80px",
						   top: "430px"
						 }						 
						 );	
   		  	   
	
	$("#area2").animate( { width:"200px",
						   height:"140px",
						   left: "250px",
						   top: "660px"
						 }						 
						 );
		
		
		
		$("#area3").animate( { width:"150px",
						   height:"100px",
						   left: "490px",
						   top: "630px"
						 }						 
						 );
			
			
		$("#area4").animate( { width:"600px",
						   height:"400px",
						   left: "260px",
						   top: "120px"
						 }					 
						 );
		
}
	$timer = setTimeout(function() {
	// ;
	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/main/video/"+x+".flv",
			"st":"/styles/video22-627.txt"
			
		},
		allowfullscreen: "true",
		width: "600",
		height: "400",
		wmode: "transparent"
	});
},400);
		
}

function anim2(x,y) {
	// ;
	$("#iii").html('').css("zIndex",0).hide();
	if (x==1) {
    $("#area_1").animate(  { width:"500px",
						   height:"300px",
						   left: "0px",
						   top: "0px"
						 }						 
						 );	
	
	$("#area_2").animate( {width:"300px",
						   height:"200px",
						   left: "400px",
						   top: "200px"
						 }						 
						 );

	}
	



	
	
if (x==2) {
   $("#area_1").animate( { width:"300px",
						   height:"200px",
						   left: "400px",
						   top: "200px"
						 }						 
						 );	
	
	$("#area_2").animate( { width:"500px",
						   height:"300px",
						   left: "0px",
						   top: "0px"
						 }						 
						 );
}

	$timer2 = setTimeout(function()
	{
	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/portfolio/video/"+y+".flv",
			"st":"/styles/video22-623.txt"
			
		},
		allowfullscreen: "true",
		width: "500",
		height: "300",
		wmode: "transparent"
	});} 
	
	,400);
		
}



function anim3(x,y) {
	// ;
	
	$("#iii").html('').css("zIndex",0).hide();
	if (x==1) {
    $("#area_1").animate(  { width:"500px",
						   height:"300px",
						   left: "0px",
						   top: "0px"
						 }						 
						 );	
	
	$("#area_2").animate( {width:"300px",
						   height:"200px",
						   left: "400px",
						   top: "200px"
						 }						 
						 );

	}
	



	
	
if (x==2) {
   $("#area_1").animate( { width:"300px",
						   height:"200px",
						   left: "400px",
						   top: "200px"
						 }						 
						 );	
	
	$("#area_2").animate( { width:"500px",
						   height:"300px",
						   left: "0px",
						   top: "0px"
						 }						 
						 );
}

	$timer3 = setTimeout(function()
	{
	$("#iii").html('').css("zIndex",6).show();
	$("#iii").flash({
		src: "/templates/flash/uppod.swf",
		flashvars: {
			"comment":"AVI",
			"m":"video",
			"file":"/files/porno/video/"+y+".flv",
			"st":"/styles/video22-623.txt"
			
		},
		allowfullscreen: "true",
		width: "500",
		height: "300",
		wmode: "transparent"
	});} 
	
	,400);
		
}






function says(id) {

el=document.getElementById(id);
el.style.visibility='visible';

}

function saysout(id) {
el=document.getElementById(id);
el.style.visibility='hidden';
}



function check(id) {
	$(".menu_top").hide('slow');
	$("#menu_top"+id).show('slow');
}
var num;  
function check2(count) {
	num = count;
	$("#part1").toggle('fast');
	$("#menu_top1_2").toggle('fast');
	if (count > 15){
			for (var i=1; i < 16; i++ )
			{
			$('#link'+i).show();
			}
		
		for (j=i; j < count+1 ; j++ )
			{
			$('#link'+j).hide();
			}
	$('#up').show('fast');
	$('#down').show('fast');
	klik = 0;	
	menu=document.getElementById('menu_15');
	menu.style.height='220px';	
		}
		

	else {
		 for (var i=1; i < count+1; i++ ) {$('#link'+i).show();}
		 
		 }
	
	

}

var klik = 0;
function tdown(num) {
	if ( klik < num-15 ) {
		klik++;

		$('#link'+klik).hide();
		$('#link'+(klik+15)).show();
		}
}

function tup(num) {
	if (klik>0) {
		
		$('#link'+klik).show();
		$('#link'+(klik+15)).hide();
		klik--;
		}
}

var x = 0;
var y = 0;
var press = 0;


function list_right(x) {
	
	if (press < x-3 ) {
		press++;
		$('#id'+press).hide('slow');
		$('#id'+(press+3)).show('slow');

		
	}

}

function list_left(x) {

	if (press > 0 ) {
		
		$('#id'+(press+3)).hide('slow');
		$('#id'+press).show('slow');
		press--;
		
	}

}

function mouse_left() {
			if (press > 0 )
				{
				$('#id'+(press+3)).hide('slow');
				$('#id'+press).show('slow');
				press--;
				$timer3 = setTimeout(function(){
	 			if (press == 0 ){ $('#move_left').css("backgroundImage",'url(/templates/images/left.jpg)'); }				
				if (press != num-3 ){ $('#move_right').css("backgroundImage",'url(/templates/images/right.jpg)'); }
				},500);
				}
			}
var flag = 1;

function mouse_right(num) {
			if (press < num-3 ){	
				press++;
				$('#id'+press).hide('slow');
				$('#id'+(press+3)).show('slow');
				}
			
			
			$timer3 = setTimeout(function(){
			if (press > 0 ){ $('#move_left').css("backgroundImage",'url(/templates/images/left-red.jpg)'); }
			if (press == num-3 ){ $('#move_right').css("backgroundImage",'url(/templates/images/right-grey.jpg)'); }
			},500);
			
			}

function mouseout(f){

	flag = f;
	if (flag == 0) {
	myTimer2 = setTimeout("mouseout('1')", 300);
	
	}
		
}


function upper() {
			if (klik > 0 )
			{	
				
				if (flag == 1) {
				$('#link'+(klik+15)).hide('normal');
				$('#link'+klik).show('normal');
				klik--;
				myTimer3 = setTimeout("upper()", 350);
				}
				else return;
			}
}

function downer() {
			if (klik < num-15)
				{				
				if (flag == 1) {
				klik++;
				$('#link'+(klik+15)).slideDown();
				$('#link'+klik).slideUp();
				
				myTimer4 = setTimeout("downer('')", 350);
				}
				else return;
			}
}


var klik2 = 0;
var partners = 0;
var num = 0;
function part(y) {
	partners = y;
	if ( partners > 7 ) {
	
	$('#metka2').show('fast');		 
	}
	
}


function par_up() {
		if (klik2 > 0 )
			{	
				
				if (flag == 1) {
				$('#2link'+(klik2+8)).hide('slow');
				$('#2link'+klik2).show('slow');
				klik2--;
				if (klik2 == 0) { $('#par_up').hide('slow'); }
				myTimer6 = setTimeout("par_up()", 300);
				}
				else return;
			}
}

function par_down() {
			$('#par_up').css( "display","block");
			if (klik2 < partners-8)
				{				
				if (flag == 1) {
				klik2++;
				$('#2link'+klik2).hide('slow');
				$('#2link'+(klik2+8)).show('slow');
				myTimer7 = setTimeout("par_down('')", 300);
				}
				else return;
			}
}


function par_up2() {
		if (klik2 > 0 )
			{	
				
				if (flag == 1) {
				$('#2link'+(klik2+7)).hide('slow');
				$('#2link'+klik2).show('slow');
				klik2--;
				if (klik2 == 0) { $('#metka1').hide('slow'); }
				myTimer6 = setTimeout("par_up2()", 200);
				}
				else return;
			}
}

function par_down2() {
			$('#metka1').css( "display","block");
			if (klik2 < partners-7)
				{				
				if (flag == 1) {
				klik2++;
				$('#2link'+klik2).hide('slow');
				$('#2link'+(klik2+7)).show('slow');
				myTimer7 = setTimeout("par_down2('')", 200);
				}
				else return;
			}
}



