jQuery.ajaxSetup({ 
  'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} 
})

$(document).ready(function(){
  $('#loading').ajaxStart(function(){
    $(this).show();
  }).ajaxStop(function(){
    $(this).hide();
  });
});

function loadContent(url){
	$(document).ready(function(){
		$('#rightSide').hide().load(url, function(){
			$(this).slideDown('slow');
		});
	});
}

function getSearchResults(){
	$(document).ready(function(){
		var str = $("form").serialize();
		var str2 = 'cnt/search_results.php?' + str;
		loadContent(str2);
	});
}

function showHideDom(showed, hidden, dom, state){
	$(document).ready(function(){
		$(showed).hide();
		$(hidden).show();
		if (state == 'show'){
			$(dom).slideDown('slow');
		}else{
			$(dom).slideUp('slow');
		}
	});
}