
var nameOrder=0;var ratingOrder=0;var sharedOrder=0;var privateOrder=0;var hasHovered=false;$(document).ready(function(){$("#currencyPicker").unbind();$("#currencyPicker").change(function(){var strSelecedCurrency=$("#currencyPicker").val();$("#strSelectedCurrencyCode").val(strSelecedCurrency);var strUrl=$(location).attr('href');strUrl=strUrl.replace(/\/price_min[^\/]*?\//i,"/");strUrl=strUrl.replace(/\/price_max[^\/]*?\//i,"/");$("#currencyForm").attr("action",strUrl);$("#currencyForm").submit();});$.tablesorter.addWidget({id:"repeatEmptyRows",format:function(table){$("#listView tr.listSpacer").remove();for(var i=table.tBodies[0].rows.length;i>=0;i--){$("tbody tr:eq("+i+")",table).after("<tr class=\"listSpacer\"><td colspan=\"19\"></td></tr>");}}});$("#listView").tablesorter({debug:false,headers:{6:{sorter:"hbpercent"},7:{sorter:"digit"},8:{sorter:"currency"},9:{sorter:"digit"},10:{sorter:"currency"},11:{sorter:"digit"}},widgets:['repeatEmptyRows'],disableHeaderLinks:true});Listing_sortDynamicSwitch("hb_sort_rating");$("#sortByPicker").val("hb_sort_rating");$("#sortByPicker").change(function(){Listing_sortDynamicSwitch($(this).val());return false;});$("tr.propertyRow").click(function(){});$("tr.propertyRow").css("cursor","pointer");$("tr.propertyRow").click(function(){window.location=$(this).find("a.propertyTitle").attr("href");return false;});$("td.name").hover(function(){if(!hasHovered){hasHovered=true;panMap($(this).attr("data-id"));}},function(){if(hasHovered){hasHovered=false;}});});function Listing_sortDynamicSwitch(sortOrder)
{switch(sortOrder)
{case"hb_sort_sharedprice_asc":var intPrimarySortCol=11;var intPrimarySortDir=0;var intSecondarySortCol=10;var intSecondarySortDir=0;var sorting=[[intPrimarySortCol,intPrimarySortDir],[intSecondarySortCol,intSecondarySortDir]];break;case"hb_sort_sharedprice_des":var intPrimarySortCol=11;var intPrimarySortDir=0;var intSecondarySortCol=10;var intSecondarySortDir=1;var sorting=[[intPrimarySortCol,intPrimarySortDir],[intSecondarySortCol,intSecondarySortDir]];break;case"hb_sort_privateprice_asc":var intPrimarySortCol=9;var intPrimarySortDir=0;var intSecondarySortCol=8;var intSecondarySortDir=0;var sorting=[[intPrimarySortCol,intPrimarySortDir],[intSecondarySortCol,intSecondarySortDir]];break;case"hb_sort_privateprice_des":var intPrimarySortCol=9;var intPrimarySortDir=0;var intSecondarySortCol=8;var intSecondarySortDir=1;var sorting=[[intPrimarySortCol,intPrimarySortDir],[intSecondarySortCol,intSecondarySortDir]];break;case"hb_sort_rating":var intPrimarySortCol=7;var intPrimarySortDir=0;var intSecondarySortCol=6;var intSecondarySortDir=1;var sorting=[[intPrimarySortCol,intPrimarySortDir],[intSecondarySortCol,intSecondarySortDir]];break;case"hb_sort_propertyname":var intPrimarySortCol=5;var intPrimarySortDir=0;var sorting=[[intPrimarySortCol,intPrimarySortDir]];break;}
$("#listView").trigger("sorton",[sorting]);return false;}
function getBubbleContent(intPropertyID){var $propertyRow=$('#prop_'+intPropertyID);var objBubbleContent=new Object();objBubbleContent.strPropertyName=$propertyRow.find("a.propertyTitle").html();objBubbleContent.strPropertyURL=$propertyRow.find("a.propertyTitle").attr("href");objBubbleContent.strAverageRating=$.trim($propertyRow.find("td.rating").html());objBubbleContent.strSharedFromPrice=$.trim($propertyRow.find("td.shared").attr("data-formatedcurrency");objBubbleContent.strPrivateFromPrice=$.trim($propertyRow.find("td.private").attr("data-formatedcurrency");objBubbleContent.strImageURL=$propertyRow.find("td.strMainImage").html();objBubbleContent.strCurrencyCode=$propertyRow.find("span.hiddenCurrency").html();return objBubbleContent;}

