var balans = new Array();
balans[1] = 0;	//variabila care-mi spune daca placile se balanseaza
balans[2] = 0;
balans[3] = 0;
balans[4] = 0;
balans[5] = 0;

$(document).ready(function(){
	$("#closeMap").click(function(){unloadMap();});
	//browser check
	var brauser = '';
	jQuery.each(jQuery.browser, function(i, val) {
	  if(val==true){ brauser = i; }
	});
	
	$("#vidio").tubeplayer({
		width: 1, // the width of the player
		height: 1, // the height of the player
		allowFullScreen: "true", // true by default, allow user to go full screen
		initialVideo: "bOf7Lp5U7vM", // the video that is loaded into the player
		playerID: "youtube-player", // the ID of the embedded youtube player
		preferredQuality: "default",// preferred quality: default, small, medium, large, hd720
		onPlay: function(id){}, // after the play method is called
		onPause: function(){}, // after the pause method is called
		onStop: function(){ }, // after the player is stopped
		onPlayerEnded: function(){ setTimeout('startSound()', 100); }, // when the player returns a state of ended
		onSeek: function(time){}, // after the video has been seeked to a defined point
		onMute: function(){}, // after the player is muted
		onUnMute: function(){} // after the player is unmuted
	});
	
	$("#muteVidio").click(function(){ $("#vidio").tubeplayer('pause'); $(this).hide(); $("#unmuteVidio").show();});
	$("#unmuteVidio").click(function(){ $("#vidio").tubeplayer('play');  $(this).hide(); $("#muteVidio").show();});
	
	if (screen.height>=800)
	{	//daca are ecranul mare, il las in pace si pastrez css-ul default

	}
	else
	{
		$("#logo_home img").attr('src', '/extras/images/logo_home_lowres.jpg').css({'width':120, 'height':101} );
		$("#sunny_home img").attr('src', '/extras/images/sunny_home_lowres.jpg').css({'width':120, 'height':51} );
		$("#d_home img").attr('src', '/extras/images/d_home_lowres.jpg').css({'width':28, 'height':40} );
		$("#ay_home img").attr('src', '/extras/images/ay_home_lowres.jpg').css({'width':40, 'height':26} );
	}

	// PETRECERI
	$("#petreceri_meniu").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#petreceri_meniu_content").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#petreceri_meniu_content").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
				});
	});
	
	$("#petreceri_formule").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0, 
				function(){
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#petreceri_formule_content").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#petreceri_formule_content").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
				});
	});
	
	$("#petreceri_teme").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#petreceri_teme_content").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#petreceri_teme_content").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
				});
	});
	
	$("#petreceri_activitati").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#petreceri_activitati_content").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#petreceri_activitati_content").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
				});
	});
	
	
	$("#petreceri_extra").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#petreceri_extra_content").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#petreceri_extra_content").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
			});
	});
	
	
	$("#open_cursuri_optionale").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					$("#petreceri_content").css('height', '373px');
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#program_content1").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#program_content1").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
			});
	});
	
	$("#open_cursuri_optionale2").click(function(){
		$(this).attr('href', '#');
		$("#petreceri_content:visible").hide('blind', 300);
		$("#petreceri_content").hide(0,
				function(){
					$("#petreceri_content").css('height', '333px');
					if($("#petreceri_content").html() != $("#petreceri_closeBtn").html() + $("#program_content2").html()){ 
						$("#petreceri_content").html($("#petreceri_closeBtn").html() + $("#program_content2").html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#petreceri_content").hide('blind', 300);
								$("#petreceri_content").html('');
						});
						$("#petreceri_content").show('blind', 300);
					} 
					else { 
						$("#petreceri_content").html('');
					}
			});
	});
	
	
		$("#dialogmessage").dialog({
			modal: true,
			autoOpen: false,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
		});
	
	
	//scroll pane
	$('.scroll-pane').jScrollPane({showArrows: true, arrowScrollOnHover: true, autoReinitialise: true, horizontalGutter: 30,verticalGutter: 30});
	
	$("[id^='open_activitati']").click(function(){
		var e = $(this).attr('id'); e = e.replace('open_activitati', '');
		$(this).attr('href', '#'); 
		$("#activitati_content:visible").hide('blind', 300);
		$("#activitati_content").hide(0,
				function(){
					$("#activitati_content").css('height', '333px');
					if($("#activitati_content").html() != $("#activitati_closeBtn").html() + $("#activitati_content"+e).html()){ 
						$("#activitati_content").html($("#activitati_closeBtn").html() + $("#activitati_content"+e).html());
						//$("#petreceri_content").html($("#petreceri_meniu_content").html());
						$(".cee_close").bind('click', function(){
								$("#activitati_content").hide('blind', 300);
								$("#activitati_content").html('');
						});
						$("#activitati_content").show('blind', 300);
					} 
					else { 
						$("#activitati_content").html('');
					}
			});
	});
	
	$("[id^='summer_school_p']").click(function(){ 
		var e = $(this).attr('id'); 
		if( e.indexOf('_content') > 0){ return false; }
		e = e.replace('summer_school_p', '');
		if(e==6){ return true; }
		$(this).attr('href', '#'); 
		//alert(e); return true;
		$("#summer_school_detail_content:visible").hide('blind', 300);
		$("#summer_school_detail_content").hide(0,
				function(){
					//$("#summer_school_detail_content").css('height', '333px');
					$("#summer_school_detail_content").css('height', '260px');
					//alert('a1');
					if($("#summer_school_detail_content").html() != $("#petreceri_closeBtn").html() + $("#summer_school_p"+e+"_content").html()){ 
						$("#summer_school_detail_content").html($("#petreceri_closeBtn").html() + $("#summer_school_p"+e+"_content").html());
						$(".cee_close").bind('click', function(){
								$("#summer_school_detail_content").hide('blind', 300);
								//$("#summer_school_detail_content").effect('transfer', { to: "#summer_school_p"+e, className: 'ui-effects-transfer' }, 500, function(){
								//		$("#summer_school_detail_content").hide();
								//});
								$("#summer_school_detail_content").html('');
						});
						//$("#summer_school_detail_content").show('blind', 300);
						$("#summer_school_p"+e).effect('transfer', { to: "#summer_school_detail_content_ghost", className: 'ui-effects-transfer' }, 500, function(){
							$("#summer_school_detail_content").show();
						});
					} 
					else { 
						//alert('a3');
						$("#summer_school_detail_content").html('');
					}
					//alert('a4');
			});
	});
	
	var mesajContact = "Buna ziua,\r\n\nAs dori informatii in legatura cu ";
	mesajContact = mesajContact.replace(' ', '%20');
	$("area[title='csus']").attr('href', 'mailto:contact@sunny-day.ro');	//?subject=Re:&body='+mesajContact);

	$("#contact4cotatie").click(
		function(){
			var msgCotatie = 'Buna ziua, am dori o cotatie pentru o petrecere cu n copii si n parinti <i>(va rugam sa specificati detalii referitoare la meniul ales, tematica petrecerii, data, ora si alte cerinte ale dvs)</i>';
			$(this).attr('href', 'mailto:contact@sunny-day.ro?subject=Cotatie%20pentru%20o%20petrecere&body='+msgCotatie);
		}
	);
	
	
	$("#hide_despre_parinti").click(function(){
		   $("#despre_parinti").hide('slide',
			  1000, function(){
				  //animation complete
				  $("#despre_copii").show('slide', 1000);
				  });
	});
	
	$("#hide_despre_copii").click(function(){
		   $("#despre_copii").hide('slide',
			  1000, function(){
				  //animation complete
				  $("#despre_parinti").show('slide', 1000);
				  });
	});

	
	//PNG transparency fix
	$(document).pngie({
		//blankgif:'http://upload.wikimedia.org/wikipedia/commons/c/ce/Transparent.gif',
		blankgif:'/extras/images/Transparent.gif',
		sizingMethod:'crop'
 	});
	
	$('#paneau1 img').rotate(
			{maxAngle:5,
			minAngle:-5,
			bind: [
				   {"mouseover": 
				   function(){ 
				   		$(this).rotateAnimation(
											{angle: -5}
				   				);	//rotateAnimation
				   	}	//function
				   },
				   {"mouseout": function(){$(this).rotateAnimation(0);}}//mouseover
				  ]
			}
	);
	$('#paneau2 img').rotate(
			{maxAngle:5,
			minAngle:-5,
			bind: [
				   {"mouseover": 
				   function(){ 
				   		$(this).rotateAnimation(
											{angle: 4}
				   				);	//rotateAnimation
				   	}	//function
				   },
				   {"mouseout": function(){$(this).rotateAnimation(0);}}//mouseover
				  ]
			}
	);
	
	$('#paneau3 img').rotate(
			{maxAngle:5,
			minAngle:-5,
			bind: [
				   {"mouseover": 
				   function(){ 
				   		$(this).rotateAnimation(
											{angle: 4}
				   				);	//rotateAnimation
				   	}	//function
				   },
				   {"mouseout": function(){$(this).rotateAnimation(0);}}//mouseover
				  ]
			}
	);
	
	$('#paneau4 img').rotate(
			{maxAngle:5,
			minAngle:-5,
			bind: [
				   {"mouseover": 
				   function(){ 
				   		$(this).rotateAnimation(
											{angle: -4}
				   				);	//rotateAnimation
				   	}	//function
				   },
				   {"mouseout": function(){$(this).rotateAnimation(0);}}//mouseover
				  ]
			}
	);
	
	$('#paneau5 img').rotate(
			{maxAngle:5,
			minAngle:-5,
			bind: [
				   {"mouseover": 
				   function(){ 
				   		$(this).rotateAnimation(
											{angle: 5}
				   				);	//rotateAnimation
						//$("#"+ $(this).attr('id') + "").mouseover();
						$("#home_copii_despre").mouseover();
				   	}	//function
				   },
				   {"mouseout": function(){$(this).rotateAnimation(0); $("#home_copii_despre").mouseout();}}//mouseover
				  ]
			}
	);
	
	$("[id^='paneau']:not(:animated)").mouseover(function(){
		//$('#'+ $(this).attr('id') + ' img').rotateAnimation({angle: 5});	//rotateAnimation
	});
	

	$("#home_copii_despre").mouseover(function(){ $("#paneau1").mouseover(); });
	$("#home_copii_despre").mouseout(function(){ $("#paneau1").mouseout(); });
	$("#home_copii_activitati").mouseover(function(){ $("#paneau2").mouseover(); /*var old = $("#home_copii_activitati a").html();  var nou = $("#home_copii_activitatix").html(); $("#home_copii_activitati a").html(nou); $("#home_copii_activitatix").html(old); */});
	$("#home_copii_activitati").mouseout(function(){ $("#paneau2").mouseout(); });
	$("#home_copii_petreceri").mouseover(function(){ $("#paneau3").mouseover(); });
	$("#home_copii_petreceri").mouseout(function(){ $("#paneau3").mouseout(); });
	$("#home_copii_program").mouseover(function(){ $("#paneau4").mouseover(); });
	$("#home_copii_program").mouseout(function(){ $("#paneau4").mouseout(); });
	$("#home_copii_contact4").mouseover(function(){ 
		$("#paneau5").mouseover();
		if (screen.height>=800){ var t1 = 144; var t2=190; var t3=194; var l2=720; var l3 = 886; }
		else { var t1 = 124; var t2=170; var t3=174; var l2=720; var l3 = 886;  }
		$("#home_copii_contact1:not(:animated)").animate({'top':t1}, 500);
		$("#home_copii_contact2:not(:animated)").animate({'top':t2, 'left':l2}, 500);
		$("#home_copii_contact3:not(:animated)").animate({'top':t3, 'left':l3}, 500);
	});
	$("#home_copii_contact4").mouseout(function(){ 
		$("#paneau5").mouseout(); 
		if (screen.height>=800){ var t1 = 164; var t2=203; var t3=200; var l2=735; var l3 = 866; }
		else { var t1 = 144; var t2=190; var t3=194; var l2=735; var l3 = 866;  }
		$("#home_copii_contact1").animate({'top':t1}, 500);
		$("#home_copii_contact2").animate({'top':t2, 'left':l2}, 500);
		$("#home_copii_contact3").animate({'top':t3, 'left':l3}, 500);
	});
	
	
	//meniurile in paginile de content
	$("[id^='mb'] a").mouseover(function(){var ide = $(this).parent().attr('id'); ide = ide.replace('mb', ''); $("#mt"+ide+' a').addClass('mts'); /*$("#mb"+ide+' a').css('background-image', 'url(/extras/images/m'+ide+'.gif)');*/ });
	$("[id^='mb'] a").mouseout(function(){
		var ide = $(this).parent().attr('id'); 
		ide = ide.replace('mb', ''); 
		if($("#mt"+ide+' a').hasClass('mtss')){
			//$("#mb"+ide+' a').css('background-image', 'url(/extras/images/m'+ide+'.jpg)');
		} else {
			$("#mt"+ide+' a').removeClass('mts'); 
			//$("#mb"+ide+' a').css('background-image', 'url(/extras/images/m'+ide+'.jpg)');
		}
	});
	
	$("#home_copii_program_a").frameAnimation({imageHeight:408, startFrame:1});
	$("#home_copii_despre_a").frameAnimation({imageHeight:652, startFrame:1/*, repeat:3*/});
	$("#home_copii_petreceri_a").frameAnimation({imageHeight:402, startFrame:1});
	$("#home_copii_activitati_a").frameAnimation({imageHeight:414, startFrame:1/*, repeat:3*/});
	/*$("#home_copii_despre_a").mouseover(function(){
		$("#home_copii_despre2_a:not(:animated)").animate({top:145}, 500);
	});
	$("#home_copii_despre_a").mouseout(function(){
		$("#home_copii_despre2").animate({'top':155/*}, 500);
	});*/
	$("#home_copii_despre2_a").mouseover(function(){
		$("#home_copii_despre2_a img").not(':animated').animate({height:155, width:80, marginTop:14}, 500);
	});
	$("#home_copii_despre2_a").mouseout(function(){
		$("#home_copii_despre2_a img").animate({height:111, width:80, marginTop:54}, 500);
	});
	$("#home_copii_despre_a").mouseover(function(){ $("#home_copii_despre2_a").mouseover(); });
	$("#home_copii_despre_a").mouseout(function(){ $("#home_copii_despre2_a").mouseout(); });
	
	/*$(".yoxview").yoxview({
		backgroundColor: 'Blue',
		playDelay: 5000
	});*/
	
	//$("").
	/*var galleries = $('#gale_int').adGallery();
	
	
	galleries[0].settings.effect = 'fade';*/
	
	//galerie 
	$("#arhive_gal ul li a").click(function(){ location.href = $(this).attr('href'); });
	
	$(".ceebox").ceebox({overlayColor:"#d5ff03", overlayOpacity:0.8, textColor:"", borderColor:"#da1094", padding: 15, borderWidth:"3px", margin: 150});
	$("#openHarta").ceebox({overlayColor:"#d5ff03", overlayOpacity:0.8, textColor:"", borderColor:"#da1094", padding: 15, borderWidth:"3px", margin: 150, htmlWidth: 890, htmlHeight:500});

	//dau drumul la player
	setTimeout('startSound()', 1000);
	 
	var onMouseOutOpacity = 0.67;
	$('#thumbs ul.thumbs li').opacityrollover({
		mouseOutOpacity: onMouseOutOpacity,
		mouseOverOpacity: 1.0,
		fadeSpeed: 'fast',
		exemptionSelector: '.selected'
	}); 
	
	//setTimeout($('#paneau1 img').mouseover(), 3000);
	
	setTimeout('miscaDespreNoi()', 3000);
	
	//pornesc animatia cu textul de pe prima pagina
	anim_fpTxt(1);
	
	//Meniul saptamanii
	$("#meniulSaptamaniiButon").click(function(){
		$("#meniulSaptamaniiButon").effect('transfer',{ to: "#badi", className: "ui-effects-transfer" }, 500);
		$("#meniulSaptamanii:not(:animated):not(:visible)").slideDown(500, function(){ $("#meniulSaptamanii").load('/home/meniul_saptamanii');});
	});
	
	$("*[id!='meniulSaptamanii']").click(function () { $("#meniulSaptamanii:visible:not(:animated)").slideUp(500);});
	
});



$('#paneau1 img').mouseover();

function startSound(){
	$("#unmuteVidio").click();
}

function loadMap(){
	//alert('x');
	$("#map3").animate({
		top:25,
		left:30,
		height:500, 
		width:900
	}, 500);
}
function unloadMap(){
	$("#map3").animate({
		top:25,
		left:30,
		height:1, 
		width:1
	}, 500);
}


function lungeste_sfoara(nr_sfoara){
	var y = $("#sfoara"+nr_sfoara).css('height');
	var x = $("#sfoara"+nr_sfoara).css('width');
	y = parseInt(y.replace('px', ''));
	$("#sfoara"+nr_sfoara).animate({height: (y+20-10)+'px', width: x}, 200);
	//$("#sfoara"+nr_sfoara).css({height: y+'px', width:x});
}

function scurteaza_sfoara(nr_sfoara){
	var y = $("#sfoara"+nr_sfoara).css('height');
	var x = $("#sfoara"+nr_sfoara).css('width');
	y = parseInt(y.replace('px', ''));
	$("#sfoara"+nr_sfoara).animate({height: (y-20+10)+'px', width: x}, 200);
	//$("#sfoara"+nr_sfoara).css({height: y+'px', width:x});
}

function lungeste_sfoara2(nr_sfoara){
	balans[nr_sfoara] = 1;
	var y = $("#sfoara"+nr_sfoara).css('height');
	var x = $("#sfoara"+nr_sfoara).css('width');
	y = parseInt(y.replace('px', ''));
	var y1 = y;
	y = y+20-10;
	var a=0;
	for(a=0; a<11; a=a+1){
		//$("#sfoara"+nr_sfoara).css({height: parseInt(y1+a)+'px', width:x});
		if(a%2){
			y = y+4-1;
		}
		else {
			y = y-4+1;
		}
		//setTimeout('balang('+nr_sfoara+','+y+')', 100);
	}
	balans[nr_sfoara] = 0;
	//$("#sfoara"+nr_sfoara).css({height: y+'px', width:x});
}

function balang(nr_sfoara, y2){
	var y = $("#sfoara"+nr_sfoara).css('height');
	var x = $("#sfoara"+nr_sfoara).css('width');
	y = parseInt(y.replace('px', ''));
	$("#sfoara"+nr_sfoara).css({height: y2+'px', width:x});
}

function scurteaza_sfoara2(nr_sfoara){
	var y = $("#sfoara"+nr_sfoara).css('height');
	var x = $("#sfoara"+nr_sfoara).css('width');
	y = parseInt(y.replace('px', ''));
	y = y+10-20;
	$("#sfoara"+nr_sfoara).css({height: y+'px', width:x});
}

function animeaza(id){
	id = parseInt(id);
	if(isNaN(id)){id=1;}
	var nid = id-2+1;
	if(nid<1){nid = 3;}
	$("#hom"+id).css({zIndex:'10'});
	$("#hom"+nid).css({zIndex:'5'});
	
	setTimeout('spoza('+id+')', 400);
	$("#hom"+id).show('slide','',1000, function(){
				   $("#hom"+nid).hide('blind', '', 10);
	});
	id++;
	if(id>3){id = 1;}
	setTimeout("animeaza("+id+")", 10000);
}

function spoza(id){
	$("#hom1_poze").html($("#hom"+id+"_poze_c").html());
}

function miscaDespreNoi(){
	var marTopP = $("#hide_despre_parinti").css('marginTop');
	var marTopC = $("#hide_despre_copii").css('marginTop');
	
	$("#hide_despre_parinti:not(:animated)").animate({marginTop:-3}, 100, function(){
					$(this).animate({marginTop:parseInt(marTopP)}, 100, function(){
							$(this).animate({marginTop:-3}, 100, function(){
									$(this).animate({marginTop:parseInt(marTopP)}, 100);
									});
							});
					});
	$("#hide_despre_copii:not(:animated)").animate({marginTop:-3}, 100, function(){
					$(this).animate({marginTop:parseInt(marTopC)}, 100, function(){
							$(this).animate({marginTop:-3}, 100, function(){
									$(this).animate({marginTop:parseInt(marTopC)}, 100);
									});
							});
					});
	var timpu = rand(11);
	if(timpu < 5) { timpu = 10 - timpu; }
	timpu = timpu * 1000;
	setTimeout('miscaDespreNoi()', timpu);
}

function rand ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}

function anim_fpTxt(nr){
	if(nr<=0){ nr= 1; }
	if(nr>5){ nr=1; }
	var vixi = $("[id^='tfp']:visible");
	$("[id^='tfp']:animated").stop();
	if(vixi.length > 0) { 
		//$("[id^='tfp']:visible").hide('explode', 400, function(){ $("#tfp"+nr).show('puff', 400);});
		//$("[id^='tfp']:visible").fadeOut(600, function(){ $("#tfp"+nr).fadeIn(600);});
		$("[id^='tfp']:visible").hide('blind', 900, function(){ $("#tfp"+nr).show('blind', 900);});
	}
	else {
		$("#tfp"+nr).show('blind', 600);
	}
	var nxr = parseInt(nr) + 2 - 1;
	if(nr==6) {var timpu = 8000; } else { var timpu = 5000; }
	setTimeout('anim_fpTxt('+nxr+')', timpu);
}
