/*(c) Mindshelf 2010 All Rights Reserved.Web Framework- Core FunctionsNo unauthorised copying or editing without permissionAuthor ~ Matt Hallam*/$('.property_search').ready(function(){fixpagenumbers();});function fixpagenumbers(){$('.pages a').each(function(i,val){$('.pages a:eq('+i+')').click(function(){fetch_page($('.pages a:eq('+i+')').attr('href'));return false;});});$('select[name="order"]').bind('change',function(){_prc();if(pagination){pagination.abort();};var pagination=$.post('../../../../_rsc/search.mindshelf',{a:window['current_page'],order:$('select[name="order"]').val()},function(data){d=data.split("|HOAMZ_DATA|");if(d[0]=='_tp_pass'){if(d[1]!=$('.property_search').html()){$('.property_search').replaceWith(d[1]);fixPanel();fixpagenumbers();$.scrollTo('.righthandcontent',600);}_prc(true);}else{_prc(true);alert(data);}},'html');});};window['current_page']=1;function fetch_page(z){if(!z){z=window.location.href.split('#');window['z']=parseInt(z[z.length-1]);if(isNaN(window['z'])){return false;}}else{z=z.split('/');window['z']=parseInt(z[z.length-2]);}if(window['z']==''){return false;}page=window['z'];if(page!=window['current_page']){if(page=='/'||page==''||isNaN(page)){window['current_page']=1;return false;}else{window['current_page']=parseInt(page);}p=window.location.href.split("#");window.location.href=p[0]+"#"+window['current_page'];_prc();if(pagination){pagination.abort();};var pagination=$.post('../../../../_rsc/search.mindshelf',{a:window['current_page']},function(data){d=data.split("|HOAMZ_DATA|");if(d[0]=='_tp_pass'){if(d[1]!=$('.property_search').html()){$('.property_search').replaceWith(d[1]);fixPanel();fixpagenumbers();fixSearch();$.scrollTo('.hoamz-container',600);}_prc(true);}else{_prc(true);alert(data);}},'html');}};$('.property-search').ready(function(){setInterval("fetch_page(false);",2000);});