$(document).ready(function(){
						   
			/* Active Windows */
			var current_url = window.location.pathname;
			$("#header_links a").filter(function() {
								var file_name = current_url.match(/\w+\.php/);
								return $(this).attr("href") == file_name;
												 }).css("color", "#F90");
			
			$("#sub_menu a").each( function() {
						 var top_menu = $(this).parent().attr("class");
						 var menu = $("#header_links a").filter(function ()  {
															return 	$(this).attr("href") == top_menu + ".php"
																		  })
																.css("color", "#F90");
						if( (this.href) == ("http://" + window.location.hostname + window.location.pathname)) {
							$(this).css("color", "#00F");
				}
			});
			
			/*Smooth Slide motion */
			$("#popup > div > div").hide();
			$("#popup > div area").mouseover(function() {
						var div_name = "#" + $(this).attr("alt");
						show_princi_window(div_name);
						})
						.mouseout(function() {
						var div_name = "#" + $(this).attr("alt");
						hide_princi_window(div_name);
										   });	

			function show_princi_window(name) {
				var string = $(name).attr("class").replace(/^\w+ /g,'');
				if(string == "show_right") {
					$(name).animate( {opacity: "show", right: "+10"}, "slow");
				}
				else if(string == "show_left") {
					$(name).animate( {opacity: "show", left: "+20"}, "slow");
				}
			}
			function hide_princi_window(name) {
				var string = $(name).attr("class").replace(/^\w+ /g,'');
				if(string == "show_right") {
						$(name).animate( {opacity: "hide", right: "-10"}, "fast");
				}
				else if(string == "show_left") {
					$(name).animate( {opacity: "hide", left: "-20"}, "fast");
				}
			}
				
});						
							