// TIPS .. Like to find a Better way of doing this
var rspsavedsearchtips = new Array()
rspsavedsearchtips[0] = "Display Properties in a Saved Search by clicking on it's title";

var redbpropertytrackertips = new Array()
redbpropertytrackertips[0] = "View Saved Properties by Clicking on the Price or Image";

// JQUERY ONLOAD FUNCTION
$(document).ready(function(){
	if ($.browser.msie && $.browser.version >= 7 || $.browser.mozilla){
		$("#redbsearchtools").corner("5px");
		$("#redbstatusbar").corner("5px");	
	}
	
	$("#redbsearchtoolbar a").click(function () {
		toggleREDBPanels($(this).attr("name"));
		return false;
    });

	//Prepare the Panels
	toggleREDBPanels();
});

//TOGGLE PANELS
function toggleREDBPanels(panel){
	$("#redbsearchpanels > div").hide();
	(!panel) ? panel="redbquicksearchpanel" : panel=panel+"panel" ;
	$("#"+panel).show();
	switch (panel){
		case "redbquicksearchpanel":
			//getREDBAjaxContent("/ghl/templates/homelifebc_new/searchpanel_quicksearch.htm", "redbquicksearchcontainer")
			$("#redbquicksearchcontainer").show();
			return false;
		break;
		case "redbsavedsearchespanel":
			getREDBAjaxContent("/php-bin/index.php?overlord=ListSavedSearch", "redbsavedsearchescontainer")
			$("#redbstatusbar").inlineTip(rspsavedsearchtips);
			return false;
		break;
		case "redbpropertytrackerpanel":
			getREDBAjaxContent("/php-bin/index.php?overlord=ListSavedProperty", "redbpropertytrackercontainer")
			$("#redbstatusbar").inlineTip(redbpropertytrackertips);	
			return false;
		break;
	}
}

// DELETE COOKIE - DEBUG
function deletecookie(){
	redbsearchtoolscookiejar.destroy()
}
// PRELOADER
var imagesLoaded = 0;
function increaseImageLoadCount(){
	imagesLoaded++
	if(imagesLoaded == $("#redbdetailedviewslideshowcontainer img").not(".ldrgif").size()){
		$("#redbdetailedviewslideshowcontainer").slideView();
	}
}
// AJAX FUNCTIONS
function getREDBAjaxContent(contenturl,dest){
	$.ajax({
		url: contenturl,
		cache: false,
		success: function(data) {
			$('#'+dest).empty();
			$('#'+dest).html(data);
		}
	});
}
function delete_ss(dest){
	$.ajax({
			url: dest,
			beforeSend: function(){
				$(dest).html('<ul><li><img src="/ghl/redb/new/i/ajax-loader.gif" alt="loading"></li></ul>');	
			},
			cache: false,
			success: function(data) { 
				$('#redbsavedsearchescontainer').empty();
				$('#redbsavedsearchescontainer').html(data);
							
			}
		});	
}
<!--Delete Saved Property-->
function delete_sp(dest){
	$.ajax({
			url: dest,
			cache: false,
			success: function(data) { 
				$('#redbpropertytrackercontainer').empty();
				$('#redbpropertytrackercontainer').html(data);
			
			}
		});	
}

