/*smoothscroll*/
$(document).ready(function(){$("a[href*=#]").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var a=$(this.hash);a=a.length&&a||$("[name="+this.hash.slice(1)+"]");if(a.length){var b=a.offset().top;$("html,body").animate({scrollTop:b},1000);return false}}})});
/*innerfade*/
(function(a){a.fn.innerfade=function(b){return this.each(function(){a.innerfade(this,b)})};a.innerfade=function(b,c){var e={animationtype:"fade",speed:"normal",type:"sequence",timeout:2000,containerheight:"auto",runningclass:"innerfade",children:null};if(c){a.extend(e,c)}if(e.children===null){var g=a(b).children()}else{var g=a(b).children(e.children)}if(g.length>1){a(b).css("position","relative").css("height",e.containerheight).addClass(e.runningclass);for(var d=0;d<g.length;d++){a(g[d]).css("z-index",String(g.length-d)).css("position","absolute").hide()}if(e.type=="sequence"){setTimeout(function(){a.innerfade.next(g,e,1,0)},e.timeout);a(g[0]).show()}else{if(e.type=="random"){var f=Math.floor(Math.random()*(g.length));setTimeout(function(){do{h=Math.floor(Math.random()*(g.length))}while(f==h);a.innerfade.next(g,e,h,f)},e.timeout);a(g[f]).show()}else{if(e.type=="random_start"){e.type="sequence";var h=Math.floor(Math.random()*(g.length));setTimeout(function(){a.innerfade.next(g,e,(h+1)%g.length,h)},e.timeout);a(g[h]).show()}else{alert("Innerfade-Type must either be 'sequence', 'random' or 'random_start'")}}}}};a.innerfade.next=function(d,b,e,c){if(b.animationtype=="slide"){a(d[c]).slideUp(b.speed);a(d[e]).slideDown(b.speed)}else{if(b.animationtype=="fade"){a(d[c]).fadeOut(b.speed);a(d[e]).fadeIn(b.speed,function(){removeFilter(a(this)[0])})}else{alert("Innerfade-animationtype must either be 'slide' or 'fade'")}}if(b.type=="sequence"){if((e+1)<d.length){e=e+1;c=e-1}else{e=0;c=d.length-1}}else{if(b.type=="random"){c=e;while(e==c){e=Math.floor(Math.random()*d.length)}}else{alert("Innerfade-Type must either be 'sequence', 'random' or 'random_start'")}}setTimeout((function(){a.innerfade.next(d,b,e,c)}),b.timeout)}})(jQuery);function removeFilter(a){if(a.style.removeAttribute){a.style.removeAttribute("filter")}};
/*fancybox*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';(7($){$.9.29=7(){v G.2u(7(){c 1i=$(G).o(\'2C\');6(1i.W(/^3d\\(["\']?(.*\\.2i)["\']?\\)$/i)){1i=3f.$1;$(G).o({\'2C\':\'3h\',\'3w\':"3v:3r.3u.3L(3M=D, 41="+($(G).o(\'3Z\')==\'23-3W\'?\'3T\':\'35\')+", O=\'"+1i+"\')"}).2u(7(){c 10=$(G).o(\'10\');6(10!=\'2s\'&&10!=\'2h\')$(G).o(\'10\',\'2h\')})}})};c 1W,4,L=C,q=1r 1s,1v,1p=1,1u=/\\.(31|2N|2i|30|3j)(.*)?$/i;c 1c=($.2g.3m&&22($.2g.3a.38(0,1))<8);$.9.b=7(V){V=$.3k({},$.9.b.26,V);c S=G;7 24(){1W=G;4=V;2f();v C};7 2f(){6(L)v;6($.2E(4.1U)){4.1U()}4.l=[];4.f=0;6(V.l.Q>0){4.l=V.l}s{c 1h={};3c(c i=0;i<S.Q;i++){1h={d:S[i].d,19:S[i].19};6($(S[i]).2d("1G:2e").Q){1h.11=$(S[i]).2d("1G:2e")}4.l.3g(1h)}}3o(4.l[4.f].d!=1W.d){4.f++}6(4.1Y){6(1c){$(\'1L, 1M, 1O\').o(\'1N\',\'3l\')}$("#1z").o(\'1V\',4.2c).I()}X()};7 X(){$("#16, #1g, #Y, #y").U();c d=4.l[4.f].d;6(d.W(/#/)){c 1j=1m.3i.d.34(\'#\')[0];1j=d.3p(1j,\'\');17(\'<5 j="2Q">\'+$(1j).n()+\'</5>\',4.1w,4.1x)}s 6(d.W(1u)){q=1r 1s;q.O=d;6(q.2P){1P()}s{$.9.b.2G();$(q).F().Z(\'2O\',7(){$(".z").U();1P()})}}s 6(d.W("15")){17(\'<15 j="2B" 2L="$.9.b.2n()" 2M="2S\'+t.N(t.33()*2U)+\'" 1Z="0" 32="0" O="\'+d+\'"></15>\',4.1w,4.1x)}s{$.2Z(d,7(2j){17(\'<5 j="2Y">\'+2j+\'</5>\',4.1w,4.1x)})}};7 1P(){6(4.28){c w=$.9.b.1a();c r=t.1Q(t.1Q(w[0]-36,q.g)/q.g,t.1Q(w[1]-47,q.h)/q.h);c g=t.N(r*q.g);c h=t.N(r*q.h)}s{c g=q.g;c h=q.h}17(\'<1G 3U="" j="3V" O="\'+q.O+\'" />\',g,h);2k()};7 2k(){6((4.l.Q-1)>4.f){c d=4.l[4.f+1].d;6(d.W(1u)){1t=1r 1s();1t.O=d}}6(4.f>0){c d=4.l[4.f-1].d;6(d.W(1u)){1t=1r 1s();1t.O=d}}};7 17(1f,g,h){c w=$.9.b.1a();c 2b=(g+36)>w[0]?w[2]:(w[2]+t.N((w[0]-g-36)/2));c 2l=(h+1o)>w[1]?w[3]:(w[3]+t.N((w[1]-h-1o)/2));c H={\'E\':2b,\'A\':2l,\'g\':g+\'K\',\'h\':h+\'K\'};6($("#m").1H(":13")){6(g==$("#u").g()&&h==$("#u").h()){$("#u").1R("1b",7(){$("#u").1l().1q($(1f)).1K("1b",7(){1e()})})}s{$("#u").1R("1b",7(){$("#u").1l();$("#m").1S(H,4.2m,4.2p,7(){$("#u").1q($(1f)).1K("1b",7(){1e()})})})}}s{6(4.1F>0&&4.l[4.f].11!==1B){$("#u").1l().1q($(1f));c J=4.l[4.f].11;c T=$.9.b.1D(J);$("#m").o({\'E\':(T.E-18)+\'K\',\'A\':(T.A-18)+\'K\',\'g\':$(J).g(),\'h\':$(J).h()});L=D;6(4.1C){H.1V=\'I\'}$("#m").1S(H,4.1F,4.2o,7(){1e()})}s{$("#u").1l().1q($(1f));L=D;$("#m").o(H).1K("43",7(){1e()})}}};7 21(){6(4.f!=0){$("#1g, #2v").F().Z("P",7(e){e.2r();4.f--;X();v C});$("#1g").I()}6(4.f!=(4.l.Q-1)){$("#16, #2z").F().Z("P",7(e){e.2r();4.f++;X();v C});$("#16").I()}};7 1e(){21();$(M).1n(7(e){6(e.1I==27){$.9.b.14();$(M).F("1n")}s 6(e.1I==37&&4.f!=0){4.f--;X();$(M).F("1n")}s 6(e.1I==39&&4.f!=(4.l.Q-1)){4.f++;X();$(M).F("1n")}});6(4.2J){$(1m).Z("3y 3z",$.9.b.2a)}s{$("5#m").o("10","2s")}6(4.2K){$("#1A").P($.9.b.14)}s{$("#1A").F()}$("#Y").I();6(4.l[4.f].19!==1B&&4.l[4.f].19.Q>0){$(\'#y 5\').n(4.l[4.f].19);$(\'#y\').I()}6(4.1Y&&1c){$(\'#u\').3t(\'1L, 1M, 1O\').o(\'1N\',\'13\')}L=C};v G.F(\'P\').P(24)};$.9.b.2a=7(){c k=$.9.b.1a();$("#m").o(\'E\',(($("#m").g()+36)>k[0]?k[2]:k[2]+t.N((k[0]-$("#m").g()-36)/2)));$("#m").o(\'A\',(($("#m").h()+1o)>k[1]?k[3]:k[3]+t.N((k[1]-$("#m").h()-1o)/2)))};$.9.b.1d=7(x,20){v 22($.3I(x.3J?x[0]:x,20,D))||0};$.9.b.1D=7(x){c k=x.3K();k.A+=$.9.b.1d(x,\'3H\');k.A+=$.9.b.1d(x,\'3G\');k.E+=$.9.b.1d(x,\'3C\');k.E+=$.9.b.1d(x,\'3F\');v k};$.9.b.2n=7(){$(".z").U();$("#2B").I()};$.9.b.1a=7(){v[$(1m).g(),$(1m).h(),$(M).3B(),$(M).3A()]};$.9.b.2A=7(){6(!$("#z").1H(\':13\')){2x(1v);v}$("#z > 5").o(\'A\',(1p*-40)+\'K\');1p=(1p+1)%12};$.9.b.2G=7(){2x(1v);c k=$.9.b.1a();$("#z").o({\'E\':((k[0]-40)/2+k[2]),\'A\':((k[1]-40)/2+k[3])}).I();$("#z").Z(\'P\',$.9.b.14);1v=3Y($.9.b.2A,42)};$.9.b.14=7(){$(q).F();$("#Y, .z, #1g, #16, #y").U();1k=7(){$("#1z, #m").U();6(1c){$(\'1L, 1M, 1O\').o(\'1N\',\'13\')}6($.2E(4.1X)){4.1X()}L=C};6($("#m").1H(":13")!==C){L=D;6(4.1J>0&&4.l[4.f].11!==1B){c J=4.l[4.f].11;c T=$.9.b.1D(J);c H={\'E\':(T.E-18)+\'K\',\'A\':(T.A-18)+\'K\',\'g\':$(J).g(),\'h\':$(J).h()};6(4.1C){H.1V=\'U\'}$("#m").1S(H,4.1J,4.2q,1k)}s{$("#m").3b().1R("1b",1k)}}s{1k()}v C};$.9.b.2D=7(){c n=\'\';n+=\'<5 j="1z"></5>\';n+=\'<5 j="1A">\';n+=\'<5 p="z" j="z"><5></5></5>\';n+=\'<5 j="m">\';n+=\'<5 j="2I">\';n+=\'<5 j="Y"></5>\';n+=\'<5 j="B"><5 p="B 3N"></5><5 p="B 3R"></5><5 p="B 3s"></5><5 p="B 2X"></5><5 p="B 2W"></5><5 p="B 2T"></5><5 p="B 3n"></5><5 p="B 3e"></5></5>\';n+=\'<a d="2t:;" j="1g"><1y p="1T" j="2v"></1y></a><a d="2t:;" j="16"><1y p="1T" j="2z"></1y></a>\';n+=\'<5 j="u"></5>\';n+=\'<5 j="y"></5>\';n+=\'</5>\';n+=\'</5>\';n+=\'</5>\';$(n).2y("3S");$(\'<2H 3O="0" 3P="0" 3Q="0"><2F><R p="y" j="3X"></R><R p="y" j="45"><5></5></R><R p="y" j="46"></R></2F></2H>\').2y(\'#y\');6(1c){$("#2I").3E(\'<15 p="25" 3D="23" 1Z="0"></15>\');$("#Y, .B, .y, .1T").29()}$("#1z, #25, #z, #Y").Z("P",$.9.b.14)};$.9.b.26={28:D,1C:C,1F:0,1J:0,2m:44,2o:\'1E\',2q:\'1E\',2p:\'1E\',1w:3q,1x:2R,1Y:D,2c:0.3,2K:D,2J:D,l:[],1U:2w,1X:2w};$(M).2V(7(){$.9.b.2D()})})(3x);',62,256,'||||opts|div|if|function||fn||fancybox|var|href||itemCurrent|width|height||id|pos|itemArray|fancy_outer|html|css|class|imagePreloader||else|Math|fancy_content|return||el|fancy_title|fancy_loading|top|fancy_bg|false|true|left|unbind|this|itemOpts|show|orig_item|px|busy|document|round|src|click|length|td|matchedGroup|orig_pos|hide|settings|match|_change_item|fancy_close|bind|position|orig||visible|close|iframe|fancy_right|_set_content||title|getViewport|fast|isIE|getNumeric|_finish|value|fancy_left|item|image|target|__cleanup|empty|window|keydown|50|loadingFrame|append|new|Image|objNext|imageRegExp|loadingTimer|frameWidth|frameHeight|span|fancy_overlay|fancy_wrap|undefined|zoomOpacity|getPosition|swing|zoomSpeedIn|img|is|keyCode|zoomSpeedOut|fadeIn|embed|object|visibility|select|_proceed_image|min|fadeOut|animate|fancy_ico|callbackOnStart|opacity|elem|callbackOnClose|overlayShow|frameborder|prop|_set_navigation|parseInt|no|_initialize|fancy_bigIframe|defaults||imageScale|fixPNG|scrollBox|itemLeft|overlayOpacity|children|first|_start|browser|relative|png|data|_preload_neighbor_images|itemTop|zoomSpeedChange|showIframe|easingIn|easingChange|easingOut|stopPropagation|absolute|javascript|each|fancy_left_ico|null|clearInterval|appendTo|fancy_right_ico|animateLoading|fancy_frame|backgroundImage|build|isFunction|tr|showLoading|table|fancy_inner|centerOnScroll|hideOnContentClick|onload|name|gif|load|complete|fancy_div|355|fancy_iframe|fancy_bg_sw|1000|ready|fancy_bg_s|fancy_bg_se|fancy_ajax|get|bmp|jpg|hspace|random|split|scale|||substr||version|stop|for|url|fancy_bg_nw|RegExp|push|none|location|jpeg|extend|hidden|msie|fancy_bg_w|while|replace|425|DXImageTransform|fancy_bg_e|find|Microsoft|progid|filter|jQuery|resize|scroll|scrollTop|scrollLeft|paddingLeft|scrolling|prepend|borderLeftWidth|borderTopWidth|paddingTop|curCSS|jquery|offset|AlphaImageLoader|enabled|fancy_bg_n|cellspacing|cellpadding|border|fancy_bg_ne|body|crop|alt|fancy_img|repeat|fancy_title_left|setInterval|backgroundRepeat||sizingMethod|66|normal|300|fancy_title_main|fancy_title_right|60'.split('|'),0,{}))
/*easing*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return -c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return -c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return jQuery.easing.easeInBounce(x,t*2,0,c,d)*0.5+b}return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}});
/*main site*/
$(document).ready(function(){$("#loginright").dialog({autoOpen:false,draggable:false,height:275,width:400,resizable:false,title:"Login",modal:true,buttons:{Cancel:function(){$(this).dialog("close")},Submit:function(){document.login.submit()}}});$("#loginr").click(function(){$("#loginright").dialog("open");return false});$("#epclink").click(function(){$("#epcinfo").dialog("open");return false});$("#epcinfo").dialog({autoOpen:false,draggable:false,height:275,width:400,resizable:false,title:"EPC Info",modal:true});$("#avonmorecourt").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"400px"});$("#bloomfieldwood").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"400px"});$("#rossdowancourt").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"400px"});$("#lifestylehomes").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"400px"});$("#imageflicker").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"280px"});$("#propertyphotos").innerfade({speed:"slow",timeout:4000,type:"sequence",containerheight:"265px"});$("a.group").fancybox({hideOnContentClick:false,overlayShow:true,zoomSpeedIn:600,zoomSpeedOut:500,easingIn:"easeOutBack",easingOut:"easeInBack"});var b="Read More";var a="Close";$(".toggle").prev().append(' <a href="#" class="toggleLink">'+b+"</a>");$(".toggle").hide();$("a.toggleLink").click(function(){if($(this).html()==b){$(this).html(a)}else{$(this).html(b)}$(this).parent().next(".toggle").toggle("slow");return false});$("input[name*='type']").click(function(){var c="";if($(this).val()=="sales"){c='<option value="75000">&pound;75,000</option>';c+='<option value="90000">&pound;90,000</option>';c+='<option value="100000">&pound;100,000</option>';c+='<option value="125000">&pound;125,000</option>';c+='<option value="150000">&pound;150,000</option>';c+='<option value="175000">&pound;175,000</option>';c+='<option value="200000">&pound;200,000</option>';c+='<option value="225000">&pound;225,000</option>';c+='<option value="250000">&pound;250,000</option>';c+='<option value="275000">&pound;275,000</option>';c+='<option value="300000">&pound;300,000</option>';c+='<option value="325000">&pound;325,000</option>';c+='<option value="350000">&pound;350,000</option>';c+='<option value="375000">&pound;375,000</option>';c+='<option value="400000">&pound;400,000</option>';c+='<option value="425000">&pound;425,000</option>';c+='<option value="450000">&pound;450,000</option>';c+='<option value="475000">&pound;475,000</option>';c+='<option value="500000">&pound;500,000</option>';c+='<option value="600000">&pound;600,000</option>';c+='<option value="700000">&pound;700,000</option>';c+='<option value="800000">&pound;800,000</option>';c+='<option value="900000">&pound;900,000+</option>'}else{c='<option value="350">&pound;350</option>';c+='<option value="400">&pound;400</option>';c+='<option value="450">&pound;450</option>';c+='<option value="500">&pound;500</option>';c+='<option value="550">&pound;550</option>';c+='<option value="600">&pound;600</option>';c+='<option value="650">&pound;650</option>';c+='<option value="700">&pound;700</option>';c+='<option value="750">&pound;750</option>';c+='<option value="800">&pound;800</option>';c+='<option value="900">&pound;900</option>';c+='<option value="1000">&pound;1000</option>';c+='<option value="1250">&pound;1250</option>';c+='<option value="1500">&pound;1500+</option>'}$("#min").html(c);$("#min option:first").attr("selected","selected");$("#max").html(c);$("#max option:last").attr("selected","selected")});$("input[name*='market_type']").click(function(){var c="";if($(this).val()=="sale"){c='<option value="75000">&pound;75,000</option>';c+='<option value="90000">&pound;90,000</option>';c+='<option value="100000">&pound;100,000</option>';c+='<option value="125000">&pound;125,000</option>';c+='<option value="150000">&pound;150,000</option>';c+='<option value="175000">&pound;175,000</option>';c+='<option value="200000">&pound;200,000</option>';c+='<option value="225000">&pound;225,000</option>';c+='<option value="250000">&pound;250,000</option>';c+='<option value="275000">&pound;275,000</option>';c+='<option value="300000">&pound;300,000</option>';c+='<option value="325000">&pound;325,000</option>';c+='<option value="350000">&pound;350,000</option>';c+='<option value="375000">&pound;375,000</option>';c+='<option value="400000">&pound;400,000</option>';c+='<option value="425000">&pound;425,000</option>';c+='<option value="450000">&pound;450,000</option>';c+='<option value="475000">&pound;475,000</option>';c+='<option value="500000">&pound;500,000+</option>';c+='<option value="600000">&pound;600,000</option>';c+='<option value="700000">&pound;700,000</option>';c+='<option value="800000">&pound;800,000</option>';c+='<option value="900000">&pound;900,000+</option>'}else{c='<option value="350">&pound;350</option>';c+='<option value="400">&pound;400</option>';c+='<option value="450">&pound;450</option>';c+='<option value="500">&pound;500</option>';c+='<option value="550">&pound;550</option>';c+='<option value="600">&pound;600</option>';c+='<option value="650">&pound;650</option>';c+='<option value="700">&pound;700</option>';c+='<option value="750">&pound;750</option>';c+='<option value="800">&pound;800</option>';c+='<option value="900">&pound;900</option>';c+='<option value="1000">&pound;1000</option>';c+='<option value="1250">&pound;1250</option>';c+='<option value="1500">&pound;1500+</option>'}$("#min_price").html(c);$("#min_price option:first").attr("selected","selected");$("#max_price").html(c);$("#max_price option:last").attr("selected","selected")})});
/*Google Map*/
var geocoder;var map;function initialize(){geocoder=new google.maps.Geocoder();var b=new google.maps.LatLng(54.66335149993814,-5.664133429527283);var a={zoom:16,center:b,mapTypeId:google.maps.MapTypeId.ROADMAP};map=new google.maps.Map(document.getElementById("house_map"),a);codeAddress()}function codeAddress(){if(geocoder){var a=document.getElementById("property-title").innerHTML+", "+document.getElementById("property-postcode").innerHTML;geocoder.geocode({address:a},function(d,c){if(c==google.maps.GeocoderStatus.OK){map.setCenter(d[0].geometry.location);var b=new google.maps.Marker({map:map,position:d[0].geometry.location,title:a})}else{alert("Geocode was not successful for the following reason: "+c)}})}};