
var locationHashTmp;var storedPages=new Array();var links=new Array();var pageTitle=new Array();pageTitle['hosting']='Hosting';pageTitle['who']='Who We Are';pageTitle['what']='What We Do';pageTitle['projects']='Our Portfolio';pageTitle['contact']='Contact Us';pageTitle['blog']='Blog!';function locationHashChanged(){if(locationHashTmp==location.hash){return false;}
else{locationHashTmp=location.hash;return true;}}
function hashChangeListener(func,time){if(locationHashChanged()==true){eval(func);}
setTimeout(function(){hashChangeListener(func,time);},time);}
function getHashElement(el){if(location.hash.indexOf('/')==-1){return false;}
else{return location.hash.substring(2);}}
hashChangeListener("ajaxLoad(getHashElement('/'))",250);function ajaxLoad(page){if(page==''){page='home';document.title='Slashing Edge Designs';}else{document.title='Slashing Edge Designs :: '+pageTitle[page];}
if(!storedPages[page]){$("#loading").fadeIn();$("#contentFrame").load('cms.php?page='+page,null,function(){window.scrollTo(0,0);ajaxify();storedPages[page]=$(this).html();$("#loading").fadeOut();$("#contentFrame").fadeTo("normal",1);});}else{$("#contentFrame").empty();$("#contentFrame").append(storedPages[page]);}}
function ajaxify(){links=document.getElementsByTagName('a');for(var i in links){if(links[i]&&links[i].href&&links[i].href.indexOf(location.hostname)!=-1&&links[i].href.indexOf('#')==-1&&links[i].href.indexOf('.php')==-1&&links[i].href.indexOf('hosting')==-1){var newLink=links[i].href;links[i].href='#/'+newLink.substr(location.href.length-location.hash.length);}}}
if(navigator.appName!="Microsoft Internet Explorer"){$(document).ready(function(){if(location.hash!=''){ajaxLoad(getHashElement('/'));}
else{storedPages['home']=$("#contentFrame").html();$("#contentFrame").fadeTo("slow",1);}
$("#header > a").click(function(){$("#header > a").attr('className',null);this.className='active';});ajaxify();$("#loading").fadeOut();});}