var i = 0; 
	
function auctiontimer(){
	atid = setInterval(auctionanim, 2000);
}

function auctionanim(){
	i++;
	if (i == 1) {
		$('#auctionlink').fadeIn(250);
	} else {
		$('#auctionlink').fadeToggle(2000);
	}
}

$(document).ready(function(){
	
	// remove focus outline on all links when clicked
  $("a").focus(function(){
    $(this).blur();
  })
	
	// 
	$(".imgclick").click(function () {
		$("#myImage").attr("src", "path/to/newImage.jpg");	
	});

	// Home Page Buying/Renting Form
	$("#buttonRenting").click(function () {
		$("#buyForm").hide();
		$("#homeIntro").hide();
		$("#hotProperty").hide();
		$("#hotPropertyRenting").show();
		$("#homeIntroRenting").show();
		$("#rentForm").show();
		$("#buttonRenting").css({backgroundPosition: '0px 0px'});
		$("#buttonBuying").css({backgroundPosition: '0px -31px'});
		$("#rentBuyWrapper").css({background: 'url(/images/home/renting_bg.jpg)'});
		$("#fld_rentbuy_submit").css({background: 'url(/images/home/button_search_rent.png)'} );
		$("#fld_rentbuy_submit").css({backgroundRepeat: 'no-repeat'});
		$("#hotProperty").css({background: 'url(/images/home/hot_renting2.jpg)'})
		$("#hotProperty").css({backgroundRepeat: 'no-repeat'});;
		$("#hotPropertyTab").css({background: 'url(/images/home/hot_renting_tab.png)'});
	});
	
	$("#buttonBuying").click(function () {
		$("#rentForm").hide();
		$("#homeIntroRenting").hide();
		$("#hotPropertyRenting").hide();
		$("#hotProperty").show();
		$("#buyForm").show();
		$("#homeIntro").show();
		$("#buttonRenting").css({backgroundPosition: '0px -31px'});
		$("#buttonBuying").css({backgroundPosition: '0px 0px'});
		$("#rentBuyWrapper").css({background: 'url(/images/home/buying_bg.jpg)'});
		$("#fld_rentbuy_submit").css({background: 'url(/images/home/button_search_buy.png)'});
		$("#fld_rentbuy_submit").css({backgroundRepeat: 'no-repeat'});
		$("#hotProperty").css({background: 'url(/images/home/hot_buying2.jpg)'});
		$("#hotProperty").css({backgroundRepeat: 'no-repeat'});
		$("#hotPropertyTab").css({background: 'url(/images/home/hot_buying_tab.png)'});
	});
	
	auctiontimer();

})
