﻿// html5shiv MIT @rem remysharp.com/html5-enabling-script
// iepp v1.5.1 MIT @jon_neal iecss.com/print-protector
/*@cc_on(function(p,e){var q=e.createElement("div");q.innerHTML="<z>i</z>";q.childNodes.length!==1&&function(){function r(a,b){if(g[a])g[a].styleSheet.cssText+=b;else{var c=s[l],d=e[j]("style");d.media=a;c.insertBefore(d,c[l]);g[a]=d;r(a,b)}}function t(a,b){for(var c=new RegExp("\\b("+m+")\\b(?!.*[;}])","gi"),d=function(k){return".iepp_"+k},h=-1;++h<a.length;){b=a[h].media||b;t(a[h].imports,b);r(b,a[h].cssText.replace(c,d))}}for(var s=e.documentElement,i=e.createDocumentFragment(),g={},m="abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/ /g, '|'),
n=m.split("|"),f=[],o=-1,l="firstChild",j="createElement";++o<n.length;){e[j](n[o]);i[j](n[o])}i=i.appendChild(e[j]("div"));p.attachEvent("onbeforeprint",function(){for(var a,b=e.getElementsByTagName("*"),c,d,h=new RegExp("^"+m+"$","i"),k=-1;++k<b.length;)if((a=b[k])&&(d=a.nodeName.match(h))){c=new RegExp("^\\s*<"+d+"(.*)\\/"+d+">\\s*$","i");i.innerHTML=a.outerHTML.replace(/\r|\n/g," ").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");c=i.childNodes[0];c.className+=" iepp_"+
d;c=f[f.length]=[a,c];a.parentNode.replaceChild(c[1],c[0])}t(e.styleSheets,"all")});p.attachEvent("onafterprint",function(){for(var a=-1,b;++a<f.length;)f[a][1].parentNode.replaceChild(f[a][0],f[a][1]);for(b in g)s[l].removeChild(g[b]);g={};f=[]})}()})(this,document);@*/

Cufon.replace('#mainNav > ul > li > a, article h2', { hover: true, fontFamily: 'Helvetica' }); 
Cufon.replace('.widgetCTA .widgetCTAHeaders', { hover: true, fontFamily: 'bernhard' }); 

$(document).ready(function(){

//fix Cufon hover issue
$("#mainNav > ul > li").hover(
     function(){  },
     function(){ Cufon.refresh("#nav > ul > li > a"); }
);


//hide subnav
     var findSubNavLI = $("#subNav ul  > li ");
     if (findSubNavLI.length<1) {$("#subNav").css({'display' : 'none'}) };



//change out calendar icon.
     $("#checkoutCalendarIcon, #checkinCalendarIcon").attr("src", "files/templates/230/cal.gif");
     



     
// CTA biz
     $("#side > div:first-child").attr("id", "CTA1");
     $("#side > div.widgetCTA:nth-child(2)").attr("id", "CTA2");
     $("#side > div.widgetCTA:last-child").attr("id", "CTA3");
     $("#side > div:last-child .widgetCTAimg").attr("id", "CTA3img");
//     $("#side > div:last-child .widgetCTAHeaders").attr("class", "last-h1");
     



$("#side .widgetCTA").hover(function(){
  $(this).animate({  
    left: "-=30px"
      }, 400 );
  },
  function(){
        $(this).animate({ 
    left: "0"
      }, 400); 
      
  }
);


$("a.accomm").hover(function(){
  $(this).css({  
    "color": "#d17d2c"
      }, 400 );
  },
  function(){
        $(this).css({ 
    "color": "#6cc6e7"
      }, 400); 
      
  }
);





// accommodations toggle

animatedcollapse.addDiv('2bed', 'fade=1,speed=200,group=amenities,hide=1')
animatedcollapse.addDiv('bi', 'fade=1,speed=200,group=amenities,hide=1')
animatedcollapse.addDiv('2bedpool', 'fade=1,speed=200,group=amenities,hide=1')
animatedcollapse.addDiv('1bed', 'fade=1,speed=200,group=amenities,hide=1')

animatedcollapse.addDiv('fallaway', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('endless', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('airfare', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('weekday', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('luxury', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('residents', 'fade=1,speed=200,group=packages,hide=1')
animatedcollapse.addDiv('womenfest', 'fade=1,speed=200,group=packages,hide=1')

animatedcollapse.init()

// logo list hovers

$(".associationsWidget ul li a img").hover(function(){
  $(this).animate({  
    opacity: "0.3"
      }, 400 );
  },
  function(){
        $(this).animate({ 
    opacity: "1"
      }, 400 ); 
      
  }
);



// cycle 
    $('#side2').cycle({
          fx: 'fade', 
          pager:  '#pagination'
     });

// cycle pagination

$('#pagination a').wrap('<li/>');
$('#pagination').wrapInner('<ul class="cycle"/>');


});//jQ
