$(document).ready( function() {
			
	$("a[rel='external']").addClass("external").attr('title', function() { return this.title + ' (Opens in New Window)' }).click(function() { window.open(this.href); return false; });
		
	Cufon.set('fontFamily', 'gill sans std light').replace('.font_light,h1,h2,#sidebar .title');
	Cufon.set('fontFamily', 'gill sans std').replace('.font');
	
	DD_roundies.addRule('.header, h2, #sidebar .title, #cafe95 h1', '5px 5px 0 0');
	DD_roundies.addRule('.round_bottom', '0 0 5px 5px');
	DD_roundies.addRule('.round,.third_banner', '5px');
	DD_roundies.addRule('#property_search_block', '0 5px 5px 5px');
	
	$("input").labelify({
		labelledClass: "labelHighlight"				
	});
	
	$('#valuation_form_submit').click( function() {
		$('#valuation_form').submit();
		return false;
	});
	
	$('#property_search_form .button').click( function() {
		$('#property_search_form').submit();
		return false;
	});
	
	$('#lettings_search_form .button').click( function() {
		$('#lettings_search_form').submit();
		return false;
	});
	
	$('#tab_property_search').click( function() {
		$('#property_search_tabs li').removeClass('active');
		$(this).parent().addClass('active');
		$('.search_block').hide();
		$('#property_search_form_block').show();
		return false;
	});
	
	$('#tab_lettings_search').click( function() {
		$('#property_search_tabs li').removeClass('active');
		$(this).parent().addClass('active');
		$('.search_block').hide();
		$('#lettings_search_form_block').show();
		return false;
	});
	
	
});
