// save a reference to the default siteCorners function
defaultSiteCorners = siteCorners;

// overload the siteCorners function
siteCorners = function() {
	defaultSiteCorners();
	if (!$('opt-listing') && !$('opt-compare') && $('sidebar')) Nifty('div#sidebar','normal transparent');
	if ($('opt-listing')) Nifty('div.listing-panel-right','normal transparent');
	if ($$('.content-panel').length > 0) Nifty('div.content-panel','normal transparent');
	if ($('special-offers-title')) Nifty('div#special-offers-title','normal top transparent');
	if ($('special-offers-content')) Nifty('div#special-offers-content','normal bottom transparent fixed-height');
	if ($('breadcrumbs')) Nifty('div#breadcrumbs','small transparent');
	if ($('compare-matrix-container')) Nifty('div#compare-matrix-container','normal transparent');
	//if ($('learn-more')) Nifty('div#learn-more','small transparent fixed-height');
	if ($('home-text')) {
		Nifty('div#home-text','normal top transparent fixed-height');
		Nifty('div#learn-more','normal bottom transparent');
	}
	if ($$('.round_button').length > 0) Nifty('div.round_button','small transparent');
	//if ($$('.citylist-tab').length > 0) Nifty('div.citylist-tab','small top');
}

loadCitylist = function(listTag) {
	$$('a.citylist-tab').each(function(el){
		if (el.rel == listTag) el.addClassName('selected');
		else el.removeClassName('selected');
	});
	
	new Ajax.Request(
		site_url+'/?passive&opt=citylist',
		{
			method: 'post',
			parameters: 'passive&opt=citylist',
			evalScripts: true,
			onComplete: function(request) {
				$('citylist-communities').update(request.responseText);
				setTimeout(function(){
					gmap_check();
				}, 50);
			}
		}
	);
}
