jQuery(document).ready(function () {
							
	show_page("index");	
	
});

function show_page(page_name)
{
	jQuery.post("index.php", {act: page_name},
		function(data) {
			
			if (page_name != "index")
				jQuery('div.footer').hide("slide", 400);
				
			jQuery('div.footer').html(data);
			jQuery('div.footer').show("slide", 400);
			
			jQuery("a[class='menu']").click(function () 
			{ 				
				var link = jQuery(this).attr("href").split("/").join("");
				show_page(link);
				
				return false;
			});	
			
			jQuery("a[class='sub_menu']").click(function () 
			{ 				
				var link = jQuery(this).attr("href").split("/").join("");
				show_sub_page(link);
				
				return false;
			});	
			
		}, "text"
	);		
}

function show_sub_page(page_name)
{
	jQuery.post("index.php", {act: page_name},
		function(data) {
			
			jQuery('#data').hide("blind", 400);	
			jQuery('#data').html(data);
			jQuery('#data').show("blind", 400);
			
			jQuery("a[class='menu']").click(function () 
			{ 				
				var link = jQuery(this).attr("href").split("/").join("");
				show_page(link);
				
				return false;
			});	
			
			jQuery("a[class='eq_price']").click(function () 
			{ 				
				var link = jQuery(this).attr("href").split("/").join("");
				show_page(link);
				
				setTimeout(function(){ show_sub_page("tariff_eq_tv") }, 500);
				
				return false;
			});	
						
		}, "text"
	);		
}
