/* -------------------------------------------------------------------

	Boondoggle - <css creator>
	<client>
	
	This JavaScript file collects all general functions used
	throughout the site, as well as some smaller specific
	functions.

------------------------------------------------------------------- */



// when the document is ready to be traversed and manipulated...
$(document).ready(function(){
	
	// LINK HANDLER
	// when you click on a link with class externalLink
	$('a.externalLink').click(function(){
		// open a new window with the link's location
		window.open($(this).attr("href"));
		// and do nothing after (to prevent the link from actually firing)
		return false;
	});
	
	// Other Starwood Brands popup
	$('a#otherStarwoodBrandsLink').click(function() {
	  $('#brandNavBrandList').slideDown('fast');
	});
	
	$('#brandNavBrandList').mouseleave(function() {
  	$(this).slideUp(); 
	});	
	
	// Destinations overlayer
	$('a#chooseYourDestination').click(function () {
  	$("div#destinations").fadeIn("fast");
  });
	
	$('span#closeDestinations').click(function () {
  	$("div#destinations").fadeOut("fast");
  });

  // Destinations overlayer popup
	$('.termsPopup').popupWindow({ 
		height:575, 
		width:780, 
		centerBrowser:1 
	}); 

  // Popup learn brands
	$('.learnBrandsPopup').popupWindow({ 
		height:780, 
		width:575, 
		centerBrowser:1 
	}); 
	
});


	

