
function findertool_email_submit(form)
{findertool_submit($(form).serialize(),true);}
function productfinder_flash_results(young_single,young_family,family_teen,downsize,entertaining,cooking,relaxing,parent_space,busy,first_home,build,houseland,readybuilt,perth,southwest,perth_north,perth_south,bedrooms,range_from,range_to)
{var form_post_string='young_single='+young_single+'&young_family='+young_family+'&family_teen='+family_teen+'&downsize='+downsize
+'&entertaining='+entertaining
+'&cooking='+cooking
+'&relaxing='+relaxing
+'&parent_space='+parent_space
+'&busy='+busy
+'&first_home='+first_home
+'&build='+build
+'&houseland='+houseland
+'&readybuilt='+readybuilt
+'&perth='+perth
+'&southwest='+southwest
+'&perth_north='+perth_north
+'&perth_south='+perth_south
+'&bedrooms='+bedrooms
+'&range_from='+range_from
+'&range_to='+range_to;findertool_submit(form_post_string,false);}
function findertool_submit(post_data,replace)
{$.post('/_product/findertool/?',post_data,function(data)
{$('#homeFinder').html(data);fixHeights();},'text');}
function findertool_load_flash()
{var flashvars={};var params={'wmode':'transparent'};var attributes={};swfobject.embedSWF("/Flash/home_finder_680x470.swf","home_finder_flash","680","470","9.0.0","http://media.dalealcock.com.au.s3.amazonaws.com/Flash/322_341_expressInstall.swf",flashvars,params);var image1=$('<img />').attr('src','http://media.dalealcock.com.au.s3.amazonaws.com/Images/Layout/finder/5749_16783_form_bg.jpg');}
var findertoolResultsPerRow=4;function fixProductRowHeight(rowNumber,ul)
{var productList=$('li:not(".ignore")',ul);var startIndex=(rowNumber-1)*findertoolResultsPerRow;var endIndex=startIndex+findertoolResultsPerRow;if(endIndex>productList.length)
{endIndex=productList.length;}
var maxHeight=0;var h3Height=0;for(var int=startIndex;int<endIndex;int++)
{var elementHeight=$('.shadow .prop_blurb p',productList[int]).height();if(elementHeight>maxHeight)
{maxHeight=elementHeight;}
var h3=$('.shadow h3',productList[int]).height();if(h3>h3Height)
{h3Height=h3;}}
for(var int=startIndex;int<endIndex;int++)
{$('.shadow .prop_blurb p',productList[int]).height(maxHeight+'px');$('.shadow h3',productList[int]).height(h3Height+'px');}
maxHeight=0;for(var int=startIndex;int<endIndex;int++)
{var elementHeight=$('.shadow .prop_blurb',productList[int]).height();if(elementHeight>maxHeight)
{maxHeight=elementHeight;}}
for(var int=startIndex;int<endIndex;int++)
{$('.shadow .prop_blurb',productList[int]).height(maxHeight+'px');}
if(typeof resize_shadows=='function')
{resize_shadows();}}
function fixHeights()
{if($('#recommended_area .rec_module_area ul li').length>4)
{fixProductRowHeight(1,$('#recommended_area .rec_module_area ul'));fixProductRowHeight(2,$('#recommended_area .rec_module_area ul'));}
else
{fixProductRowHeight(1,$('#recommended_area .rec_module_area ul'));fixProductRowHeight(1,$('#other_area .rec_module_area ul'));fixProductRowHeight(2,$('#other_area .rec_module_area ul'));}
moveRecommendedHomes();}
var movedHomes=false;function moveRecommendedHomes()
{if($('#recommended_area .rec_module_area ul li').length>4&&movedHomes==false)
{$('#recommended_area .rec_module_area ul li:gt(3)').css({marginTop:37});var li=$('<li class="ignore"></li>');li.append($('#other_area'));$('#recommended_area .rec_module_area ul').append(li);$('div#other_area').css({margin:0,paddingLeft:5});li.css({width:'auto'});$('#other_area .rec_module_area ul li').css({margin:0});movedHomes=true;}}