$(window).load(function() {
    $('#slider').nivoSlider();
});

$(document).ready(function(){
				
	$('#fpresults').tinyscrollbar({ axis: 'x', sizethumb: 142 });
	if (document.getElementById("prop_image_link")) {
		$("a[rel='propimages']").colorbox({slideshow:true});
	}
		
});

function togglePrices() 
{
	$('#rentpricemin').toggleClass('hidden');
	$('#rentpricemax').toggleClass('hidden');
	$('#salepricemin').toggleClass('hidden');
	$('#salepricemax').toggleClass('hidden');
}


var socialState = "off";

function aniFacebook() {
	$('#facebooktab').stop();
	$('#facedrop').stop();
	
	if (socialState == "off") {
		$('#facebooktab').animate({top: '0px'}, 600 );
		$('#facedrop').animate({top: '0px'}, 600 );
		socialState = "on";
	} else {
		$('#facebooktab').animate({top: '-265px'}, 200 );
		$('#facedrop').animate({top: '-265px'}, 200 );
		socialState = "off";
	}
}

function aniTwitter() {
	$('#twittertab').stop();
	$('#twitdrop').stop();
	
	if (socialState == "off") {
		$('#twittertab').animate({top: '0px'}, 400 );
		$('#twitdrop').animate({top: '0px'}, 400 );
		socialState = "on";
	} else {
		$('#twittertab').animate({top: '-165px'}, 150 );
		$('#twitdrop').animate({top: '-165px'}, 150 );
		socialState = "off";
	}
}
