
function showHide(obj) {
   var div = obj;
   var myDivs = new Array();
   myDivs[0]="salads";
   myDivs[1]="antipasti";
   myDivs[2]="menuIntro";
   myDivs[3]="pastas";
   myDivs[4]="garlicPizza";
   myDivs[5]="panini";
   myDivs[6]="desserts";
   myDivs[7]="beverages";
   myDivs[8]="traditionalPizza";
   myDivs[9]="seafoodPizza";
   myDivs[10]="veggiePizza";
   myDivs[11]="specialPizza";
   myDivs[12]="toppings";
   myDivs[13]="construction";
   myDivs[14]="beer";
   myDivs[15]="redWine";
   myDivs[16]="whiteWine";
   myDivs[17]="dessertWine";
   for(i=0;i<myDivs.length;i++) { 
   try{
       new Effect.Fade(myDivs[i], {afterFinish: function (obj) { new Effect.Appear(div), { duration: .2 }} });
      } 
      catch(err) {
      }
  }
};

function IEHoverPseudo() {
	var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}
};

function getHTML(newStuff) {
     var url = newStuff;
     if(newStuff == 'directions.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){  new Effect.Parallel([
    		new Effect.Fade('loadingImage', { sync: true}), 
    		new Effect.Appear('directions', { sync: true} )
		
  	], { 
    	duration: 1
  	}); }
	  });
     }
 
     if(newStuff == 'menu.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){  new Effect.Parallel([
    		new Effect.Appear('menu', { sync: true}), 
    		new Effect.Appear('menu', { sync: true})
		
  	], { 
    	duration: 1,
	onSuccess: IEHoverPseudo()
  	}); }
	});
     }
     
     if(newStuff == 'coupons.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){ new Effect.Appear('coupons', { duration: 1 }) }
	  });
     }
	
     if(newStuff == 'operatingHours.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){ new Effect.Appear('operatingHours', { duration: 1 }) }
	  });
     }
     
     if(newStuff == 'construction.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){ new Effect.Appear('construction', { duration: 1 }) }
	  });
     }

if(newStuff == 'unityclub.html') {
       var myAjax = new Ajax.Updater(
       'container', 
       url, 
	  {
	    method: 'get', 
	    parameters: '',
            onComplete: function(){ new Effect.Appear('unityclub', { duration: 1 }) }
	  });
     }

};
function showTime() {
     new Effect.Appear('time', { duration: 4.0 });
};
function ShowEffect(element){
       new Effect.Appear(element, 
       {duration:4});
   };
function FadeEffect(element){
       new Effect.Fade(element, 
       { duration:2});
};
function getWindowHeight() {
     var windowHeight;
    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        windowHeight = window.innerHeight;
    } 
   else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        windowHeight = document.documentElement.clientHeight;
    } 
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        windowHeight = document.body.clientHeight;
    }
    verticalOffset = ((windowHeight - 590) / 2);
    if(verticalOffset > 0) {
      if(verticalOffset > 45) {
        document.getElementById('wrapper').style.marginTop = 45  + 'px';
      }
      else {
        document.getElementById('wrapper').style.marginTop = verticalOffset  + 'px';
      }
    }
    else {
      document.getElementById('wrapper').style.marginTop = "20px";
    }
};
this.FadeOutSpecialAppearNew = function(element) {
   var specialIds = new Array();
   specialIds[0]="TakeOut";
   specialIds[1]="AllAfternoon";
   specialIds[2]="WalkerRebate";
   specialIds[3]="HappyHour";
   specialIds[4]="MartinisMojitos";
   specialIds[5]="LunchSpecial";
   specialIds[6]="HalfPriceVino";
   specialIds[7]="AYCEMondays";
   for(i = 0; i < specialIds.length; i++) {
     try {
       new Effect.Fade(specialIds[i], {afterFinish: function (obj) { new Effect.Appear(element)} });
     }
     catch(err) {
     }	
   }	
};
	  
          
	

