function rightmove_autocomplete_filterOutNonMatchingLocations(a,d,h){return jQuery.grep(a,function(a){if(h&&a.locationIdentifier.match(/^USERDEFINEDAREA/))return!1;if(!a.displayName)return!1;return RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(a.displayName).indexOf(d)===0})}
function rightmove_autocomplete_getMatchingRegionIds(a){var a=RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(a),d=RIGHTMOVE.UTIL.typeAheadPersister.getHistory(a),d=rightmove_autocomplete_filterOutNonMatchingLocations(d,a),a=jQuery.grep(d,function(a){return a.locationIdentifier&&a.locationIdentifier.match(/^REGION/)});return jQuery.map(a,function(a){return a.locationIdentifier.substring(7,a.locationIdentifier.length)})}
(function(a){function d(a){return a.length<=2||a.match(/^[a-zA-Z]{1,2}[0-9].*$/)}function h(){return{itemLengthLimit:35,delay:1,width:300,minChars:1,max:10,scroll:!1,selectFirst:!1,matchSubset:!1,extraParams:!1,mustMatch:!1,cacheLength:100,formatItem:function(a,o,b,e,c,i){o=RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(c);b=RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(a);i=i.itemLengthLimit;if(b.indexOf(o)===0){if(a.length>i)return a.substr(0,i)+"...";return a}return!1},formatMatch:function(){return!1},parse:function(a,
o){var b=[],e=eval(a);if(e){var e=e.typeAheadLocations,c,i,q;c=RIGHTMOVE.UTIL.typeAheadPersister;q=RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(o);var d=c.getHistory(o),d=rightmove_autocomplete_filterOutNonMatchingLocations(d,q,this.excludeUserDefined);for(c=0;c<d.length;c++)d[c].historical=!0;if(e){e=rightmove_autocomplete_filterOutNonMatchingLocations(e,q,this.excludeUserDefined);for(c=0;c<e.length;c++){q=e[c];var f=!0;for(i=0;i<d.length;i++)q.locationIdentifier==d[i].locationIdentifier&&(f=!1);f&&
d.push(q)}}if(e=d){d=-1;for(c=0;c<e.length;c++)if(q=e[c])b[b.length]={data:q.displayName,value:q.locationIdentifier,result:q.displayName,historical:q.historical===!0},q.historical===!0&&(d=c);if(d>-1)b[d].lastHistorical=!0}}return b},highlight:function(a,o){var d=RIGHTMOVE.UTIL.typeAheadUtil.replaceWeirdCharsWithSpace(o.toUpperCase());b(d)&&(d=c(d,a,b));f(d)&&(d=c(d,a,f));d=RIGHTMOVE.UTIL.typeAheadUtil.getHighlightToLength(a,d);return"<span class='highlightLetter'>"+a.substr(0,d)+"</span>"+a.substr(d,
a.length)}}}function f(a){a=a.toUpperCase();if(a.indexOf("&")!=-1)return" & ";if(a.indexOf(" AND ")!=-1)return" AND "}function b(a){for(var a=a.toUpperCase(),b=["ST. ","ST.","ST ","SAINT.","SAINT "],c=[" ST. "," ST "," SAINT. "," SAINT "],e=0;e<=b.length;e++)if(a.indexOf(b[e])===0)return b[e];for(e=0;e<=c.length;e++)if(a.indexOf(c[e])!=-1)return c[e];return null}function c(a,b,c){var e=c(a),b=c(b.toUpperCase());if(b!=e)return a.replace(e,b);return a}a.fn.extend({rightmoveautocomplete:function(k,b,
c){var e=h(),d=typeof k=="string",e=a.extend({},a.Autocompleter.defaults,{url:d?k:null,data:d?null:k,delay:d?a.Autocompleter.defaults.delay:10,delay:d?a.Autocompleter.defaults.delay:10,max:e&&!e.scroll?10:150},e);e.highlight=e.highlight||function(a){return a};e.formatMatch=e.formatMatch||e.formatItem;e.excludeUserDefined=c;return this.each(function(){autoCompleter=new a.Autocompleter(this,e,b)})},result:function(a){return this.bind("result",a)},search:function(a){return this.trigger("search",[a])},
flushCache:function(){return this.trigger("flushCache")},setOptions:function(a){return this.trigger("setOptions",[a])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(b,c,f){function e(){var a=n.selected();if(!a)return!1;var b=a.result;u=b;if(c.multiple){var k=i(j.val());k.length>1&&(b=k.slice(0,k.length-1).join(c.multipleSeparator)+c.multipleSeparator+b);b+=c.multipleSeparator}j.val(b);z();j.trigger("result",[a.data,a.value]);return!0}function g(a,b){if(p==
m.DEL)n.hide();else{var k=j.val();if(b||k!=u)u=k,k=q(k),k.length>=c.minChars?(j.addClass(c.loadingClass),c.matchCase||(k=k.toLowerCase()),A(k,h,z)):(j.removeClass(c.loadingClass),n.hide())}}function i(b){if(!b)return[""];var b=b.split(c.multipleSeparator),k=[];a.each(b,function(c,b){a.trim(b)&&(k[c]=a.trim(b))});return k}function q(a){if(!c.multiple)return a;a=i(a);return a[a.length-1]}function z(){var e=n.visible();n.hide();clearTimeout(l);j.removeClass(c.loadingClass);c.mustMatch&&j.search(function(a){a||
(c.multiple?(a=i(j.val()).slice(0,-1),j.val(a.join(c.multipleSeparator)+(a.length?c.multipleSeparator:""))):j.val(""))});e&&a.Autocompleter.Selection(b,b.value.length,b.value.length)}function h(e,t){if(t&&t.length&&r){j.removeClass(c.loadingClass);n.display(t,e);var g=t[0].value;c.autoFill&&q(j.val()).toLowerCase()==e.toLowerCase()&&p!=m.BACKSPACE&&(j.val(j.val()+g.substring(q(u).length)),a.Autocompleter.Selection(b,u.length,u.length+g.length));n.show()}else z(),n.display(t,e),d(e)||n.show()}function A(e,
d,t){var g=e;c.matchCase||(g=g.toUpperCase());g=RIGHTMOVE.UTIL.typeAheadUtil.convertTerm(g);g!=null&&g.length<1&&t(e);var i=v.load(g);i?d(e,c.parse(i,e,j)):typeof c.url=="string"&&c.url.length>0?a.ajax({mode:"abort",port:"autocomplete"+b.name,dataType:c.dataType,url:c.url,data:a.extend({q:q(g)},{}),success:function(a){var b=c.parse(a,e,j);v.add(g,a);d(e,b)}}):(n.emptyList(),t(e))}var m={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},j=a(b).attr("autocomplete",
"off").addClass(c.inputClass),l,s,u="",v=a.Autocompleter.Cache(c),r=0,p,w={mouseDownOnSelect:!1},n=a.Autocompleter.Select(c,b,e,w,f),t;a.browser.opera&&a(b.form).bind("submit.autocomplete",function(){if(t)return t=!1});j.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(b){p=b.keyCode;switch(b.keyCode){case m.UP:b.preventDefault();n.visible()?n.prev(s):g(0,!0);break;case m.DOWN:b.preventDefault();n.visible()?n.next(s):g(0,!0);break;case m.PAGEUP:b.preventDefault();n.visible()?n.pageUp(s):
g(0,!0);break;case m.PAGEDOWN:b.preventDefault();n.visible()?n.pageDown(s):g(0,!0);break;case c.multiple&&a.trim(c.multipleSeparator)==","&&m.COMMA:case m.TAB:case m.RETURN:if(e())return b.preventDefault(),t=!0,!1;break;case m.ESC:n.hide();break;default:clearTimeout(l),l=setTimeout(function(){n.resetSelectedCounter();s=j.val();g()},c.delay)}}).focus(function(){r++}).blur(function(){r=0;w.mouseDownOnSelect||(clearTimeout(l),l=setTimeout(z,200))}).click(function(){r++>1&&!n.visible()&&g(0,!0)}).bind("hideAutoComplete",
function(){clearTimeout(l);l=setTimeout(z,200)}).bind("search",function(){function b(a,k){var e;if(k&&k.length)for(var d=0;d<k.length;d++)if(k[d].result.toLowerCase()==a.toLowerCase()){e=k[d];break}typeof c=="function"?c(e):j.trigger("result",e&&[e.data,e.value])}var c=arguments.length>1?arguments[1]:null;a.each(i(j.val()),function(a,c){A(c,b,b)})}).bind("flushCache",function(){v.flush()}).bind("setOptions",function(b,k){a.extend(c,k);"data"in k&&v.populate()}).bind("unautocomplete",function(){n.unbind();
j.unbind();a(b.form).unbind(".autocomplete")})};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(a){return a[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(a,b){return a.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,
"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180};a.Autocompleter.Cache=function(b){function c(a,d){i>b.cacheLength&&e();g[a]||i++;g[a]=d}function d(){if(!b.data)return!1;var e={},g=0;if(!b.url)b.cacheLength=1;e[""]=[];for(var i=0,f=b.data.length;i<f;i++){var m=b.data[i],m=typeof m=="string"?[m]:m,j=b.formatMatch(m,i+1,b.data.length);if(j!==!1){var l=j.charAt(0).toLowerCase();e[l]||(e[l]=[]);m={value:j,data:m,result:b.formatResult&&b.formatResult(m)||j};e[l].push(m);
g++<b.max&&e[""].push(m)}}a.each(e,function(a,e){b.cacheLength++;c(a,e)})}function e(){g={};i=0}var g={},i=0;setTimeout(d,25);return{flush:e,add:c,populate:d,load:function(a){if(!b.cacheLength||!i)return null;if(g[a])return g[a];else{for(var a=a.substr(0,a.length-1),c;a.length>=b.minChars;){if(c=g[a])if(eval(c).isComplete)return c;else break;a=a.substr(0,a.length-1)}return null}}}};a.Autocompleter.Select=function(b,c,f,e,g){function i(){v&&(r=a("<div/>").hide().addClass(b.resultsClass).css("position",
"absolute").appendTo(document.body),a.browser.msie&&parseInt(a.browser.version)==6&&r.append("<iframe></iframe>"),p=a("<ul id='typeAheadResult'  />").appendTo(r).mouseover(function(a){n&&h(a).nodeName&&h(a).nodeName.toUpperCase()=="LI"&&q(a,p)}).mousemove(function(a){!n&&h(a).nodeName&&h(a).nodeName.toUpperCase()=="LI"&&(q(a,p),n=!0)}).click(function(b){a(h(b)).addClass(m.ACTIVE);if(a(h(b))[0].id=="moreLink")return!0;f();c.focus();return!1}).mousedown(function(){e.mouseDownOnSelect=!0}).mouseup(function(){e.mouseDownOnSelect=
!1}),b.width>0&&r.css("width",b.width),v=!1)}function q(b,c){l=a("li",c).removeClass(m.ACTIVE).index(h(b));a(h(b)).addClass(m.ACTIVE)}function h(a){for(a=a.target;a&&a.tagName!="LI";)a=a.parentNode;if(!a)return[];return a}function x(e,d){var g;j.slice(l,l+1).removeClass(m.ACTIVE);l+=e;l<-1?l=j.size()-1:l>=j.size()&&(l=-1);var i;l===-1?i=d:(g=j.slice(l,l+1).addClass(m.ACTIVE),i=w[l].data);a(c).attr("value",i);if(b.scroll){var f=0;j.slice(0,l).each(function(){f+=this.offsetHeight});f+g[0].offsetHeight-
p.scrollTop()>p[0].clientHeight?p.scrollTop(f+g[0].offsetHeight-p.innerHeight()):f<p.scrollTop()&&p.scrollTop(f)}}function A(){n=!1;p.empty();var c=b.max&&b.max<s.length?b.max:s.length,e=!0,i;w=[];for(i=0;i<c;i++)if(s[i]){var f=b.formatItem(s[i].data,i+1,c,s[i].value,u,b);f!==!1&&(e=!1,f=a("<li/>").html(b.highlight(f,u)).addClass(i%2==0?"ac_even":"ac_odd"),s[i].historical&&f.addClass("ac_hist"),s[i].lastHistorical&&f.addClass("ac_lasthist"),f=f.appendTo(p)[0],a.data(f,"ac_data",s[i]),w[w.length]=
s[i])}j=p.find("li");b.selectFirst&&(j.slice(0,1).addClass(m.ACTIVE),l=0);e?(f=null,d(u)||(f=a("<li class='nomatch'>no matches found</li>").addClass(i%2==0?"ac_even":"ac_odd").appendTo(p)[0],a.data(f,"ac_data",null))):i===10&&(c=a("<li id ='moreLink'></li>").html("<a class='more' href='#'>More...</a>").addClass(i%2==0?"ac_even":"ac_odd").appendTo(p)[0],a.data(c,"ac_data",null),a("#moreLink").click(function(){return g.submit()}));a.fn.bgiframe&&p.bgiframe()}var m={ACTIVE:"ac_over"},j,l=-1,s,u="",v=
!0,r,p,w,n=!1;return{display:function(a,b){i();s=a;u=b;A()},next:function(a){x(1,a)},prev:function(a){x(-1,a)},pageUp:function(a){l!=0&&l-8<0?x(-l,a):x(-8,a)},pageDown:function(a){l!=j.size()-1&&l+8>j.size()?x(j.size()-1-l,a):x(8,a)},hide:function(){r&&r.hide();j&&j.removeClass(m.ACTIVE);l=-1},visible:function(){return r&&r.is(":visible")},current:function(){return this.visible()&&(j.filter("."+m.ACTIVE)[0]||b.selectFirst&&j[0])},show:function(){var e=a(c).offset();r.css({width:typeof b.width=="string"||
b.width>0?b.width:a(c).width(),top:e.top+c.offsetHeight,left:e.left}).show();if(b.scroll&&(p.scrollTop(0),p.css({maxHeight:b.scrollHeight,overflow:"auto"}),a.browser.msie&&typeof document.body.style.maxHeight==="undefined")){var d=0;j.each(function(){d+=this.offsetHeight});e=d>b.scrollHeight;p.css("height",e?b.scrollHeight:d);e||j.width(p.width()-parseInt(j.css("padding-left"))-parseInt(j.css("padding-right")))}},selected:function(){var b=j&&j.filter("."+m.ACTIVE).removeClass(m.ACTIVE);return b&&
b.length&&a.data(b[0],"ac_data")},emptyList:function(){p&&p.empty()},unbind:function(){r&&r.remove()},resetSelectedCounter:function(){l=-1}}};a.Autocompleter.Selection=function(a,b,c){if(a.createTextRange){var e=a.createTextRange();e.collapse(!0);e.moveStart("character",b);e.moveEnd("character",c);e.select()}else if(a.setSelectionRange)a.setSelectionRange(b,c);else if(a.selectionStart)a.selectionStart=b,a.selectionEnd=c;a.focus()}})(jQuery);
(function(){RIGHTMOVE.namespace("RIGHTMOVE.DRILLDOWN").regionDrilldown=function(){var a,d=function(a,b){a.each(function(){var a=$("#"+b+"Hoverover");$(this).mouseover(function(){a.css("visibility","visible")});$(this).mouseout(function(){a.css("visibility","hidden")})});return this},h=function(){$(".maplabelpopup").each(function(){var a=$(this),b=a.find(".popup"),c=b.width(),d=a.width();a.hoverIntent(function(){$(this).css("z-index","3");a.css("width",c>d?c:d);b.fadeIn(500)},function(){$(this).css("z-index",
"1");b.fadeOut(200,function(){a.css("width",d)})})});return this};return{init:function(f){a=f;h();for(f=0;f<a.childRegions.length;f++){var b=a.childRegions[f];d($(".highlightMapRegion"+b.regionId),b.regionId)}$(".sidemenu").hoverAccordion({keepheight:"false"})}}}()})();
(function(a,d){function h(b,c){var d=b.nodeName.toLowerCase();if("area"===d){var d=b.parentNode,o=d.name;if(!b.href||!o||d.nodeName.toLowerCase()!=="map")return!1;d=a("img[usemap=#"+o+"]")[0];return!!d&&f(d)}return(/input|select|textarea|button|object/.test(d)?!b.disabled:"a"==d?b.href||c:c)&&f(b)}function f(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=
this;setTimeout(function(){a(d).focus();c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,
"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(b){if(b!==d)return this.css("zIndex",b);if(this.length)for(var b=a(this[0]),c;b.length&&b[0]!==document;){c=b.css("position");if(c==="absolute"||c==="relative"||c==="fixed")if(c=parseInt(b.css("zIndex"),10),!isNaN(c)&&c!==0)return c;b=b.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(b,c){function k(b,c,e,d){a.each(f,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0;e&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0);d&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var f=c==="Width"?["Left","Right"]:["Top","Bottom"],h=c.toLowerCase(),e={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,
outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){if(b===d)return e["inner"+c].call(this);return this.each(function(){a(this).css(h,k(this,b)+"px")})};a.fn["outer"+c]=function(b,d){if(typeof b!=="number")return e["outer"+c].call(this,b);return this.each(function(){a(this).css(h,k(this,b,!0,d)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return h(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var c=a.attr(b,
"tabindex"),d=isNaN(c);return(d||c>=0)&&h(b,!d)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=c.offsetHeight===100;a.support.selectstart="onselectstart"in c;b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var b=a.ui[b].prototype,f;for(f in d)b.plugins[f]=b.plugins[f]||[],b.plugins[f].push([c,d[f]])},call:function(a,c,d){if((c=a.plugins[c])&&
a.element[0].parentNode)for(var f=0;f<c.length;f++)a.options[c[f][0]]&&c[f][1].apply(a.element,d)}},contains:function(a,c){return document.compareDocumentPosition?a.compareDocumentPosition(c)&16:a!==c&&a.contains(c)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",f=!1;if(b[d]>0)return!0;b[d]=1;f=b[d]>0;b[d]=0;return f},isOverAxis:function(a,c,d){return a>c&&a<c+d},isOver:function(b,c,d,f,h,e){return a.ui.isOverAxis(b,d,h)&&a.ui.isOverAxis(c,
f,e)}}))})(jQuery);
(function(a){a.fn.hoverAccordion=function(d){function h(b){a(b).html()==void 0&&(b=this);if(!f.is(":animated")){var c=a(b).parent().children("ul"),b=a(b).parent().parent().children("li").children("ul:visible");thisheight=d.keepheight=="true"?o:c.height();c.is(":visible")||(c.children().hide(),c.animate({height:thisheight},{step:function(a){c.height(thisheight-a)},duration:d.speed}).children().show(),b.animate({height:"hide"},{step:function(a){c.height(thisheight-a)},duration:d.speed}).children().hide(),b.parent().children("a").addClass(d.closed).removeClass(d.opened),
c.parent().children("a").addClass(d.opened).removeClass(d.closed))}}var d=jQuery.extend({speed:"fast",activateitem:"true",active:"active",header:"header",hover:"hover",opened:"opened",closed:"closed",keepheight:"true"},d),f=this,b=window.location.href,c=0,k=0,o=0;a(this).children("li").each(function(){var f=a(this);k++;var e=f.children("a");if(e.length>0){e.hover(function(){a(this).addClass(d.hover)},function(){a(this).removeClass(d.hover)});var g=e.attr("href");g=="#"?e.click(function(){h(this);
this.blur();return!1}):d.activateitem=="true"&&b.indexOf(g)>0&&b.length-b.lastIndexOf(g)==g.length&&e.parent().addClass(d.active)}g=f.children("ul");g.length>0&&(o<g.height()&&(o=g.height()),g.children("li."+d.active).parent().parent().children("a").addClass(d.header),e.hover(function(){var a=this;c=setInterval(function(){h(a);clearInterval(c)},400)},function(){clearInterval(c)}),d.activateitem=="true"?g.children("li").each(function(){var c=a(this).children("a").attr("href");c&&b.indexOf(c)>0&&b.length-
b.lastIndexOf(c)==c.length&&a(this).addClass(d.active).parent().parent().children("a").addClass(d.opened)}):parseInt(d.activateitem)==k&&f.addClass(d.active).children("a").addClass(d.opened));g.not(a(this).parent().children("li."+d.active).children("ul")).not(g.children("li."+d.active).parent()).hide().parent().children("a").addClass(d.closed)});return this}})(jQuery);
(function(a){a.fn.hoverIntent=function(d,h){var f={sensitivity:7,interval:100,timeout:0},f=a.extend(f,h?{over:d,out:h}:d),b,c,k,o,y=function(a){b=a.pageX;c=a.pageY},e=function(d,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);if(Math.abs(k-b)+Math.abs(o-c)<f.sensitivity)return a(g).unbind("mousemove",y),g.hoverIntent_s=1,f.over.apply(g,[d]);else k=b,o=c,g.hoverIntent_t=setTimeout(function(){e(d,g)},f.interval)},g=function(b){for(var c=(b.type=="mouseover"?b.fromElement:b.toElement)||b.relatedTarget;c&&
c!=this;)try{c=c.parentNode}catch(d){c=this}if(c==this)return!1;var g=jQuery.extend({},b),h=this;if(h.hoverIntent_t)h.hoverIntent_t=clearTimeout(h.hoverIntent_t);if(b.type=="mouseover"){if(k=g.pageX,o=g.pageY,a(h).bind("mousemove",y),h.hoverIntent_s!=1)h.hoverIntent_t=setTimeout(function(){e(g,h)},f.interval)}else if(a(h).unbind("mousemove",y),h.hoverIntent_s==1)h.hoverIntent_t=setTimeout(function(){h.hoverIntent_t=clearTimeout(h.hoverIntent_t);h.hoverIntent_s=0;f.out.apply(h,[g])},f.timeout)};return this.mouseover(g).mouseout(g)}})(jQuery);
jQuery.fn.addSearchLocationEvent=function(a){var d,h,f=this.find("input[name=locationIdentifier]",this),b=this.find("input[name=useLocationIdentifier]",this),c=this.find("input[name=searchLocation]",this),k=this,o=null,y=function(){if(c[0])if(jQuery.trim(c.val()).length<2)return a||alert("Please enter an area, postcode or train station."),!0;else if(jQuery.trim(c.val()).match(/([a-zA-Z0-9])*([a-zA-Z0-9])([a-zA-Z0-9])*/)){if(jQuery.trim(c.val()).length>200)return a||alert("Please enter an area, postcode or train station."),
!0}else return a||alert("Please enter an area, postcode or train station."),!0;return!1};this.submit(function(){var a;if(y())a=!1;else{if(c.val()===h)f.val(d),b.val("true");else if(b.val("false"),a=rightmove_autocomplete_getMatchingRegionIds(c.val()),a.length>0&&$("<input />").attr("type","hidden").attr("name","topMatchPersistRegIds").attr("value",a.join(",")).appendTo(k),a=RIGHTMOVE.UTIL.typeAheadPersister.getLatestItemFromHistory(),a!==null){var g=$("#lastPersistLocId");g.length===0?$("<input />").attr("type",
"hidden").attr("id","lastPersistLocId").attr("name","lastPersistLocId").attr("value",a.locationIdentifier).appendTo(k):g.val(a.locationIdentifier)}a=!0}if(a){a=RIGHTMOVE.UTIL.parseUrl(this.action);if(a.path.indexOf("/search.html")===0)a.path=(o=="To Rent"||o=="RENT"?"/property-to-rent":"/property-for-sale")+a.path,this.action=RIGHTMOVE.UTIL.buildUrl(a);return!0}else return!1});$("input[type=submit]",this).click(function(){o=this.value});c.result(function(a,b,c){d=c;h=b})};
(function(){RIGHTMOVE.namespace("RIGHTMOVE.JOBSFEED").xmlfeed=function(){return{init:function(a,d){$.ajax({type:"GET",url:"/jobsfeed?q="+a,dataType:"json",success:function(h){$("#jobsSection").html("");var f="";$.each(h.jobSpecs,function(b,c){b===0&&$("#jobsarea").slideDown();f=a;a.indexOf(",")>0&&(f=a.substring(0,a.indexOf(",")));if(b<d){var h="";c.salary!==""&&(h="<br/>"+c.salary);var o="reedJobSpec"+b;$("#jobsSection").append('<li><a id="'+o+'" href="'+c.linkURL+'" target="_blank" rel="nofollow">'+
c.jobTitle+"</a><br/>"+c.jobLocation+h+"</li>");RIGHTMOVE.UTIL.analytics.trackEventOnClick("#"+o,"drilldown","reedlinks",f)}});f==="London"&&RIGHTMOVE.UTIL.analytics.trackEventOnClick("#LondonReedLink","drilldown","reedlinks-jobs-in",f)}})}}}()})();
(function(){var a=RIGHTMOVE.namespace("RIGHTMOVE.HOUSEPRICES");a.checkAnyPostcode=function(){return a.checkSearchLocationToRegEx(/^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9]$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9][a-zA-Z]$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9][a-zA-Z][a-zA-Z]$/,'Please enter a full or partial postcode in Great Britain, e.g."MK6", "MK6 1", "MK6 1A" or "MK6 1AJ"')};a.checkPostcodeOrOutcode=function(){return a.checkSearchLocationToRegEx(/^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9](\s)*$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9][a-zA-Z](\s)*$|^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9][a-zA-Z][a-zA-Z](\s)*$/,
'Please enter a full or partial postcode in Great Britain, e.g."MK6" or "MK6 1AJ"')};a.checkFullPostcode=function(){return a.checkSearchLocationToRegEx(/^[a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?(\s)*[0-9][a-zA-Z][a-zA-Z]$|^BFPO(\s)*[0-9]{1,4}$/,'Please enter a full postcode in Great Britain, e.g."MK6 1AJ"')};a.checkSearchLocationToRegEx=function(a,h){if(!jQuery.trim($("#searchLocation").val()).match(a))return alert(h),!1;return!0};a.checkMapButton=function(){$("#showMapView").val("showMapView");return $("#showMapView").click}})();

