function setUpTabs(){
	if('#media-tabs'){
		$('#media-tabs a').click(function(){
			var activetab = $(this).attr('href');
			$(this).parent().siblings().children('a').removeClass('active');
			$(this).addClass('active');
			$('#media .content-container').hide();
			$('#'+activetab).show();
			return false;
		});
	}
	$('#content-tabs a').click(function(){
		var activetab = $(this).attr('href');
		$(this).parent().siblings().children('a').removeClass('active');
		$(this).addClass('active');
		$('#details-content .content-container').hide();
		$('#'+activetab).show();
		if(activetab == "directions"){
			loadmap(); // calls the map load function
		}
		return false;
	});
}

$(document).ready(function(){
//Add the google stuff to the url
  /* $("a[href*='secure.guestdesk.com']").click(function() {
        pageTracker._link(this.href);
        return false;
    });*/
   
   //Do the ranking system here
   $(".Ratingwrapper").each(function(i) { 
            var explanationDiv = $(this).find(".explanation");
            var explanationText = $(this).find(".explanationText");
            var hdnField = $(this).find(".explanation >input:hidden");
            var ratingLabel = $(this).find(".ratingLabel");
            var ratingCap = $(this).find(".rating");

            //Hide the radio button labels since we don't need because javascript is enabled
            ratingLabel.hide();

            //Show the rating label we do need.
            ratingCap.show();

            //Hide the explanation section since javascipt is enabled
            explanationDiv.hide();

            //Turn the radio buttons into our stars
            $(this).find(".question").stars({
            	captionEl: $(this).find(".caption")
            });

            $(this).find(".question").click(function() {
                var instance = $(this).data("stars");
                $(this).find(".caption");
                hdnField.val(instance.options.value);

                if (instance.options.value == 1 || instance.options.value == 2 || instance.options.value == 3 || instance.options.value == 4) {
                    explanationDiv.show();
                    if (explanationText.val() == "NA") {
                        explanationText.val('').focus();
                    }
                    else {
                        explanationText.focus();
                    }
                }
                else {
                    explanationDiv.hide();
                    explanationText.val("NA");
                }
            });
            
        });
   
   /*Omniture stuff
   if ($('.mediaTabClicks').length > 0){
		$('.mediaTabClicks').click(function() {
			s=s_gi(s_account);
			s.linkTrackVars = 'prop26';
			s.prop26 = $('h1').html() + ':' + $(this).html().toLowerCase();
			s.tl(this, 'o', 'media tab clicks');
		});
	}
	 if ($('.tabclicks').length > 0){
		$('.tabclicks').click(function() {
			s=s_gi(s_account);
			s.linkTrackVars = 'prop27';
			s.prop27 = $('h1').html() + ':' + $(this).html().toLowerCase();
			s.tl(this, 'o', 'hotel details tab clicks');
		});
	}
	if ($('.featuredPackage').length > 0){
		$('.featuredPackage').click(function() {
			s=s_gi(s_account);
			s.linkTrackVars = 'prop28,eVar5';
			s.prop28 = $('h1').html() + ':' + $(this).attr('rel').toLowerCase();
			s.eVar5 = s.prop28
			s.tl(this, 'o', 'hotel details featured package');
		});
	}*/
 });
