$(document).ready(function(){

	//Open all links with rel="external" in new window
	$('a[rel="external"]').click( function() {
			window.open( $(this).attr('href') );
			return false;
    });
	
	//Clear value in search input box
	$(function() {
		swapValues = [];
		$(".s_input").each(function(i){
			swapValues[i] = $(this).val();
			$(this).focus(function(){
				if ($(this).val() == swapValues[i]) {
					$(this).val("");
				}
			}).blur(function(){
				if ($.trim($(this).val()) == "") {
					$(this).val(swapValues[i]);
				}
			});
		});
	});
	
	//Add arrow to main navigation
	$('body.property-sale #main-nav li#property-sale .arrow').css('display','block');
	$('body.property-rent #main-nav li#property-rent .arrow').css('display','block');
	$('body.new-developments #main-nav li#new-developments .arrow').css('display','block');
	$('body.news #main-nav li#news .arrow').css('display','block');
	$('body.about-us #main-nav li#about-us .arrow').css('display','block');
	$('body.special_offer1 #main-nav li#special_offer1 .arrow').css('display','block');
	$('body.contact #main-nav li#contact .arrow').css('display','block');
	
	//Property Specific Gallery
	$('#gallery-images a').lightBox();
	
	//Zebra strip contents in multiple divs of same name. 
	$('#properties-table').each(function(){
		$('tr:last td').addClass('no-border');
	});
	
	//Initialize Tabs
	$('#container-1 > ul').tabs();

	
});
