﻿Cufon.replace('.widgetCTALink .widgetCTAHeaders', { hover: true, fontFamily: 'Avant Garde' }); 
Cufon.replace('.twoColumn1 h1', { hover: true, fontFamily: 'Avant Garde' }); 
Cufon.replace('.twoColumn1 h2', { hover: true, fontFamily: 'Avant Garde' }); 

//mobile sniffer
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/android/i)) || (navigator.userAgent.match(/palm/i)) || (navigator.userAgent.match(/palmos/i))) {
   location.replace("https://mobile.ihotelier.com/mbe/mobile/74387");
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
     window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
     var elem = document.createElement('a');
     elem.setAttribute('href',url);
     elem.setAttribute('title',title);
     elem.setAttribute('rel','sidebar');
     elem.click();
} 
else if(document.all)// ie
     window.external.AddFavorite(url, title);
}


$(document).ready(function(){

     // even nav spacing
     var ulWidth = $("ul#mainNavLinks").width();  
     var numLis = $("ul#mainNavLinks > li");
     var sumOfLis = 0;
     var liPadding = 9;
     
     $("ul#mainNavLinks > li").each(function () {
             var object = $(this);
             sumOfLis += object.width();
     });
     
     var remainingWidth = (ulWidth -  sumOfLis);
     var marRight = (remainingWidth / (numLis.length - 1));
     
     $("ul#mainNavLinks > li").css({'margin-right' : (marRight - liPadding) });
     $("ul#mainNavLinks > li:last").css({'margin-right' : '0px'});
     
    
    
     //evenly distribute li's
     $(".twoColumn1 ul").each(function(){
          var liCount = $(this).children().size();
          if (liCount >= 6) {
               var firstList = this;
               $(firstList).wrap("<div class='colContainer'><div class='twoCols'></div></div>");
               var colContainer = $(firstList).parent().parent();
               $(colContainer).append("<div class='twoCols next'><ul></ul></div>");
               var secondList = $(".twoCols:last ul", colContainer);
               var secondListLIs = $(firstList).children().slice(Math.ceil(liCount/2));
               $(secondList).append(secondListLIs);
               $("div.colContainer").next().addClass("clear");   
          };//close if nonsense
     
     }); //closing the each-thingy
    
    //move subNav into rightCol
    $('.twoColumn2').prepend($('#subNav'));
    
    // organize footer address into divs
    $('#footerShell #address').append('<div id="holderTel"></div>');
  //  $('#holderAddress').append($('.org, .adr'));
    $('#holderTel').append($('.tel'));
    
    //kill the empty subnavs
     var findSubNavLI = $("#subNav ul  > li ");
     if (findSubNavLI.length<1) {$("#subNav").css({'display' : 'none'}) };
     
     //add some margin to content images...except the first one
     $(".twoColumn2 .imageWidget:not(:first)").css({"margin-top" : "30px"});
    
    
    
     
 });//end doc.ready
 
 
 
 
 
 // bottom
