(function(a){a.fn.globalHeader=function(d){var c={activeTab:null,moreLinks:[],morePromoCount:2,moreText:"You might also like:",moreAnd:"and",moreMore:"More",moreTextHeadline:"More Sites You Might Like",uiHat:"#GH_hat",uiHatLinks:"#GH_hat_links",uiHatTools:"#GH_hat_tools",uiNavLi:"li.GH_nav_LI",uiNavADd:".GH_nav_dd_A",auth:{doAuth:false,authenticated:false,authState:null,unauthState:null},search:{uiSearch:"#GH_search",params:{}},fn:{}},e={},h=this,g={},f={activeTab:null,moreLinksBuilt:false},b={init:function(i){g.$d=a(document);g.$c=a(i);g.hat=a(e.uiHat)[0];g.hatLinks=a(e.uiHatLinks)[0];g.$hatTools=a(e.uiHatTools);g.$search=a(e.search.uiSearch);g.$searchInput=g.$search.find("input:first");g.$searchSubmit=g.$search.find("input:last");g.$navLi=g.$c.find(e.uiNavLi);g.$navADd=g.$c.find(e.uiNavADd);b.setActiveTab(null,e.activeTab);if(e.auth.doAuth){b.buildAuth()}b.buildMoreLinks();b.buildDropDowns();g.$c.bind("setActiveTab",function(k,j){b.setActiveTab(k,j)});g.$c.bind("setAuthState",function(k,j){b.buildAuth(k,j)});if(e.search.params.initFocus!==undefined&&e.search.params.initFocus){g.$search.globalSearchBox(e.search.params)}else{g.$searchInput.bind("focus.GH",function(j){b.buildSearch(j)}).attr("autocomplete","off");g.$searchSubmit.bind("mouseover.GH",function(j){b.buildSearch(j)});if(e.search.params.searchText!==undefined&&e.search.params.searchText!==""){g.$searchInput.val(e.search.params.searchText)}}},getVars:function(){return{options:e,ui:g,local:f}},buildSearch:function(i){g.$searchInput.unbind("focus.GH");g.$searchSubmit.unbind("mouseover.GH");if(i.target===g.$searchInput[0]){g.$searchInput.addClass("GH_search_active").attr("value","")}g.$search.globalSearchBox(e.search.params)},buildAuth:function(j,i){if(i!==undefined){a.extend(true,e.auth,i)}g.$hatTools.empty().append((e.auth.authenticated)?e.auth.authState:e.auth.unauthState)},buildMoreLinks:function(){var p=e.moreLinks,n=0,j=p.length;if(j>=e.morePromoCount){var k=a("#GH_hat_more"),o,m;if(!k.length){m=a("<li />").addClass("GH_hat_LI").append(o=a("<ul />").attr("id","GH_hat_more").addClass("GH_hat_UL").append(a("<li />").addClass("GH_hat_LI").text(e.moreText+"\xa0 ")));for(;n<e.morePromoCount;n++){o.append(a("<li />").addClass("GH_hat_LI").append(a("<a />").attr({href:p[n][1],target:(p[n][2]!==undefined)?p[n][2]:"_self"}).addClass("GH_hat_A GH_hat_more_A").text(p[n][0])).append((n<e.morePromoCount-1)?",\xa0":""))}if(j>e.morePromoCount){o.append(g.$hatLIMore=a("<li />").addClass("GH_hat_LI GH_hat_LI_more").append("\xa0"+e.moreAnd+"\xa0").append(g.$hatMoreLink=a("<a />").attr({id:"GH_hat_more_link",href:"#"}).addClass("GH_hat_A GH_hat_more_A").text(e.moreMore)))}m.appendTo(g.hatLinks)}else{g.$hatMoreLink=a("#GH_hat_more_link");g.$hatLIMore=g.$hatMoreLink.parent()}g.$hatMoreLink.bind("mouseover.GH",function(i){b.showMoreLinks(i)})}},showMoreLinks:function(p){p.preventDefault();if(f.moreLinksBuilt===false){var n=e.moreLinks.slice(e.morePromoCount),o=0,m=n.length,j=Math.ceil(m/3),k=Math.ceil(m/3*2),s,r,q,t;g.$hatMoreList=a("<div />").attr("id","GH_more_list").append(a("<b />").attr("id","GH_more_list_lab").text(e.moreTextHeadline)).append(s=a("<ul />").addClass("GH_more_list_UL")).append(r=a("<ul />").addClass("GH_more_list_UL")).append(q=a("<ul />").addClass("GH_more_list_UL"));for(;o<m;o++){t=a("<li />").append(a("<a />").attr({href:n[o][1],target:(n[o][2]!==undefined)?n[o][2]:"_self"}).text(n[o][0]));if(o<j){t.appendTo(s)}else{if(o<k){t.appendTo(r)}else{t.appendTo(q)}}}g.$hatMoreList.css("left",g.$hatLIMore.offset().left-g.$c.offset().left+14).appendTo(g.hat);f.moreLinksBuilt=true}if(g.$hatMoreList.css("display")==="none"){g.$d.bind("mousemove.GHTEMP",function(i){b.kill(i)});g.$hatMoreList.fadeIn("fast")}},kill:function(j){var i=a(j.target);if(i.closest("#GH_hat_more_link").length===0&&i.closest("#GH_more_list").length===0){g.$d.unbind("mousemove.GHTEMP");g.$hatMoreList.fadeOut("fast")}},setActiveTab:function(j,i){if(i!==undefined&&i!==null){if(f.activeTab!==null){f.activeTab.removeAttr("id");if(f.activeTab.hasClass("GH_nav_list")){a("#GH_nav_act_B").removeAttr("id")}}f.activeTab=g.$navLi.eq(i).attr("id","GH_nav_act");f.activeTab.children().eq(0).css("clear","both");if(f.activeTab.hasClass("GH_nav_list")){f.activeTab.children().eq(0).wrapInner('<b id="GH_nav_act_B"></b>')}}},buildDropDowns:function(){g.$navLi.each(function(){var i=a(this);if(i.hasClass("GH_nav_list")){i.mouseover(function(){if(i.showtimer){clearInterval(i.showtimer);i.showtimer=null}i.addClass("GH_nav_list_open").find("ul").fadeIn("fast")}).mouseout(function(){i.showtimer=setTimeout(function(){if(i.showtimer){clearInterval(i.showtimer);i.showtimer=null}i.removeClass("GH_nav_list_open").find("ul").fadeOut("fast")},250)})}})}};a.extend(true,e,c,d);a.extend(true,b,e.fn);b.init(h);return h}})(jQuery);
(function(a){a.fn.globalSearchBox=function(d){var c={apiUrl:"http://autocomplete.search.aol.com/autocomplete/get",apiIt:"ops-test",apiOutput:"json",apiCount:8,apiQueryParam:"q",apiDictionary:"",ui_form:"#GH_search_form",ui_input:"#GH_search_field",ui_submit:"#GH_search_button",ui_output:"#GH_search_results",initSmartSearch:true,searchText:"",preserveGhostText:false,initFocus:false,fn:{}},e={},h=this,g={},f={ghostText:"",query:"",results:[],highlight:-1,$highlight:null,timer:null},b={init:function(i){g.$c=a(i);g.$input=a(e.ui_input);g.$output=a(e.ui_output);g.form=a(e.ui_form)[0];g.submit=a(e.ui_submit)[0];f.ghostText=g.$input.attr("defaultValue");g.$input.attr("autocomplete","off").bind("focus.GH",function(j){b.processInputFocus(j)}).bind("blur.GH",function(j){b.processInputBlur(j)});a(g.form).bind("submit.GH",function(j){b.selectSuggestion(j)});if(e.initSmartSearch){e.apiUrl=e.apiUrl+"?it="+e.apiIt+"&count="+e.apiCount+"&output="+e.apiOutput;if(e.apiDictionary!==""){e.apiUrl=e.apiUrl+"&dict="+e.apiDictionary}g.$input.bind("keyup.GH",function(j){b.processKeyPress(j)});g.$output.bind("mouseover.GH",function(j){b.moveHighlightMouse(j)}).bind("mouseover.GH",function(j){b.suspendBlurDetection(j)}).bind("mouseleave.GH",function(j){b.resumeBlurDetection(j)}).bind("click.GH",function(j){b.selectSuggestion(j)})}if(e.initFocus){g.$input.focus()}if(e.preserveGhostText){g.$label=a("<label />").attr("id","GH_search_label").text(f.ghostText).appendTo(g.form);g.$label.bind("click.GH_SL",function(j){b.preserveGhostText(true)});g.$input.bind("keyup.GH_SL",function(j){b.preserveGhostText(j)}).bind("click.GH_SL",function(j){b.preserveGhostText(j)}).bind("blur.GH_SL",function(j){setTimeout(function(){b.preserveGhostText(j)},250)})}if(e.searchText!==""){g.$input.val(e.searchText)}},getVars:function(){return{options:e,ui:g,local:f}},processInputFocus:function(i){g.$input.addClass("GH_search_active").val((g.$input.val()===f.ghostText)?"":g.$input.val())},processInputBlur:function(i){g.$input.removeClass("GH_search_active").val((g.$input.val()==="")?f.ghostText:g.$input.val());b.displaySuggestions()},preserveGhostText:function(i){if(typeof i==="boolean"&&i){g.$input.focus()}g.$input.unbind("keyup.GH_SL").unbind("click.GH_SL").unbind("blur.GH_SL");g.$label.remove()},processKeyPress:function(l){var j=l.keyCode;if(j===38){b.moveHighlightKey(-1)}else{if(j===40){b.moveHighlightKey(1)}else{var i=l.target,k=a.trim(i.value);if(k!==""){if(f.timer!==null){clearTimeout(f.timer)}f.timer=setTimeout(function(){b.getSuggestions(k)},200)}else{b.displaySuggestions()}}}},moveHighlightKey:function(j){if(f.$highlight!==null){f.$highlight.removeClass("GH_highlight")}f.highlight=f.highlight+j;if(f.highlight>=f.results.length||f.highlight===-1){f.highlight=-1;g.$input.val(f.query)}else{if(f.highlight<-1){f.highlight=f.results.length-1}}if(f.highlight>-1){f.$highlight=a(f.results[f.highlight]);f.$highlight.addClass("GH_highlight");g.$input.val(f.$highlight.text())}},moveHighlightMouse:function(j){var i=j.target;if(i.nodeName==="B"){i=i.parentNode}if(f.$highlight!==null){f.$highlight.removeClass("GH_highlight")}f.highlight=f.results.index(i);f.$highlight=a(i).addClass("GH_highlight")},selectSuggestion:function(j){j.preventDefault();if(j!==undefined&&j.type==="click"){var i=j.target;if(i.nodeName==="B"){i=i.parentNode}g.$input.val(a(i).text())}g.$input.val(a.trim(g.$input.val()));if(g.$input.val()!==""&&g.$input.val()!==f.ghostText){g.form.submit()}},getSuggestions:function(j){var i=e.apiUrl+"&"+e.apiQueryParam+"="+j;a.ajax({dataType:"jsonp",url:i,jsonp:"cb",success:function(k){b.displaySuggestions(k)},error:function(){b.displaySuggestions()}})},suspendBlurDetection:function(){g.$input.unbind("blur.GH")},resumeBlurDetection:function(){g.$input.bind("blur.GH",function(i){b.processInputBlur(i)})},displaySuggestions:function(p){f.highlight=-1;f.$highlight=null;if(p!==undefined&&p[1].length>0){f.query=p[0];var o=p[1],j=a("<ul />"),m,k=o.length,n=new RegExp(f.query,"i"),q="<b>"+f.query+"</b>";for(m=0;m<k;m++){a("<li />").html(o[m].replace(n,q)).appendTo(j)}f.results=j.find("li");g.$output.empty().append(j).fadeIn("fast")}else{f.query="";f.results=[];g.$output.fadeOut("fast").empty()}}};a.extend(true,e,c,d);a.extend(true,b,e.fn);b.init(h);return h}})(jQuery);
var _fBsp='%3A\\/\\/',_fBrp='%3A//',_fBd=document,_fBw=window,_fBr=escape(_fBw.location.href),_sW=screen.width,_sH=screen.height,_fBtm=(new Date()).getTime(),_fBpv=escape(_fBd.referrer);
function _fBe(_fBarg){_fBs=_fBsp+',\\/,\\.,-,_,'+_fBrp+',%2F,%2E,%2D,%5F';_fBa=_fBs.split(',');for(i=0;i<5;i++){eval('_fBarg=_fBarg.replace(/'+_fBa[i]+'/g,_fBa[i+5])')}return _fBarg;}
function _fBsG () {var _chG = typeof 's_channel' == 'undefined'? s_channel : "";return _chG;}
function _fBsH () {var _chH = 'channel' in s_265? s_265.channel : "";_chH = _chH=='undefined'?'':_chH;return _chH;}
function fBch() {var _ch = typeof s_265 == 'undefined'?_fBsG():_fBsH();return _ch;}
function fBo(_sid){_fBhref = 'http://feedback.aol.com/rs/rs.php?sid='+_sid;_fBw.open(_fBhref+'&time1='+_fBtm+'&time2='+(new Date()).getTime()+'&referer='+_fBe(_fBr)+'&prev='+_fBe(_fBpv)+'&width='+_sW+'&height='+_sH+'&ch='+fBch(),'feedback','width=535,height=425,screenX='+((_sW-535)/2)+',screenY='+((_sH-425)/2)+',top='+((_sH-425)/2)+',left='+((_sW-535)/2)+',resizable=yes,copyhistory=yes,scrollbars=no');return false;}
function fBo2(_sid){_fBhref = 'http://feedback.aol.com/rs/rs.php?sid='+_sid;_fBw.open(_fBhref+'&time1='+_fBtm+'&time2='+(new Date()).getTime()+'&referer='+_fBe(_fBr)+'&prev='+_fBe(_fBpv)+'&width='+_sW+'&height='+_sH+'&ch='+fBch(),'feedback','width=535,height=425,screenX='+((_sW-535)/2)+',screenY='+((_sH-425)/2)+',top='+((_sH-425)/2)+',left='+((_sW-535)/2)+',resizable=yes,copyhistory=yes,scrollbars=no');}

// serialised search parameters stored for comparison with document hash
var current_hash = "",
// a global constant which notifies if an ajax call is running or not
ajax_running = false;
    
$(function() {
	globalInit();
	headerInit();

        $(document).ready(function() {
		$("body").bind("click",function(e){
			if(!e.button){//ONLY WHEN LEFT CLICKED
				var et = e.target;
				var qet = $(et);
	
				if(et.id === "dealsButton"){ /* Today's Hot Deals */
					qet.parent("form").submit();
				}
				else if(et.tagName=="A" && qet.parents("#todaysDeals").length > 0){ /* Today's Hot Deals */
					var s_265=s_gi(s_account), partnerName = qet.attr('rel') || "";
					var pTitle = (typeof thisC2 !== 'undefined') ? thisC2 : (typeof pageTitle === 'undefined') ? 'Editorial Article' : pageTitle;
					s_265.linkTrackVars='eVar5';
					s_265.eVar5='CPC | ' + partnerName + ' - ' + pTitle;
					s_265.tl(et,'o','CPC | ' + partnerName + ' - ' + pTitle);
				}
				else if( ( ( ( ( (et.tagName=="IMG" || et.tagName=="SPAN") && qet.closest("a")[0]) || et.tagName=="A" ) && qet.parents("#photo-thumbnails").length > 0 ) || qet.hasClass("next") || qet.hasClass("prev") ) && qet.parents("#bsGallery").length > 0 ){ /* Ajax Gallery */
					e.preventDefault();
					if(et.tagName=="IMG" || et.tagName=="SPAN"){
						var clink = qet.closest("a");
						getGallerySlide(clink.attr("href"),clink.attr("class"));
					}
					else{
                                                if(et.className=="next"){
							var thumb = $("#photo-thumbnails>li:nth-child(2)>a");
							qet.attr("href",thumb.attr("href")).attr("class",(thumb.attr("class") + " next"));
						}
						else if(et.className=="prev"){
							var thumb = $("#photo-thumbnails>li:last>a");
							qet.attr("href",thumb.attr("href")).attr("class",(thumb.attr("class") + " prev"));
						}
						getGallerySlide(qet.attr("href"),qet.attr("class"));
					}					
				}
			}
		});
		
		
		/* Today's Hot Deals Start*/
		// Ghost text for search deals
		$("#dest_interest").focus(function(){
			if($(this).val() === "eg. Paris, or New York"){
				$(this).val("");
			}
			$(this).addClass('focus');
		}).blur(function(){
			if($(this).val().length < 1){
				$(this).val("eg. Paris, or New York");
				$(this).removeClass('focus');
			}
		});
	
		// Validate value and submit
		$("#dealsearchCom").submit(function(){
			var inp = $("#dest_interest");
			if(inp.val().length > 0 && inp.val() !== "eg. Paris, or New York"){
				document.location.href = "http://travel.aol.com/travel-deals/" + inp.val().replace(/ /g, "+").replace("&", "and") + "-travel--deals";
			}
			return false;
		});
                /* Today's Hot Deals End*/

                /* Add Call to Action icon */
                $("#pageContent .paraClass a").filter(function(){
			var inHref = $.trim($(this).attr("href")); 
                        return ((inHref.indexOf("http://travel.aol.com") != -1 || inHref.indexOf("http://news.travel.aol.com") != -1) && ! $(this).children().size())
		}).not("#travel_partners a").addClass("hlightIco");

                highlightGallery();
                
		if($("#bsGallery")[0]){
			//Script to detect changes in document hash
			var hash_detect = setInterval(function(){
				// don't fire a request if one is already in progress or there is no change in hash detected
				if(unescape((document.location.hash+"").substr(1)) !== unescape(current_hash.substr(1)) && ajax_running === false){
					getHistoryGallerySlide();
				}
			},100);
			
			// Apply sonar binding on the newly created input elements
			$(window).load(function() {
			  	$("#bsGallery img[longdesc]").bind("scrollin",{distance:50},function(){
				        var $this = $(this);
					if(typeof $this.attr('longdesc') !== "undefined"){
						$(this).attr('src',$(this).attr('longdesc')).removeAttr('longdescription').unbind("scrollin");
					}
				});
			});
		}
                
	});

});

function highlightGallery(mid) { /* Highlight the first gallery thumbnail */
        var pthumbs = $("#photo-thumbnails");
        mid = (typeof mid !== "undefined" && mid != "") ? mid : pthumbs.find("li:first a").attr("class");
        pthumbs.find("li").removeClass("active").find("a[class="+mid+"]").parent().addClass("active");
}

function getHistoryGallerySlide() {
	var galerySlug = $("#bsGallery>h2").attr("class");
	if(galerySlug == ""){return false}
	var mediaid = (document.location.hash).replace("#","");
	if(mediaid == ""){
		getGallerySlide("/gallery-ajax/" + galerySlug + "/","");
	}
	else{
		getGallerySlide("/media-ajax/" + galerySlug + "/" + mediaid + "/",mediaid);
	}
	
}

function getGallerySlide(url,mediaid) {
	ajax_running = true;
	$("#bsGallery").animate({opacity: 0.20},200,function(){
		mediaid = mediaid.split(" ")[0];
		if(mediaid != ""){
			current_hash = document.location.hash = "#" + mediaid;
		}
	        else{
	        	current_hash = "";
		}                

		$.ajax({
		        url: url.replace("/gallery/","/media-ajax/"),
		        type: 'POST',
		        async: true,
		        cache: false,
		        success: function(galdata){
		        	galdata = $.trim(galdata);
		        	if(galdata .length < 1){return false}
		        	
				$("#bsGallery").html(galdata.split("##--##")[0]);
				
				/*Omniture*/
				var s_265=s_gi(s_account);
				s_265.t();
		
				$("#bsGallery").animate({opacity: 1},200);
				highlightGallery(mediaid);
				ajax_running = false;
		        }
		});
	});
}

/* Global init */
function globalInit() {
	var tabContainers = $('div.tabsContainer > div');
	$('div.tabsContainer ul.tabNavigation a').click(function () {
	       	tabContainers.hide().filter(this.hash).show();
        	$('div.tabsContainer ul.tabNavigation a').removeClass('selected');
	        $(this).addClass('selected');
                return false;
	}).filter(':eq(1)').click();
	
	
	var $pgCont = $('div.mainContainer');
	if ($pgCont.find('.rightContainer').height() > $pgCont.find('.midContainer').height()) {
    		$pgCont.find('.rightContainer').addClass('gutterBorderLeft');
	    	$pgCont.find('.midContainer').removeClass('gutterBorderRt');
    	}
    	
	var savedGhostText = $('#GH_search_field').val();
	$('#GH_footer_search_field').val(savedGhostText).blur(function() {
		$(this).removeClass('GH_search_active');
		if ($.trim($(this).val()) == '') $(this).val(savedGhostText)
	}).focus(function() {
		$(this).addClass('GH_search_active');
		if ($(this).val() == savedGhostText) $(this).val('')
	});  
	$('#GH_footer_search_button').click(function() {
		var q = $('#GH_footer_search_field').val()
		if ($.trim(q) == savedGhostText || $.trim(q) == '') return false; 
	}) 
	
	$('#TRV_contributors .TRV_contributor_bio:last').addClass('TRV_contributor_bio_last');	

	function sortAlpha() {$("ul.catList li").sort(sortAlpha).appendTo("ul.catListSort");}

	//beacon init
	var bN_cfg = {
		h : ["news.travel.aol.com","sb.sandbox.news.travel.aol.com", "aditya.sandbox.news.travel.aol.com","qa.sandbox.news.travel.aol.com"],
		p : [["dl_task","hm_multi"]] 
	};
	
	//category sort
	$('.catList').each(function() {
          var colsize = Math.round($(this).find("li").size() / 2);
          $(this).find("li").each(function(i) {
            if (i>=colsize) {$(this).addClass('right_col');}
          });
          $(this).find('.right_col').insertAfter(this).wrapAll("<ul class='rightCol'></ul>").removeClass("right_col");
        });

   	var ltCatLength = $('.catList li').length-1;
	$('.rightCategoriesList li:last').addClass('lastCategory');
	$('.rightCategoriesList li:eq('+ltCatLength+')').addClass('lastCategory');
    
    
var text_size = "small";

    setTextSize("small");
    $("#font-resizer span").live('click', function(e){
       var size = $(this).attr("class");
       setTextSize(size);
    });
}

function headerInit() {
	$('#GH_').globalHeader({
		activeTab: 3,
		morePromoCount: 2,
		moreLinks:
			[['Gadling','http://www.gadling.com'],
			['Mapquest','http://www.mapquest.com'],
			['Travel Search','http://kayak.travel.aol.com'],
			['Weather','http://weather.aol.com']],
		auth: {
			doAuth: false,
			authenticated: false,
			authState: '',
			unauthState: ''
		},
		search: {
                params : {
                    apiUrl : 'http://autocompletech.search.aol.com/autocomplete/get', // api url
                    apiIt : 'travel', // internal tracking channel id
                    apiOutput : 'json',  // data format for api to return
                    apiCount : 10, // # of results for api to return
                    apiQueryParam : 'q',
                    apiDictionary : 'en_us_travel_h',
                    initSmartSearch : true,
                    searchText : '',
                    preserveGhostText : false,
                    initFocus : false
                }
		}
	});
	
	$("#GH_footer_search_field").globalSearchBox({
		apiUrl : 'http://autocompletech.search.aol.com/autocomplete/get', // api url
		apiIt : 'travel', // internal tracking channel id
		apiOutput : 'json',  // data format for api to return
		apiCount : 10, // # of results for api to return
		apiQueryParam : 'q',
		apiDictionary : 'en_us_travel_h',
		initSmartSearch : true,
		searchText : '',
		preserveGhostText : false,
		initFocus : false,
		ui_form : '#GH_footer_search_form', // search form
		ui_input : '#GH_footer_search_field', // ui input field
		ui_submit : '#GH_footer_search_button', // ui submit button
		ui_output : '#GH_footer_search_results' // ui output container
	});
}

var staffIncludes = {'beth-caulfield':'no-subscribe','laura-michonski':'no-subscribe','diane-tilton':'no-subscribe','patrick-batu':'','liz-behler':'','libby-zay':''};

function contribHubInit() {
    $('#CE_writers .CE_contrib_bio').each(function() {
       	if (staffIncludes[$(this).find('.CE_contrib_photo a').attr('href').split('/')[2]] === 'no-subscribe') {       	
	       	var $me = $(this).find('.CE_contrib_blurb h3');
       		$me.html($me.find('a').html());
   		$(this).find('.CE_contrib_opt').find('li:not(:eq(2))').remove();       	
       	}
    });
    
    $('a.CE_contrib_opt_rss').live('click', function(e) {
   	aol_feeds_subscribe.show(e.target, null, e.target.href);
    	return false;
    });

}

function contribPageInit() {
    var thisAuth = document.location.href.split('/')[4];
    if (staffIncludes[thisAuth] == null) {
    	$('div.CE_contrib_bio').find('.CE_contrib_photo').remove().end().find('.CE_contrib_blurb').css('padding','0');
    } 
    if (thisAuth === 'aol-travel-staff') {
    	$('div.CE_contrib_bio_txt').remove();
    }
    
    if (staffIncludes[thisAuth] == 'no-subscribe') {
        $('div.CE_contrib_blurb .subscribe').remove();
    }
    
    $('#CE_ .subscribe a').live('click', function(e) {
   	aol_feeds_subscribe.show(e.target, null, e.target.href);
    	return false;
    });
}

function listPostInit() {
	$('div.postContainer').each(function() {
	    var crLink = $(this).find('.continueReadingLink');
	    //$(this).find('div:first').append(crLink);
	    $(this).find('img').wrap($('<a/>').attr('href',crLink.attr('href')));
	});
}
function showPostInit() {
    $('#pageContent a.authorLink').live('click', function(e) {
   	aol_feeds_subscribe.show(e.target, null, e.target.href);
    	return false;
    });
}
var text_size = "small";
function setTextSize(new_size) {

  $(".paraClass").removeClass(text_size);
  $("#font-resizer span." + text_size).removeClass("active");
  $(".paraClass").addClass(new_size);
  $("#font-resizer span." + new_size).addClass("active");
  text_size = new_size;
}

/* GSL */
function done() {
    var spLength = sponsorData.length;
    if (spLength == 0) return;
    var ads = new Array(paramsForDone.length);
    for (var i = 0; i < sponsorData.length; i++) {
        ads[i] = "<div><h5><a href='http://about-search.aol.com/index.html#sl' target='_blank' title='Sponsored Links'>Sponsored Links</a></h5></div><ul>";
    }   
    for (var i = 0; i < sponsorData.length; i++) {
        for (var j = 0; j < paramsForDone.length; j++) {
            if (i >= paramsForDone[j].s && i <= paramsForDone[j].e) {
                ads[j] += "<li><h2><a target='_blank' href='"+sponsorData[i].redirect_url+"' onmouseover=\"self.status='"
                    +sponsorData[i].url+"'; return true\" onmouseout='self.status=\"\"; return true'>"+sponsorData[i].title
                    +"</a></h2><h4>"+sponsorData[i].d1+ " " +sponsorData[i].d2+"</h4><h3><a target='_blank' href='"+sponsorData[i].redirect_url+"'>"+sponsorData[i].url+"</a></h3></li>";
            }
        }
    }   
    
    for (var j = 0; j < paramsForDone.length; j++) {
        ads[j] += '</ul>';

        if ($(ads[j]).find('h2').length != 0) {
            $('#'+paramsForDone[j].d).css('display', 'block').html(ads[j]);
        } else {
            $('#'+paramsForDone[j].d).css('display', 'none');
        }
    }   
}

function callSponsorLinks(gslConfig){
    params.surl = gslConfig.type == 'afs' ? '' : document.location.href;
    params.snum = gslConfig.numGSL || "3";
    params.sclient = gslConfig.sclient || "";
    params.sch = gslConfig.sch || "";
    params.ssch = gslConfig.ssch || "";
    params.spch=gslConfig.spch || "";
    params.squery = gslConfig.squery || "";
    params.of="js";
    params.shints = gslConfig.shints || "";
    get_links();
}

var textSelector = '.paraClass';
function __TABBLO_TPT_LOAD(){
	Tabblo.embedded.sites.SettingsObject.preprocess.apply({Properties:{template:'news'},FixedContent:{'logo':'/media/travelLogo.gif'},Content:{'pagetitle':{ match: 'css', selector:'h1' }, 'text':{ match: 'css', selector: textSelector, outputTagToo: true, recurse: true }, 'image': { match: 'css', selector:'.postContainer img', nodeContentType: 'image' }} }, []); Tabblo.embedded.printabulous();
}


function MakePDF() {
        if($(".ke_kit").length > 0) textSelector = '.hmedia';
	var tpS = document.createElement('script');tpS.setAttribute('type','text/javascript');tpS.setAttribute('charset','utf-8'); tpS.setAttribute('src','http://h30405.www3.hp.com/edit/tptboot/1.0');document.getElementsByTagName('body').item(0).appendChild(tpS);
}

function pdfPrint(url){
	MakePDF();
}
function showHpPop(iShow, cntr){
    if (iShow == 1) {
      if(document.getElementById(cntr)){
	        document.getElementById(cntr).innerHTML = "<p>With HP wireless printers, you could have printed this from any room in the house. Live wirelessly. Print wirelessly.</p>";
        	document.getElementById(cntr).style.display = "block";
        }
    } else {
	if(document.getElementById(cntr)){
        	document.getElementById(cntr).style.display = "none";
        }
    }
}
// set channel specific omniture vars for print

function TrackPDF(){
    var s_265=s_gi('us.trave;'); 
    s_265.linkTrackVars='none';
    s_265.tl(this,'o','HP Print');   // where 'HP Print' is the name of the custom Omniture item.
}

function changecolor()
{

document.getElementById("top_search_input").className="GH_search_active";
}
function removecolor()
{

document.getElementById("top_search_input").className="";
}
function submitWebSearch(event) {
    if (event == "onclick" || eventIsEnterKey(event)) {
        return srchSub2();        
    } else {
        return true;
    }
}
function p_o(o){return document.getElementById(o);}

function eventIsEnterKey(event) {
    if (event && event.which == 13 || window.event && window.event.keyCode == 13 || event && event.which == 3 || window.event && window.event.keyCode == 3) {
        return true;
    }
    return false;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
function srchSub2() {
    var frm=p_o("top_search_form");
    var queryval = frm.top_search_input.value.trim();
if(queryval == '' || queryval == 'Search the Web')
{
var newurl='http://search.aol.com/aol/webhome?'+'s_it=hdt-travel';
}
else{
    queryval = queryval.replace( /\+/, " ");
    var newurl = frm.action + queryval+'&s_it=hdt-travel'; }
    if (frm.target == '_blank') {
        window.open(newurl, '_self', '');
    } else {
        window.location = newurl;
    }
    return false;
}
