//$(document).ready(function(){
//	//$("a#ajx").bind('click',function(event){
//	$("a#ajx").live('click',function(event){ 
//		event.preventDefault();
 //   	$.get(this.href,{},function(response){
//			$('.content').html(response)
//		})
//		
//	})
//});

function changeUrl() {
	var redirect;
	redirect = document.getElementById('newUrl').value;
	document.location.href = redirect;
}

function showSlidingDiv(){
	$("#subSmartCategories").hide();
	$("#subProducers").animate({"height": "toggle"}, { duration: 0 });
}

function showSlidingDiv2(){
	$("#subProducers").hide();
	$("#subSmartCategories").animate({"height": "toggle"}, { duration: 0 });
}

$(function () {
	$('#pageMsg');
	if($('#pageMsg').length){
		var alerttimer = window.setTimeout(function () {
			$('#pageMsg').trigger('click');
		}, 1500);
		
		
		$('#pageMsg')
		.click(function () {
			window.clearTimeout(alerttimer);
			$('#pageMsg').fadeOut(1000);
		});
	}
	//window.location.reload(1);
	//window.location.replace($(location).attr('href'));

});
$(document).ready(function() {
 	 $("#responsecontainer").load("response.php");
   var refreshId = setInterval(function() {
      $("#responsecontainer").load('response.php?randval='+ Math.random());
   }, 9000);
});


