﻿Cufon.replace("header .marketingPhoneShell, #main h3", { fontFamily: "Gotham Condensed Medium" });


$(document).ready(function(){

     //clean up the DRSB
     $("#checkinField").val("Check In Date");
     $("#checkoutField").val("Check Out Date");
     $("#roomsField").prepend("<option value='rooms' disabled>Rooms</option>").find("option[value='rooms']").attr("selected","selected");
     $("#adultsField").prepend("<option value='adults' disabled>Adults</option>").find("option[value='adults']").attr("selected","selected");
     $("#checkinShell, #checkoutShell, #roomsShell, #adultsShell").find("br").remove();
     //$("#usabilityNav li:not(:last-child)").after("<li>|</li>");
     
     
     //two column-ize bullets
     $("article ul:not(.sitemapWidget):not(.noFloat)").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");
                if ( $(this).hasClass("noStyle") ) { $(this).parent().parent().find(".twoCols.next ul").addClass("noStyle"); } 
                 
        };//close if nonsense
      
     }); //closing the each-thingy
     
     
     
     
     //treat external URLS
     //make a cool 'external' selector. exceptions: mailto: and javscript jazz
     $.expr[':'].external = function(obj){return !obj.href.match(/^mailto\:/)
     && !obj.href.match(/^javascript/) && !obj.href.match(/^http\:\/\/www.vizergy.com/) && (obj.hostname != location.hostname);};
     
     //add the class "external", and add popup.
     $("article a:external, article a[href*=.pdf], article a[href*=.doc], article a[href*=.docx]").addClass("external");
     //add another class for specific file types
     $("article a[href*=.pdf]").addClass("pdf");
     $("article a[href*=.doc], article a[href*=.docx]").addClass("doc");
     
     
     
     
     
     //break the address up
     $(".adr").after("<br>");
     $(".tel:first").css({ "padding-left" : "0px", "background" : "none" });
     
     //hide the subnav in content when empty
     var findSubNavLI = $("#subNav ul  > li ");
     if (findSubNavLI.length<1) {$("#subNav").css({'display' : 'none'}) };
     
     //animate the hover effect
     $("nav>ul>li>ul>li").hover(
          
          function(){ $(this).animate({backgroundPosition:"(10px -20px)"}, {duration:200});  },
          function(){ $(this).animate({backgroundPosition:"(10px 8px)"}, {duration:200}); }
     
     );

});//jQ
