$(document).ready(pageLoaderInit);function pageLoaderInit(){$('#menu li:not(:has(> ul)) a, #content a[rel!="slideshow"]').click(function(event){if(this.href.indexOf(home)>=0&&this.href.indexOf('/wp-')<0){event.preventDefault();this.blur();var caption=this.title||this.name||"";var group=this.rel||false;loadPage(this.href)}})}function getHTTPObject(){var xmlhttp;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{if(window.ActiveXObject){xmlhttp=new ActiveXObject('MSXML2.XMLHTTP.3.0')}}return xmlhttp}var isWorking=false;var http=getHTTPObject();function loadPage(url){if(!isWorking){scroll(0,0);$('#contentholder').fadeOut();$("#loader").show();http.open('GET',url,true);isWorking=true;http.onreadystatechange=showPage;http.send(null)}}function submitSearch(param){if(!isWorking){scroll(0,0);$('#contentholder').hide();$("#loader").show();http.open('GET',window.location+param,true);isWorking=true;http.onreadystatechange=showPage;http.send(null)}}function showPage(){if(http.readyState==4){if(http.status==200){isWorking=false;var content=http.responseText;content=content.split('id="contentholder"')[1];content=content.substring(content.indexOf('>')+1);var depth=1;var output='';while(depth>0){temp=content.split('</div>')[0];i=0;pos=temp.indexOf("<div");while(pos!=-1){i++;pos=temp.indexOf("<div",pos+1)}depth=depth+i-1;output=output+content.split('</div>')[0]+'</div>';content=content.substring(content.indexOf('</div>')+6)}document.getElementById('contentholder').innerHTML=output;$('#contentholder').fadeIn();$("#loader").hide();
    $("ul#slideshow").carouFredSel({scroll : { duration : 1000 } });
	$('a[href$=jpg], a[href$=png], a[href$=gif]').fancybox({
			'transitionIn'	:	'elastic',
			'transitionOut'	:	'elastic',
			'titleShow' : false,
			'speedIn'		:	300, 
			'speedOut'		:	300, 
			'overlayOpacity'	:	0,
			'hideOnOverlayClick' : true
		});
		pageLoaderInit()}else{alert(http.status)}}}
