	$(function() {
		$( "#slider1" ).slider({
			range: true,
			min: 0,
			max: 2000,
			values: [ 200, 1200 ],
			slide: function( event, ui ) {
				$( "#amount1" ).val(ui.values[ 0 ] + "M2 - " + ui.values[ 1 ]  + "M2");
				$( "#CAT_Custom_36807_Min").val(ui.values[ 0 ]);
				$( "#CAT_Custom_36807_Max").val(ui.values[ 1 ]);
			}
		});
		$( "#amount1" ).val( $( "#slider1" ).slider( "values", 0 ) +
			"M2 - " + $( "#slider1" ).slider( "values", 1 )  + "M2" );
	});
	$(function() {
		$( "#slider2" ).slider({
			range: true,
			min: 0,
			max: 400,
			values: [ 80, 280 ],
			slide: function( event, ui ) {
				$( "#amount2" ).val(ui.values[ 0 ] + "K - " + ui.values[ 1 ]  + "K");
				$( "#CAT_Custom_36808_Min").val(ui.values[ 0 ] + "000");
				$( "#CAT_Custom_36808_Max").val(ui.values[ 1 ] + "000");
			}
		});
		$( "#amount2" ).val( $( "#slider2" ).slider( "values", 0 ) +
			"K - " + $( "#slider2" ).slider( "values", 1 )  + "K" );
	});
	
	(function($) {
	/*
		jquery.twitter.js v1.5
		Last updated: 08 July 2009

		Created by Damien du Toit
		http://coda.co.za/blog/2008/10/26/jquery-plugin-for-twitter

		Licensed under a Creative Commons Attribution-Non-Commercial 3.0 Unported License
		http://creativecommons.org/licenses/by-nc/3.0/
	*/

	$.fn.getTwitter = function(options) {

		$.fn.getTwitter.defaults = {
			userName: null,
			numTweets: 5,
			loaderText: "Loading tweets...",
			slideIn: true,
			slideDuration: 750,
			showHeading: true,
			headingText: "Latest Tweets",
			showProfileLink: true,
			showTimestamp: true
		};

		var o = $.extend({}, $.fn.getTwitter.defaults, options);

		return this.each(function() {
			var c = $(this);

			// hide container element, remove alternative content, and add class
			c.hide().empty().addClass("twitted");

			// add heading to container element
			if (o.showHeading) {
				c.append("<h2>"+o.headingText+"</h2>");
			}

			// add twitter list to container element
			var twitterListHTML = "<ul id=\"twitter_update_list\"><li></li></ul>";
			c.append(twitterListHTML);

			var tl = $("#twitter_update_list");

			// hide twitter list
			tl.hide();

			// add preLoader to container element
			var preLoaderHTML = $("<p class=\"preLoader\">"+o.loaderText+"</p>");
			c.append(preLoaderHTML);

			// add Twitter profile link to container element
			if (o.showProfileLink) {
				var profileLinkHTML = "<p class=\"profileLink\"><a href=\"http://twitter.com/"+o.userName+"\">http://twitter.com/"+o.userName+"</a></p>";
				c.append(profileLinkHTML);
			}

			// show container element
			c.show();

			$.getScript("http://twitter.com/javascripts/blogger.js");
			$.getScript("http://twitter.com/statuses/user_timeline/"+o.userName+".json?callback=twitterCallback2&count="+o.numTweets, function() {
				// remove preLoader from container element
				$(preLoaderHTML).remove();

				// remove timestamp and move to title of list item
				if (!o.showTimestamp) {
					tl.find("li").each(function() {
						var timestampHTML = $(this).children("a");
						var timestamp = timestampHTML.html();
						timestampHTML.remove();
						$(this).attr("title", timestamp);
					});
				}

				// show twitter list
				if (o.slideIn) {
					// a fix for the jQuery slide effect
					// Hat-tip: http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effect-ie-Jumpy-Animation
					var tlHeight = tl.data("originalHeight");

					// get the original height
					if (!tlHeight) {
						tlHeight = tl.show().height();
						tl.data("originalHeight", tlHeight);
						tl.hide().css({height: 0});
					}

					tl.show().animate({height: tlHeight}, o.slideDuration);
				}
				else {
					tl.show();
				}

				// add unique class to first list item
				tl.find("li:first").addClass("firstTweet");

				// add unique class to last list item
				tl.find("li:last").addClass("lastTweet");
			});
		});
	};
})(jQuery);

	

			$(document).ready(function() {
			
			// create custom animation algorithm for jQuery called "bouncy"
$.easing.bouncy = function (x, t, b, c, d) {
    var s = 1.70158;
    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
    return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}

// create custom tooltip effect for jQuery Tooltip
$.tools.tooltip.addEffect("bouncy",

	// opening animation
	function(done) {
		this.getTip().animate({top: '-=15'}, 300, 'bouncy', done).show();
	},

	// closing animation
	function(done) {
		this.getTip().animate({top: '+=15'}, 100, 'bouncy', function()  {
			$(this).hide();
			done.call();
		});
	}
);
			
			$("#menu img[title]").tooltip({effect: 'bouncy'});
			
				$("#twitter").getTwitter({
					userName: "RealtySA",
					numTweets: 4,
					loaderText: "Loading tweets...",
					slideIn: true,
					slideDuration: 750,
					showHeading: false,
					headingText: "Latest Tweets",
					showProfileLink: false,
					showTimestamp: true
				});
			});


