
function openSiteIntoDiv(thesite, name) {

  var path = window.location.pathname;
  //var fileName = path.substring(path.lastIndexOf('#') + 1).toLowerCase();
	var fileName = name + '.aspx';		   
	//alert(fileName);
	
		var toLoad = fileName+' #content';
		
		
		$('#content').hide('fast',loadContent);
		//$('#load').remove();
		//$('#wrapper').append('<span id="load"></span>');
		//$('#load').fadeIn('normal');

		//window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);

		window.location.hash = fileName.substr(0, fileName.length - 5);
		function loadContent() {
		    $('#content').load(toLoad, '', showNewContent())
		    var hash = window.location.hash.substr(1);
	      window.location.hash = thesite;

		}
		function showNewContent() {
		    $('#content').show('normal');
		}
		function hideLoader() {
		  $('#load').fadeOut('normal');
		}
		//return false;
		
	}

