jQuery.noConflict(); 
jQuery(document).ready(function(){
	
	/*jQuery("a.mytours_remove").bind("click", function() {
		var url = jQuery(this).attr("href").replace("display_page=tours", "display_page=none");
		var tour = this;
		try {
			jQuery.ajax({
				url: url,
				success: function(request, status){
					jQuery(tour).parent().parent().remove();
					alert("Tour has been removed from My Tours.");
				}
			});
		}
		catch (error) {
		}
		return false;
	});*/
	
	jQuery("a.mytours_remove").bind("click", function() {
		var url = jQuery(this).attr("href").replace("display_page=tours", "display_page=none");
		var cross = this;
		try {
			jQuery.ajax({
				url: url,
				success: function(request, status){
					/*
					jQuery(cross).next("div.result").remove();
					jQuery(cross).remove();
					*/
					jQuery(cross).parent().remove();
					
					var countOfResults = jQuery("#mytours_results").children(".result");
					if (countOfResults.length < 1) {
						jQuery("p.mytours").html("You have not selected any tours to compare. You can add tours by clicking on the 'Add to Compare My Tours' link at the top of each tour page.");
						jQuery(".compare_button").remove();
					}
					
					//alert("Tour has been removed from My Tours.");
				}
			});
		}
		catch (error) {
		}
		return false;
	});
});
