﻿Cufon.replace('#nav > ul > li > a, #content h1 div, #content h2, .widgetCTA .widgetCTAHeaders, #footerNavLinks a, #address span', { hover: true, fontFamily: 'Gill Sans MT'  });

$(document).ready(function(){

     var findSubNavLI = $("#subNav ul  > li ");
     if (findSubNavLI.length<1) {$("#subNav").css({'display' : 'none'}) };
     
     //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.href.match(/^http\:\/\/www.bestwesternrockville.com/) && (obj.hostname != location.hostname);};
     
     //add the class "external", and add popup.
     //conflicts with new IBE
    // $("a:external, a[href*=.pdf], a[href*=.doc], a[href*=.docx]").addClass("external").click(function(){window.open(this.href); return false;;})
     //add another class for specific file types
    // $("a[href*=.pdf]").addClass("pdf");
    // $("a[href*=.doc], a[href*=.docx]").addClass("doc");
     
     $("div.collapsible:not(:first)").hide();
     $("ul#divLinks li:nth-child(1)").addClass("active");
     $("ul#divLinks li:nth-child(1)").click(
          function(){ $(".collapsible").hide(); $(".collapsible:nth-child(1)").show(); $("ul#divLinks li").removeClass("active"); $(this).addClass("active"); },
          function(){ $(".collapsible").hide(); } );
     $("ul#divLinks li:nth-child(2)").click(
          function(){ $(".collapsible").hide(); $(".collapsible:nth-child(2)").show(); $("ul#divLinks li").removeClass("active"); $(this).addClass("active"); },
          function(){ $(".collapsible").hide(); } );
     $("ul#divLinks li:nth-child(3)").click(
          function(){ $(".collapsible").hide(); $(".collapsible:nth-child(3)").show(); $("ul#divLinks li").removeClass("active"); $(this).addClass("active"); },
          function(){ $(".collapsible").hide(); } );
     $("ul#divLinks li:nth-child(4)").click(
          function(){ $(".collapsible").hide(); $(".collapsible:nth-child(4)").show(); $("ul#divLinks li").removeClass("active"); $(this).addClass("active"); },
          function(){ $(".collapsible").hide(); } );
     $("ul#divLinks li:nth-child(5)").click(
          function(){ $(".collapsible").hide(); $(".collapsible:nth-child(5)").show(); $("ul#divLinks li").removeClass("active"); $(this).addClass("active"); },
          function(){ $(".collapsible").hide(); } );

});
