$(function(){
	var LoadMsg = 'Please Wait ...';
	var AjaxPath = '';
	$('#menu > li > ul > li > a').click(function(){
													
			var _Href = $(this).attr('href');
				$.ajax({
					type:	'GET',
					url:	AjaxPath+_Href,
					dataType:	'html',
					timeout:	5000,
					success: function(d,s){
							c=$(d).find("#slider").html();
							//alert(c);
							$("#prevBtn").remove();
							$("#nextBtn").remove();
							$("#slider").html(c);
							$("#slider").easySlider({
										auto: false, 
										prevText:'',
										nextText:'',
										continuous: true
							});
							parent.location =_Href;
							},
					error: function(o,s,e){
								$('#loading').html('Ajax Request Failed: '+s);
								eTimer(_Href);
							}
				});
		return false;
	});
	
	$('#menu2 > li > ul > li > a').click(function(){
													
			var _Href = $(this).attr('href');
				$.ajax({
					type:	'GET',
					url:	AjaxPath+_Href,
					dataType:	'html',
					timeout:	5000,
					success: function(d,s){
							c=$(d).find("#slider").html();
							//alert(c);
							$("#prevBtn").remove();
							$("#nextBtn").remove();
							$("#slider").html(c);
							$("#slider").easySlider({
										auto: false, 
										prevText:'',
										nextText:'',
										continuous: true
							});
							parent.location =_Href;
							},
					error: function(o,s,e){
								$('#loading').html('Ajax Request Failed: '+s);
								eTimer(_Href);
							}
				});
		return false;
	});

	
	
	function eTimer(url) {
		var t=setTimeout("window.location='"+url+"'",1000);
		$('#loading').fadeOut('slow');
	}
});