			var user = 'radioflo';var port = '7710';
			
			$(window).bind("resize", function() {
			});

			$(document).ready(function() {
				$("#main_nav *").removeClass("on");
				$("#main_nav *").addClass("off");
				$("#butt_home").addClass("on");

				var allGrp = $.manageAjax.create('cacheQueue', {
					queue: true,
					cacheResponse: true
				});
				allGrp.add({
					success: function(html) {
						$(".ajax_box").append(html);
					},
					error: function(html) {
						alert("no such content");
					},
					url: 'groups/all_grp.php'
				});
			
				$("#banner").live("click", function() {
					$("#howto").fadeIn(300);
					return false;
				});
				$("#close_overlay").live("click", function() {
					$("#howto").fadeOut(300);
					return false;
				});

				function toggleBox() {
					$($.active + " .dynamic").animate({
						height: $.height,
					}, 450, 'easeInOutQuad');
				}
				function toggleBox2() {
					$($.active + " #chat_posts").animate({
						height: $.height2,
					}, 450, 'easeInOutQuad');
				}

				function feedMore() {
					$.height = $("#odelay_feed p").height();
					$.active = "#odelay_feed";
					$("#odelay_feed .more").hide();
					$("#odelay_feed .less").show();
					toggleBox();
				}
				$("#odelay_feed .more").live("click", function() {
					feedMore();
				});
	
				function feedLess() {
					$.height = "0";
					$.active = "#odelay_feed";
					$("#odelay_feed .more").show();
					$("#odelay_feed .less").hide();
					toggleBox();
				}
				$("#odelay_feed .less").live("click", function() {
					feedLess();
				});
				
				function newsMore() {
					$.height = $("#news p").height();
					$.active = "#news";
					$("#news .more").hide();
					$("#news .less").show();
					toggleBox();
				}
				$("#news .more").live("click", function() {
					newsMore();
				});
		
				function newsLess() {
					$.height = "0";
					$.active = "#news";
					$("#news .more").show();
					$("#news .less").hide();
					toggleBox();
				}
				$("#news .less").live("click", function() {
					newsLess();
				});
				
				function chatMore() {
					$.height = "750px";
					$.height2 = "710px";
					$.active = "#chat";
					$("#chat .more").hide();
					$("#chat .less").show();
					toggleBox();
					toggleBox2();
				}
				$("#chat .more").live("click", function() {
					chatMore();
				});
				
				function chatLess() {
					$.height = "230px";
					$.height2 = "190px";
					$.active = "#chat";
					$("#chat .more").show();
					$("#chat .less").hide();
					toggleBox();
					toggleBox2();
				}
				$("#chat .less").live("click", function() {
					chatLess();
				});	

				function cosaMore() {
					$.height = $("#cosa p").height();
					$.active = "#cosa";
					$("#cosa .more").hide();
					$("#cosa .less").show();
					toggleBox();
				}
				$("#cosa .more").live("click", function() {
					cosaMore();
				});
				
				function cosaLess() {
					$.height = "0";
					$.active = "#cosa";
					$("#cosa .more").show();
					$("#cosa .less").hide();
					toggleBox();
				}
				$("#cosa .less").live("click", function() {
					cosaLess();
				});	
				
				feedLess();
				chatLess();
				newsLess();
				
				function getPage() {
					$(".group").hide();
					if ($.activePage == "home") {
						$("#home_grp").show();
					}
					if ($.activePage == "laradio") {
						$("#laradio_grp").show();
					}
					if ($.activePage == "pali") {
						$("#pali_grp").show();
					}
					if ($.activePage == "media") {
						$("#media_grp").show();
					}
					if ($.activePage == "contatti") {
						$("#contatti_grp").show();
					}
				}
				function load_page() {
					$("#main_nav *").removeClass("on");
					$("#main_nav *").addClass("off");
					$($.activeButt).addClass("on");
					getPage($.activePage);
				} 
				$("#butt_home").live("click", function() {
					$.activeButt = this;
					$.activePage = "home";
					load_page();
					return false;
				});
				$("#butt_laradio").live("click", function() {
					$.activeButt = this;
					$.activePage = "laradio";
					cosaLess();
					load_page();
					return false;
				});
				$("#butt_pali").live("click", function() {
					$.activeButt = this;
					$.activePage = "pali";
					load_page();
					return false;
				});
				$("#butt_media").live("click", function() {
					$.activeButt = this;
					$.activePage = "media";
					load_page();
					return false;
				});
				$("#butt_contatti").live("click", function() {
					$.activeButt = this;
					$.activePage = "contatti";
					load_page();
					return false;
				});

			});

			$(window).bind("load",function() {
				$('#container').show();
				$("body").css("background","url(images_spring/stars.jpg) top left repeat-x #87e2ff")
			});

