$(
	function(){
		$("td.homeSection").find("li").hover(
			function(){
				$(this).addClass("hover");
			},function(){
				$(this).removeClass("hover");
			})	
			
		$("ul.lavaLampWithImage").lavaLamp({
               fx: "backout", 
               speed: 500,
               changeColor:false
        });
		
		$("ul.lavaLampNoImage").lavaLamp({
               fx: "backout", 
               speed: 500,
               changeColor:false
        });
		
		$("ul.lavaLampNoImage").find("a").css("color","#C4D7FB");
		
		

		
		$('h5').each(function(){
			this.innerHTML += "<img src='images/layout/quoteright.gif' class='quoteRight'/><div style='height:5px;font-size:30%'></div>";
		})
		
		$("div.quote").each(function(){
			this.innerHTML += "<img src='images/layout/quoterightwhite.png' class='quoteRight'/><div style='height:5px;font-size:30%'></div>";
		})
		
		$("#searchImg")
			.css("opacity",0.90)
			.click(function(){
				$("#searchForm").submit();
			})
			.hover(
			function(){
				$(this).css("opacity",1);	
			},function(){
				$(this).css("opacity",0.90	);
			})
		
		$("#searchForm").submit(function(){
			if ($(this).find("input.search").val()=="") return false;
			
		});
		
		$(".mp3").jmp3({
			backcolor: "1B1D1E",
			forecolor: "C4D7FB",
			width: 75,
			showdownload:"false",
			showfilename:"false"
		});
		
		$("div.siteButtons>div")
		.css("opacity","0.8")
		.hover(
			function(){
				$(this).css("opacity","1");
			},
			function(){
				$(this).css("opacity","0.8");
			})
			
		
		$("#favBtn").click(function(){
			if (window.sidebar) { 
				window.sidebar.addPanel(document.title, document.location,"");
			} else if( window.external ) { 
				window.external.AddFavorite(  document.location, document.title); 
			} else if(window.opera && window.print) {
				return true; 
			}
		})
		
		$("#printBtn").click(function(){
			window.print();
		})
		
		$("#backBtn").click(function(){
			history.go(-1);
		})
		
		$("#topBtn").click(function(){
			document.location.href="#";
		})
	}
)

function showBubble(roEl, rsText){
	bubbleTimeout = setTimeout(function(){
		$("#menuBubble").css("opacity",0.7);
		$("#menuBubbleMiddle").get(0).innerHTML = rsText;
		$("#menuBubble").show(300);		
	}, 750);
}

function hideBubble(){
	clearTimeout(bubbleTimeout);
	$("#menuBubble").hide(300);
}
