function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

$(document).ready(function() { 
		$("#ImoveisVenda").tablesorter();
		$("#PortfolioTable").tablesorter(); 
	} 
);


$(document).ready( function() {
	$('a.popupConsultor').click( function() {
		window.open($(this).attr('href'), 'Consultor', 'height=390,width=585' );
		return false;
	});
	
	$('a.popupHotSite').click( function() {
		window.open($(this).attr('href'), 'HotSite', 'height=600,width=900' );
		return false;
	});
	/*
	$("#slider").easySlider({
		auto: true,
		speed: 2000,
		pause: 10000,
		continuous: true,
		controlsShow: true,
		nextText: 'Próximo',
		prevText: 'Anterior'
	});
	*/
	
	$(function() {
	    $("#slider").jCarouselLite({
	        btnNext: ".next",
	        btnPrev: ".prev",
			circular: true,
			auto: 5000,
			visible: 1,
			speed: 800
		});
	});
	
	

	
	
});


$(document).ready(function() {
	$("a.thickbox").fancybox();
	
	$("a.thickboxIframe").fancybox({ 
		'frameWidth': 600,
		'frameHeight': 400,
		'hideOnContentClick': false
	});
	
	$("a[rel=groupFlickr]").fancybox({
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'titlePosition' 	: 'over',
			'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
			    return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
			}
		});
	
	
});