1function initialiseMap() 2{ 3 var dLatitude = $( ".geoLocation span[itemprop='latitude']" ).length > 0 ? $( ".geoLocation span[itemprop='latitude']" ).html() : $( ".cntctlttd" ).html(); 4 var dLongitude = $( ".geoLocation span[itemprop='longitude']" ).length > 0 ? $( ".geoLocation span[itemprop='longitude']" ).html() : $( ".cntctlngtd" ).html(); 5 var mapOptions = { scrollwheel: false, 6 draggable: false, 7 zoom: 12, 8 center: new google.maps.LatLng( dLatitude, dLongitude ), // Marbella 9 styles: [ 10 { 11 "featureType": "all", 12 "elementType": "labels.text.fill", 13 "stylers": [ 14 { 15 "color": "#666666" 16 } 17 ] 18 }, 19 { 20 "featureType": "all", 21 "elementType": "labels.icon", 22 "stylers": [ 23 { 24 "saturation": "-100" 25 }, 26 { 27 "lightness": "-10" 28 } 29 ] 30 }, 31 { 32 "featureType": "landscape.man_made", 33 "elementType": "geometry.fill", 34 "stylers": [ 35 { 36 "color": "#e1e1e1" 37 } 38 ] 39 }, 40 { 41 "featureType": "landscape.natural", 42 "elementType": "geometry.fill", 43 "stylers": [ 44 { 45 "color": "#ebebeb" 46 } 47 ] 48 }, 49 { 50 "featureType": "landscape.natural.terrain", 51 "elementType": "geometry.fill", 52 "stylers": [ 53 { 54 "color": "#dddddd" 55 } 56 ] 57 }, 58 { 59 "featureType": "poi", 60 "elementType": "geometry.fill", 61 "stylers": [ 62 { 63 "color": "#cccccc" 64 } 65 ] 66 }, 67 { 68 "featureType": "road.highway", 69 "elementType": "geometry.fill", 70 "stylers": [ 71 { 72 "color": "#aaaaaa" 73 } 74 ] 75 }, 76 { 77 "featureType": "road.highway", 78 "elementType": "geometry.stroke", 79 "stylers": [ 80 { 81 "color": "#cccccc" 82 } 83 ] 84 }, 85 { 86 "featureType": "road.arterial", 87 "elementType": "geometry.fill", 88 "stylers": [ 89 { 90 "visibility": "on" 91 }, 92 { 93 "color": "#cccccc" 94 } 95 ] 96 }, 97 { 98 "featureType": "road.arterial", 99 "elementType": "labels.icon", 100 "stylers": [ 101 { 102 "visibility": "off" 103 } 104 ] 105 }, 106 { 107 "featureType": "road.local", 108 "elementType": "geometry.fill", 109 "stylers": [ 110 { 111 "visibility": "on" 112 }, 113 { 114 "color": "#f5f5f5" 115 } 116 ] 117 }, 118 { 119 "featureType": "transit.station", 120 "elementType": "geometry.fill", 121 "stylers": [ 122 { 123 "color": "#cccccc" 124 } 125 ] 126 }, 127 { 128 "featureType": "water", 129 "elementType": "all", 130 "stylers": [ 131 { 132 "visibility": "simplified" 133 }, 134 { 135 "lightness": "50" 136 } 137 ] 138 } 139 ] 140 }; 141 142 var mapElement = document.getElementById( 'map' ); 143 var map = new google.maps.Map( mapElement, mapOptions ); 144 var marker = new google.maps.Marker( { position: new google.maps.LatLng( dLatitude, dLongitude ), 145 icon: '/thm/usr/' + $( "meta[name='theme']" ).attr( "content" ) + '/img/map-logo.png', 146 map: map, 147 title: $( "meta[name='website']" ).attr( "content" ) } ); 148} 149 150function equalizeClass( className ) 151{ 152 var equaliserHeight = 0; 153 var height = 0; 154 var i = 0; 155 156 $( '.' + className ).each 157 ( 158 function() 159 { 160 $( this ).imagesLoaded 161 ( 162 function() 163 { 164 i++; 165 height = $( this ).height(); 166 167 if( height>equaliserHeight ) 168 { 169 equaliserHeight = height; 170 } 171 } 172 ); 173 } 174 ); 175 176 $( '.' + className ).css( "height", equaliserHeight ); 177} 178 179function addCommas( nStr, s ) 180{ 181 nStr += ''; 182 x = nStr.split('.'); 183 x1 = x[0]; 184 x2 = x.length > 1 ? '.' + x[1] : ''; 185 var rgx = /(\d+)(\d{3})/; 186 187 while (rgx.test(x1)) 188 { 189 x1 = x1.replace( rgx, '$1' + s + '$2' ); 190 } 191 192 return x1 + x2; 193} 194 195function calculateMonthlyPayment() 196{ 197 // reference formula: P = L[c(1 + c)n]/[(1 + c)n - 1] 198 var fAmount = $( "#amount" ).val(); 199 200 if( fAmount == 0 ) 201 { 202 fAmount = $( ".prc" ).html(); 203 } 204 fAmount = fAmount.split( '.' ).join( "" ); 205 206 var fLoanAmount = parseFloat( fAmount ); 207 var fInterestRate = parseFloat( $( '#interest' ).val() ) / 100; 208 var fInterestRateMonthly = fInterestRate / 12; 209 var nMortgageLength = parseInt( $( '#term-years' ).val() ) * 12; 210 var fTmpA = fInterestRateMonthly * Math.pow( ( 1 + fInterestRateMonthly ), nMortgageLength ); 211 var fTmpB = Math.pow( ( 1 + fInterestRateMonthly ), ( nMortgageLength ) ) - 1; 212 var fMortgage = parseFloat( fLoanAmount * ( fTmpA / fTmpB ) ).toFixed( 2 ); 213 214 $( '#total' ).val( addCommas( parseInt( fMortgage ), "." ) ); 215} 216 217function translate( sLanguage, sText ) 218{ 219 sResult = ""; 220 221 $.ajax 222 ( 223 { 224 async: false, 225 type: 'POST', 226 dataType: "text", 227 url: '/jx/trn.word.php', 228 data: { "l":sLanguage, "w":sText }, 229 beforeSend: function(){}, 230 success: function( data ) 231 {
232// console.log( "R:" + data ); 233 sResult=data; 234 }, 235 error: function( jqXHR, textStatus, errorThrown ) 236 { 237// console.log( "E:" + errorThrown ); 238 sResult = "Error" 239 }, 240 cache: false 241 } 242 ); 243 244 return sResult; 245} 246 247function getImage( sImage ) 248{ 249 var tmp = null; 250 251 $.ajax 252 ( 253 { 254 'async': false, 255 'type': "GET", 256 'global': false, 257 'dataType': 'text', 258 'url': location.protocol + "//" + location.host + "/jx/get.image.ro.php", 259 'data': { url : encodeURIComponent( sImage ) }, 260 'success': function ( data ){ tmp = data; } 261 } 262 ); 263 264 return tmp; 265} 266 267function properCase( s ) 268{ 269 return s.replace( /(?:^|\s)\w/g, function( match ){ return match.toUpperCase(); } ); 270} 271 272function setCookie( cname, cvalue, exdays ) 273{ 274 var d = new Date(); 275 276 d.setTime( d.getTime() + ( exdays * 24 * 60 * 60 * 1000 ) ); 277 278 var expires = "expires=" + d.toUTCString(); 279 280 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 281} 282 283function getCookie( cname ) 284{ 285 var name = cname + "="; 286 var ca = document.cookie.split( ';' ); 287 288 for( var i = 0; i < ca.length; i++ ) 289 { 290 var c = ca[i]; 291 292 while( c.charAt(0) == ' ' ) 293 { 294 c = c.substring(1); 295 } 296 297 if( c.indexOf( name ) == 0 ) 298 { 299 return c.substring( name.length, c.length ); 300 } 301 } 302 303 return null; 304} 305 306$( document ).ready 307( 308 function() 309 { 310 oSearch = $.parseJSON( $( ".searchData" ).html() ); 311// sLng = $( 'meta[property="og:locale"]' ).attr( "content" ).split( "_" )[0]; 312 sLng = $( 'meta[name="language"]' ).attr( "content" ); 313 314 if( typeof geoplugin_countryCode !== 'undefined' && $.isFunction( geoplugin_countryCode ) ) 315 { 316 sLng1 = geoplugin_countryCode().toLowerCase(); 317 } 318 else 319 { 320 sLng1 = sLng; 321 } 322 323// if( sLng1 == "ru" ) 324 if( sLng1 == "xxx" ) 325 { 326 console.log( "CC1: " + sLng1 ); 327 $( "img[data-image]" ).each( function( index, element ){ $( this ).attr( 'src', getImage( $( this ).attr( "data-image" ) ) ); } ); 328 $( "img[data-src*='http']" ).each( function( index, element ){ $( this ).attr( 'data-src', getImage( $( this ).attr( "data-src" ) ) ); } ); 329 $( "a[data-href]" ).remove(); 330 } 331 else 332 { 333 console.log( "CC2: " + sLng1 ); 334 $( "img[data-image]" ).each( function( index, element ){ $( this ).attr( 'src', $( this ).attr( "data-image" ) ); } ); 335 } 336 337 if( $( '.showcase' ).length > 0 ) 338 { 339 $( '.showcase' ).matchHeight(); 340 } 341 console.log("here"); 342 if( $( '.mh-1' ).length > 0 ) 343 {
344 console.log("here1"); 345 $( '.mh-1' ).matchHeight(); 346 } 347 348 if( $( '.mh-2' ).length > 0 ) 349 { 350 console.log("here2"); 351 $( '.mh-2' ).matchHeight(); 352 } 353 354 $( ".callback" ).on 355 ( 356 { 357 "click": function( event ) 358 { 359 if( $( event.target ).closest( '.dropdown-toggle' ).length ) 360 { 361 $( this ).data( 'closable', true ); 362 } 363 else 364 { 365 $( this ).data( 'closable', false ); 366 } 367 }, 368 "hide.bs.dropdown": function( event ) 369 { 370 hide = $( this ).data( 'closable' ); 371 372 $( this ).data( 'closable', true ); 373 374 return hide; 375 } 376 } 377 ); 378 379 // Carousel 380 if( $( "#showcase-carousel" ).length > 0 ) 381 { 382 $( "#showcase-carousel" ).owlCarousel 383 ( 384 { 385 //lazyLoad : true, 386 navigation : true, 387 afterInit : function( elem ){ var that = this; that.owlControls.prependTo( elem ) }, 388 slideSpeed : 300, 389 pagination : false, 390 paginationSpeed : 400, 391 singleItem:true 392 } 393 ); 394 } 395 396 // Search map 397 if( $( "#mapCanvas" ).length > 0 ) 398 { 399 initializeMapSearch(); 400 } 401 402// if( $( '#carousel-showcase' ).length > 0 ) 403// { 404// $( '#carousel-showcase' ).carousel( { interval: 5000 } ) 405// 406// $( '.carousel .item' ).each 407// ( 408// function() 409// { 410// var next = $( this ).next(); 411// 412// if( !next.length ) 413// { 414// next = $( this ).siblings( ':first' ); 415// } 416// 417// next.children( ':first-child' ).clone().appendTo( $( this ) ); 418// 419// if( next.next().length > 0 ) 420// { 421// next.next().children( ':first-child' ).clone().appendTo($(this)).addClass( 'rightest' ); 422// } 423// else 424// { 425// $( this ).siblings( ':first' ).children( ':first-child' ).clone().appendTo( $( this ) ); 426// } 427// } 428// ); 429// } 430 431 // Favourite portfolio 432 if( $( ".favouritehdr" ).length > 0 ) 433 { 434 $.ajax 435 ( 436 { 437 async: false, 438 beforeSubmit: function(){}, 439 error: function( jqXHR, textStatus, errorThrown ) 440 { 441 console.log( 'Portfolio: ' + textStatus + ' ' + errorThrown ); 442 }, 443 success: function( response ) 444 { 445 var o = $.parseJSON( $( ".searchData" ).html() ); 446 var p = $.parseJSON( response ); 447 448 switch( o.key ) 449 { 450 case "eam-2326de66-f39c-42c2-a0b4-a3fa47a6cb6f5": 451 sText = ( p[ "count" ] > 0 ) ? p[ "count" ] + " <i class='fa " + o.portfolioOn + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>" : "0 <i class='fa " + o.portfolioOff + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>"; 452 break; 453 454 case "cp2-ce12b91b-82f7-44b2-9961-6dfe38a29c3d": 455 sText = ( p[ "count" ] > 0 ) ? p[ "count" ] + " <i class='" + o.portfolioOn + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>" : "0 <i class='" + o.portfolioOff + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>"; 456 break; 457 458 case "cds-bd93da25-f134-4132-a326-cbd6945c4678": 459 case "ips-3d5300a9-6ec8-4ad4-92a0-9b42cad40a85": 460 sText = ( p[ "count" ] > 0 ) ? "<i class='fa " + o.portfolioOn + "'></i> " + p[ "count" ] : "<i class='fa " + o.portfolioOff + "'></i> "; 461 break; 462 463 default: 464 sText = ( p[ "count" ] > 0 ) ? "<i class='fa " + o.portfolioOn + "'></i> " + translate( o.lanaguage, "general.portfolio" ) : "<i class='fa " + o.portfolioOff + "'></i> " + translate( o.lanaguage, "general.portfolio" ); 465 break; 466 } 467 468 $( ".favouritehdr" ).html( sText ); 469 470 return true; 471 }, 472 type: 'post', 473 url: "/jx/prtfl.update.php?act=count" 474 } 475 ); 476 } 477 478 function updateCount( data ) 479 { 480 var o = $.parseJSON( $( ".searchData" ).html() ); 481 var p = $.parseJSON( data ); 482 483 switch( o.key ) 484 { 485 case "eam-2326de66-f39c-42c2-a0b4-a3fa47a6cb6f5": 486// sText = ( p[ "count" ] > 0 ) ? "<i class='fa " + o.portfolioOn + "'></i> " + p[ "count" ] : "<i class='fa " + o.portfolioOff + "'> 0</i> "; 487 sText = ( p[ "count" ] > 0 ) ? p[ "count" ] + " <i class='fa " + o.portfolioOn + " hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>" : "0 <i class='fa " + o.portfolioOff + " hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>"; 488 break; 489 490/* case "cp2-ce12b91b-82f7-44b2-9961-6dfe38a29c3d": 491console.log( "MJS::CP2-2" ); 492 sText = ( p[ "count" ] > 0 ) ? p[ "count" ] + " <i class='" + o.portfolioOn + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>" : "0 <i class='" + o.portfolioOff + " hidden-sm hidden-md hidden-lg'></i><span class='hidden-xs'> Properties Saved</span>"; 493 break;*/ 494 495 case "cds-bd93da25-f134-4132-a326-cbd6945c4678": 496 case "ips-3d5300a9-6ec8-4ad4-92a0-9b42cad40a85": 497 sText = ( p[ "count" ] > 0 ) ? "<i class='fa " + o.portfolioOn + "'></i> " + p[ "count" ] : "<i class='fa " + o.portfolioOff + "'></i> "; 498 499 break; 500 501 default: 502// console.log( "MJS::D-2" ); 503 sText = ( p[ "count" ] > 0 ) ? "<i class='fa " + o.portfolioOn + "'></i> " + translate( o.lanaguage, "general.portfolio" ) : "<i class='fa " + o.portfolioOff + "'></i> " + translate( o.lanaguage, "general.portfolio" ); 504 505 break; 506 } 507 508 $( ".favouritehdr" ).html( sText ); 509 } 510 511 // Portfolio Update. 512 if( $( ".portfolio" ).length > 0 ) 513 { 514 $( ".portfolio" ).on 515 ( 516 'click', 517 function() 518 { 519 sID = $( this ).data( 'q23prprty' ); 520 vParent = $( this ).parent(); 521 vChild = vParent.find( ".favourited" ); 522 nCount = parseInt( vChild.text(), 10 ); 523 nNew = nCount + 1; 524 525 $.ajax 526 ( 527 { 528 async: false, 529 beforeSubmit: function(){}, 530 error: function( jqXHR, textStatus, errorThrown ) 531 { 532 console.log( 'Portfolio: ' + textStatus + ' ' + errorThrown ); 533 }, 534 success: function( response ) 535 { 536 var o = $.parseJSON( $( ".searchData" ).html() ); 537 var p = $.parseJSON( response ); 538 539 if( p[ "text" ] !== "add" ) 540 { 541 sText = o.portfolioShowTitle === 'true' ? o.portfolioOffTitle : ""; 542 543 $( "." + sID ).attr( "title", o.portfolioOffTitle ).html( '<i class="fa ' + o.portfolioOff + '"></i> ' + sText ); 544 545 if( $( ".q23Sort" ).length > 0 ) 546 { 547 $( ".q23Sort" ).find( '.parent' + sID ).remove(); 548 } 549 } 550 else 551 { 552 sText = o.portfolioShowTitle === 'true' ? o.portfolioOnTitle : ""; 553 554 $( "." + sID ).attr( "title", o.portfolioOnTitle ).html( '<i class="fa ' + o.portfolioOn + '"> </i> ' + sText ); 555 556 vChild.text( nNew ); 557 } 558 559// if( p[ "count" ] > 0 ) 560// {
561// sText = "<i class='fa " + o.portfolioOn + "'></i> " + p[ "count" ] + " " + translate( o.lanaguage, "general.properties" ); 562// } 563// else 564// { 565// sText = "<i class='fa " + o.portfolioOff + "'></i> " + translate( o.lanaguage, "general.portfolio" ); 566// } 567// 568// $( ".favouritehdr" ).html( sText ); 569 570 updateCount( response ); 571 572 return true; 573 }, 574 type: 'post', 575 url: "/jx/prtfl.update.php?" + $( this ).attr( 'data-q23' ) 576 } 577 ); 578 } 579 ) 580 } 581 582 if( $( "#masterslider" ).length > 0 ) 583 { 584 var slider = new MasterSlider(); 585 slider.control( 'arrows' ); 586 //slider.control('timebar' , {color:""}); 587 slider.setup( 'masterslider' , { width:1800, height:600, view:'fade', space:1, layout:'fullwidth', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 588 } 589 590 if( $( "#masterslider-850" ).length > 0 ) 591 { 592 var slider = new MasterSlider(); 593 slider.control( 'arrows' ); 594 //slider.control('timebar' , {color:""}); 595 slider.setup( 'masterslider-850' , { width:1800, height:850, view:'fade', space:1, layout:'fullwidth', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 596 } 597 if( $( "#masterslider-350" ).length > 0 ) 598 { 599 var slider = new MasterSlider(); 600 slider.control( 'arrows' ); 601 //slider.control('timebar' , {color:""}); 602 slider.setup( 'masterslider-350' , { width:1800, height:350, view:'fade', space:1, layout:'fullwidth', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 603 } 604 605 if( $( "#masterslider-boxed" ).length > 0 ) 606 {
607 console.log("here"); 608 var slider = new MasterSlider(); 609 slider.control( 'arrows' ); 610 //slider.control('timebar' , {color:""}); 611 slider.setup( 'masterslider-boxed' , { width:1140, height:550, view:'fade', space:1, layout:'boxed', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 612 } 613 614 if( $( "#masterslider-boxed-400" ).length > 0 ) 615 { 616 console.log("here"); 617 var slider = new MasterSlider(); 618 slider.control( 'arrows' ); 619 //slider.control('timebar' , {color:""}); 620 slider.setup( 'masterslider-boxed-400' , { width:1140, height:400, view:'fade', space:1, layout:'boxed', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 621 } 622 623 if( $( "#masterslider-fill" ).length > 0 ) 624 { 625 console.log("here"); 626 var slider = new MasterSlider(); 627 slider.control( 'arrows' ); 628 //slider.control('timebar' , {color:""}); 629 slider.setup( 'masterslider-fill' , { width:800, height:500, view:'fade', space:1, layout:'autofill', loop:true, preload:0, autoplay:true } ); 630 } 631 632 if( $( "#masterslider-fullscreen" ).length > 0 ) 633 {
634 console.log("here"); 635 var slider = new MasterSlider(); 636 slider.control( 'arrows' ); 637 //slider.control('timebar' , {color:"#937946"}); 638 slider.setup( 'masterslider-fullscreen' , { width:1800, height:980, view:'fade', space:5, layout:'fullscreen', fullscreenMargin:0, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 639 } 640 641// if( $( "#masterslider-fullscreen-eam" ).length > 0 ) 642// { 643// console.log("here"); 644// var slider = new MasterSlider(); 645// slider.control( 'arrows' ); 646// //slider.control('timebar' , {color:"#937946"}); 647// slider.setup( 'masterslider-fullscreen-eam' , { width:1800, height:980, view:'fade', space:5, layout:'fullscreen', fullscreenMargin:90, overPause:false, speed:20, loop:true, preload:0, autoplay:true } ); 648// } 649 650 // Navigation Bar 651 $( window ).scroll 652 ( 653 function() 654 { 655 "use strict"; 656 var scroll = $( window ).scrollTop(); 657 658 if( scroll > 60 ) 659 { 660 $( ".navbar" ).addClass( "scroll-fixed-navbar" ); 661 } 662 else 663 { 664 $( ".navbar" ).removeClass( "scroll-fixed-navbar" ); 665 } 666 } 667 ); 668 669 // For Search Dropdown Select/Deselect all 670 $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { 671 event.preventDefault(); 672 event.stopPropagation(); 673 $(this).parent().siblings().removeClass('open'); 674 $(this).parent().toggleClass('open'); 675 }); 676 677 // Dropdown Menu 678 jQuery(function($) { 679 if($(window).width()>769){ 680 $('.navbar .dropdown').hover(function() { 681 $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown(); 682 $(this).addClass('open'); 683 }, function() { 684 $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp(); 685 $(this).removeClass('open'); 686 }); 687 688 $('.navbar .dropdown > a').click(function(){ 689 location.href = this.href; 690 }); 691 692 } 693 }); 694 695 // Sticky Header 696 $( ".sticky" ).sticky( { topSpacing:0 } ); 697 698 // Scroll to Top 699 $( window ).scroll 700 ( 701 function() 702 { 703 if( $( this ).scrollTop() > 0 ) 704 { 705 $( '#scroller' ).fadeIn(); 706 } 707 else 708 { 709 $( '#scroller' ).fadeOut(); 710 } 711 } 712 ); 713 714 $( '.btt' ).click 715 ( 716 function() 717 { 718 $( 'body,html' ).animate( { scrollTop: 0 }, 600 ); 719 return false; 720 } 721 ); 722 723 // Center Modal 724 function centerModals() 725 { 726 $( '.modal' ).each 727 ( 728 function( i ) 729 { 730 var $clone = $( this ).clone().css( 'display', 'block' ).appendTo( 'body' ); 731 var top = ( $clone.height() - $clone.find( '.modal-content' ).height() ) / 2; 732 top = top > 0 ? top : 0; 733 734 $clone.remove(); 735 $( this ).find( '.modal-content' ).css( "margin-top", top ); 736 } 737 ); 738 } 739 740 $( '.modal' ).on( 'show.bs.modal', centerModals ); 741 $( window ).on( 'resize', centerModals ); 742 743 // Owl Carousel x 3 744 if( $( ".owl-carousel" ).length > 0 ) 745 { 746 $( '.owl-carousel' ).owlCarousel 747 ( 748 { 749 loop: true, 750 margin: 30, 751 nav: true, 752 autoplay: true, 753 autoplayTimeout:5000, 754 autoplayHoverPause:true, 755 autoplaySpeed: 1000, 756 navContainer: '#customNav', 757 navText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>", ], 758 responsive: { 759 0:{ items:1 }, 760 600:{ items:2 }, 761 1000:{ items:3 } 762 } 763 } 764 ); 765 766 $( ".next" ).click( function(){ owl.trigger('next.owl.carousel' ); } ); 767 $( ".prev" ).click( function(){ owl.trigger('prev.owl.carousel' ); } ); 768 } 769 770 // Owl Carousel x 3 no-gutter 771 if( $( ".owl-carousel-no-gutter" ).length > 0 ) 772 { 773 $( '.owl-carousel-no-gutter' ).owlCarousel 774 ( 775 { 776 loop: true, 777 margin: 0, 778 nav: true, 779 autoplay: true, 780 autoplayTimeout:5000, 781 autoplayHoverPause:true, 782 autoplaySpeed: 1000, 783 navContainer: '#customNav', 784 navText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>", ], 785 responsive: { 786 0:{ items:1 }, 787 600:{ items:2 }, 788 1000:{ items:3 } 789 } 790 } 791 ); 792 793 $( ".next" ).click( function(){ owl.trigger('next.owl.carousel' ); } ); 794 $( ".prev" ).click( function(){ owl.trigger('prev.owl.carousel' ); } ); 795 } 796 797 // Owl Carousel x 4 798 if( $( ".owl-carousel-4" ).length > 0 ) 799 { 800 $( '.owl-carousel-4' ).owlCarousel
801 ( 802 { 803 loop: true, 804 margin: 30, 805 nav: true, 806 autoplay: true, 807 autoplayTimeout:5000, 808 autoplayHoverPause:true, 809 autoplaySpeed: 1000, 810 navContainer: '#customNav', 811 navText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>", ], 812 responsive: { 813 0:{ items:1 }, 814 600:{ items:2 }, 815 1000:{ items:4 } 816 } 817 } 818 ); 819 820 $( ".next" ).click( function(){ owl.trigger('next.owl.carousel' ); } ); 821 $( ".prev" ).click( function(){ owl.trigger('prev.owl.carousel' ); } ); 822 } 823 // Owl Carousel x 6 q23 824 if( $( ".owl-carousel-6" ).length > 0 ) 825 { 826 $( '.owl-carousel-6' ).owlCarousel 827 ( 828 { 829 loop: true, 830 margin: 30, 831 nav: true, 832 autoplay: true, 833 autoplayTimeout:5000, 834 autoplayHoverPause:true, 835 autoplaySpeed: 1000, 836 navContainer: '#customNav', 837 navText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>", ], 838 responsive: { 839 0:{ items:2 }, 840 600:{ items:4 }, 841 1000:{ items:6 } 842 } 843 } 844 ); 845 846 $( ".next" ).click( function(){ owl.trigger('next.owl.carousel' ); } ); 847 $( ".prev" ).click( function(){ owl.trigger('prev.owl.carousel' ); } ); 848 } 849 850 // Owl Carousel Partners - no nav 851 if( $( ".owl-carousel-partners" ).length > 0 ) 852 { 853 $( '.owl-carousel-partners' ).owlCarousel 854 ( 855 { 856 loop: true, 857 margin: 0, 858 nav: false, 859 autoplay: true, 860 autoplayTimeout:5000, 861 autoplayHoverPause:true, 862 autoplaySpeed: 1000, 863 responsive: { 864 0:{ items:2 }, 865 600:{ items:4 }, 866 1000:{ items:7 } 867 } 868 } 869 ); 870 } 871 872 // Currency 873 $('.currency').on 874 ( 875 { 876 "click": function( event ) 877 { 878 if( $( event.target ).closest( '.dropdown-toggle' ).length ) 879 { 880 $( this ).data( 'closable', true ); 881 } 882 else 883 { 884 $( this ).data( 'closable', false ); 885 } 886 }, 887 "hide.bs.dropdown": function( event ) 888 { 889 hide = $( this ).data( 'closable' ); 890 891 $( this ).data( 'closable', true ); 892 893 return hide; 894 } 895 } 896 ); 897 898 // Tooltip 899 $(function () { 900 $('[data-toggle="tooltip"]').tooltip() 901 }) 902 903 // Slideout Callback 904 $( '.request-callback .toggler' ).on 905 ( 906 'click', 907 function( event ) 908 { 909 event.preventDefault(); 910 $( this ).closest( '.request-callback' ).toggleClass( 'opened' ); 911 } 912 ); 913 914 if( $( "#map" ).length > 0 ) 915 { 916 if( typeof google !== 'undefined' ) 917 { 918 google.maps.event.addDomListener( window, 'load', initialiseMap ); 919 } 920 } 921 922 switch( oSearch.key ) 923 { 924 case "im1-1bbcab82-c8a4-4566-aff9-679b5fa048cc": 925 case "mltr-c0f65d53-7dc6-45ee-bd84-e6ab548cec67": 926 case "mp1-71de-684e-43bf-8346-2dac": 927 case "vmn-a4177c01-a6e9-4766-ac6b-0fd517468062": 928 case "se2-e793dc19-9b82-41e6-b8ee-6251c37176d5": 929 case "sc1-736c0b68-2633-4ebf-9ba4-e17af37cdd61": 930 break; 931 932 default: 933 $.cookiesDirective 934 ( 935 { 936 privacyPolicyUri: '/' + sLng + '/privacy-policy/', 937 explicitConsent: false, 938 position : 'bottom', 939 cookieScripts: 'Google Analytics', 940 backgroundColor: '#2D2D2D', 941 backgroundOpacity: '80', 942 fontColor: '#000000', 943 linkColor: '#ffffff' 944 } 945 ); 946 break; 947 } 948 949 if( $( '#carousel-testimonial' ).length > 0 ) 950 { 951 $( '#carousel-testimonial' ).carousel( { interval: 10000 } ) 952 } 953 954 if( $( "#frmCallBack" ).length > 0 ) 955 { 956 $( '#frmCallBack' ).ajaxForm 957 ( 958 { 959 url: '/' + sLng + '/lead/callback/', 960 type: 'post', 961 beforeSubmit: function() 962 { 963 $( '#frmCallBack' ).validate 964 ( 965 { 966 rules: 967 { 968 email: { required:true, email:true } 969 970 }, 971 messages: 972 { 973 email: '' 974 }, 975 errorElement: "div" 976 } 977 ); 978 979 console.log( $( '#frmCallBack' ).valid() ); 980 981 if( $( '#frmCallBack' ).valid() ) 982 { 983 return true; 984 } 985 986 return false;
987 }, 988 success: function( response ) 989 { 990 if( oSearch.thankYouPage == 'y' ) 991 { 992 window.location = "/" + sLng + "/" + response + "/"; 993 } 994 else 995 { 996 $( '#frmCallBack' ).html( response ); 997 } 998 } 999 } 1000 ); 1001 } 1002 1003 1004 if( $( "#frmNewsletterSignup" ).length > 0 ) 1005 { 1006 $( '#frmNewsletterSignup' ).ajaxForm 1007 ( 1008 { 1009 url: '/' + sLng + '/lead/newsletter/', 1010 type: 'post', 1011 beforeSubmit: function() 1012 { 1013 $( '#frmNewsletterSignup' ).validate 1014 ( 1015 { 1016 rules: 1017 { 1018 email: { required:true, email:true } 1019 1020 }, 1021 messages: 1022 { 1023 email: '' 1024 }, 1025 errorElement: "div" 1026 } 1027 ); 1028 1029 console.log( $( '#frmNewsletterSignup' ).valid() ); 1030 1031 if( $( '#frmNewsletterSignup' ).valid() ) 1032 { 1033 $( '#frmNewsletterSignupWrapper' ).block 1034 ( 1035 { 1036 overlayCSS: { backgroundColor: '#fefefe' }, 1037 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1038 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1039 } 1040 ); 1041 1042 return true; 1043 } 1044 1045 return false; 1046 }, 1047 success: function( response ) 1048 { 1049 if( oSearch.thankYouPage == 'y' ) 1050 { 1051 window.location = "/" + sLng + "/" + response + "/"; 1052 } 1053 else 1054 { 1055 $( '#frmNewsletterSignupWrapper' ).html( response ); 1056 } 1057 } 1058 } 1059 ); 1060 } 1061 1062 if( $( "#frmCallbackListing" ).length > 0 ) 1063 { 1064 var sText = $( '#subjectCBL' ).val(); 1065 1066 $( '#subjectCBL' ).val( sText.replace( '{ourID}', $( '.oid' ).html() ) ); 1067 $( '#pidCBL' ).val( $( '.lid' ).html() ); 1068 $( '#prfCBL' ).val( $( '.oid' ).html() ); 1069 1070 console.log( $( '#subjectCBL' ).val() ); 1071 1072 $( '#frmCallbackListing' ).ajaxForm 1073 ( 1074 { 1075 url: '/' + sLng + '/lead/callbacklisting/', 1076 type: 'post', 1077 beforeSubmit: function() 1078 { 1079 $( '#frmCallbackListing' ).validate 1080 ( 1081 { 1082 rules: 1083 { 1084 name: { required:true }, 1085 email: { required:true, email:true } 1086 1087 }, 1088 messages: 1089 { 1090 name: '', 1091 email: '' 1092 }, 1093 errorElement: "div" 1094 } 1095 ); 1096 1097 console.log( $( '#frmCallbackListing' ).valid() ); 1098 1099 if( $( '#frmCallbackListing' ).valid() ) 1100 { 1101 $( '#frmCallbackListingWrapper' ).block 1102 ( 1103 { 1104 overlayCSS: { backgroundColor: '#fefefe' }, 1105 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1106 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1107 } 1108 ); 1109 return true; 1110 } 1111 1112 return false; 1113 }, 1114 success: function( response ) 1115 { 1116 $( 'frmCallbackListingWrapper' ).unblock(); 1117 1118 if( oSearch.thankYouPage == 'y' ) 1119 { 1120 window.location = "/" + sLng + "/" + response + "/"; 1121 } 1122 else 1123 { 1124 $( '#frmCallbackListingWrapper' ).html( response ); 1125 } 1126 } 1127 } 1128 ); 1129 } 1130 1131 if( $( "#frmContactMain" ).length > 0 ) 1132 { 1133 $( '#frmContactMain' ).ajaxForm 1134 ( 1135 { 1136 url: '/' + sLng + '/lead/contact/', 1137 type: 'post', 1138 beforeSubmit: function() 1139 { 1140 $( '#frmContactMain' ).validate 1141 ( 1142 { 1143 rules: 1144 { 1145 name: { required:true }, 1146 email: { required:true, email:true } 1147 1148 }, 1149 messages: 1150 { 1151 name: '', 1152 email: '' 1153 }, 1154 errorElement: "div" 1155 } 1156 ); 1157 1158 console.log( $( '#frmContactMain' ).valid() ); 1159 1160 if( $( '#frmContactMain' ).valid() ) 1161 { 1162 $( '#frmContactMainWrapper' ).block 1163 ( 1164 { 1165 overlayCSS: { backgroundColor: '#fefefe' }, 1166 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1167 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1168 } 1169 ); 1170 return true; 1171 } 1172 1173 return false;
1174 }, 1175 success: function( response ) 1176 { 1177 $( '#frmContactMainWrapper' ).unblock(); 1178 1179 if( oSearch.thankYouPage == 'y' ) 1180 { 1181 window.location = "/" + sLng + "/" + response + "/"; 1182 } 1183 else 1184 { 1185 $( '#frmContactMainWrapper' ).html( response ); 1186 } 1187 } 1188 } 1189 ); 1190 } 1191 1192 if( $( "#frmContactQuick" ).length > 0 ) 1193 { 1194 $( '#frmContactQuick' ).ajaxForm 1195 ( 1196 { 1197 url: '/' + sLng + '/lead/contact/', 1198 type: 'post', 1199 beforeSubmit: function() 1200 { 1201 $( '#frmContactQuick' ).validate 1202 ( 1203 { 1204 rules: 1205 { 1206 name: { required:true }, 1207 email: { required:true, email:true } 1208 1209 }, 1210 messages: 1211 { 1212 name: '', 1213 email: '' 1214 }, 1215 errorElement: "div" 1216 } 1217 ); 1218 1219 console.log( $( '#frmContactQuick' ).valid() ); 1220 1221 if( $( '#frmContactQuick' ).valid() ) 1222 { 1223 $( '#frmContactQuickWrapper' ).block 1224 ( 1225 { 1226 overlayCSS: { backgroundColor: '#fefefe' }, 1227 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1228 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1229 } 1230 ); 1231 return true; 1232 } 1233 1234 return false; 1235 }, 1236 success: function( response ) 1237 { 1238 $( '#frmContactQuickWrapper' ).unblock(); 1239 1240 if( oSearch.thankYouPage == 'y' ) 1241 { 1242 window.location = "/" + sLng + "/" + response + "/"; 1243 } 1244 else 1245 { 1246 $( '#frmContactQuickWrapper' ).html( response ); 1247 } 1248 } 1249 } 1250 ); 1251 } 1252 1253 if( $( "#frmContactLong" ).length > 0 ) 1254 { 1255 $( '#frmContactLong' ).ajaxForm 1256 ( 1257 { 1258 url: '/' + sLng + '/lead/contact/', 1259 type: 'post', 1260 beforeSubmit: function() 1261 { 1262 $( '#frmContactLong' ).validate 1263 ( 1264 { 1265 rules: 1266 { 1267 name: { required:true }, 1268 email: { required:true, email:true } 1269 1270 }, 1271 messages: 1272 { 1273 name: '', 1274 email: '' 1275 }, 1276 errorElement: "div" 1277 } 1278 ); 1279 1280 console.log( $( '#frmContactLong' ).valid() ); 1281 1282 if( $( '#frmContactLong' ).valid() ) 1283 { 1284 $( '#frmContactLongWrapper' ).block 1285 ( 1286 { 1287 overlayCSS: { backgroundColor: '#fefefe' }, 1288 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1289 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1290 } 1291 ); 1292 return true; 1293 } 1294 1295 return false; 1296 }, 1297 success: function( response ) 1298 { 1299 $( '#frmContactLongWrapper' ).unblock(); 1300 1301 if( oSearch.thankYouPage == 'y' ) 1302 { 1303 window.location = "/" + sLng + "/" + response + "/"; 1304 } 1305 else 1306 { 1307 $( '#frmContactLongWrapper' ).html( response ); 1308 } 1309 } 1310 } 1311 ); 1312 } 1313 1314// if( $( "#frmListProperty" ).length > 0 ) 1315// { 1316// $( '#frmListProperty' ).ajaxForm 1317// ( 1318// { 1319// url: '/' + sLng + '/lead/property/', 1320// type: 'post', 1321// beforeSubmit: function() 1322// { 1323// $( '#frmListProperty' ).validate 1324// ( 1325// { 1326// rules: 1327// {
1328// listing: { required:true }, 1329// address: { required:true }, 1330// name: { required:true }, 1331// email: { required:true, email:true } 1332// 1333// }, 1334// messages: 1335// { 1336// listing: '', 1337// address: '', 1338// name: '', 1339// email: '' 1340// }, 1341// errorElement: "div" 1342// } 1343// ); 1344// 1345// console.log( $( '#frmListProperty' ).valid() ); 1346// 1347// if( $( '#frmListProperty' ).valid() ) 1348// { 1349// return true; 1350// } 1351// 1352// return false; 1353// }, 1354// success: function( response ) 1355// { 1356// if( oSearch.thankYouPage == 'y' ) 1357// { 1358// window.location = "/" + sLng + "/" + response + "/"; 1359// } 1360// else 1361// { 1362// $( '#frmListPropertyWrapper' ).html( response ); 1363// } 1364// } 1365// } 1366// ); 1367// } 1368 1369 if( $( "#frmPropertyAlert" ).length > 0 ) 1370 { 1371 $( '#frmPropertyAlert' ).ajaxForm 1372 ( 1373 { 1374 url: '/' + sLng + '/lead/alert/', 1375 type: 'post', 1376 beforeSubmit: function() 1377 { 1378 $( '#frmPropertyAlert' ).validate 1379 ( 1380 { 1381 rules: 1382 { 1383 name: { required:true }, 1384 email: { required:true, email:true } 1385 1386 }, 1387 messages: 1388 { 1389 name: '', 1390 email: '' 1391 }, 1392 errorElement: "div" 1393 } 1394 ); 1395 1396 console.log( $( '#frmPropertyAlert' ).valid() ); 1397 1398 if( $( '#frmPropertyAlert' ).valid() ) 1399 { 1400 return true; 1401 } 1402 1403 return false; 1404 }, 1405 success: function( response ) 1406 { 1407 if( oSearch.thankYouPage == 'y' ) 1408 { 1409 window.location = "/" + sLng + "/" + response + "/"; 1410 } 1411 else 1412 { 1413 $( '#frmPropertyAlertWrapper' ).html( response ); 1414 } 1415 } 1416 } 1417 ); 1418 } 1419 1420 if( $( '#frmRecommend' ).length > 0 ) 1421 { 1422 $( '#frmRecommend' ).ajaxForm 1423 ( 1424 { 1425 url: '/' + sLng + '/lead/recommend/', 1426 type: 'post', 1427 beforeSubmit: function() 1428 { 1429 $( '#frmRecommend' ).validate 1430 ( 1431 { 1432 rules: 1433 { 1434 name: { required:true }, 1435 email: { required:true, email:true }, 1436 nameFriend: { required:true }, 1437 emailFriend: { required:true, email:true } 1438 1439 }, 1440 messages: 1441 { 1442 name: '', 1443 email: '', 1444 nameFriend: '', 1445 emailFriend: '' 1446 }, 1447 errorElement: "div" 1448 } 1449 ); 1450 1451 if( $( '#frmRecommend' ).valid() ) 1452 { 1453 $( '#frmRecommendWrapper' ).block 1454 ( 1455 { 1456 overlayCSS: { backgroundColor: '#fefefe' }, 1457 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1458 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1459 } 1460 ); 1461 1462 return true; 1463 } 1464 1465 return false; 1466 }, 1467 success: function( response ) 1468 { 1469 $( '#frmRecommendWrapper' ).unblock(); 1470 1471 if( oSearch.thankYouPage == 'y' ) 1472 { 1473 window.location = "/" + sLng + "/" + response + "/"; 1474 } 1475 else 1476 { 1477 $( '#frmRecommendWrapper' ).html( response ); 1478 } 1479 } 1480 } 1481 ); 1482 } 1483 1484 if( $( '#frmPropertyFinder' ).length > 0 ) 1485 { 1486 $( '#frmPropertyFinder' ).ajaxForm 1487 ( 1488 { 1489 url: '/' + sLng + '/lead/finder/', 1490 type: 'post', 1491 beforeSubmit: function() 1492 { 1493 $( '#frmPropertyFinder' ).validate 1494 ( 1495 { 1496 rules: 1497 { 1498 name: { required:true }, 1499 email: { required:true, email:true } 1500 }, 1501 messages: 1502 { 1503 name: '', 1504 email: '' 1505 }, 1506 errorElement: "div" 1507 } 1508 ); 1509 1510 console.log( $( '#frmPropertyFinder' ).valid() ); 1511 1512 if( $( '#frmPropertyFinder' ).valid() ) 1513 { 1514 return true; 1515 } 1516 1517 return false; 1518 }, 1519 success: function( response ) 1520 { 1521 if( oSearch.thankYouPage == 'y' ) 1522 { 1523 window.location = "/" + sLng + "/" + response + "/"; 1524 } 1525 else 1526 { 1527 $( '#frmPropertyFinderWrapper' ).html( response ); 1528 } 1529 } 1530 } 1531 ); 1532 } 1533 1534 if( $( '#frmPropertyFinderExtended' ).length > 0 ) 1535 {
1536 $( '#frmPropertyFinderExtended' ).ajaxForm 1537 ( 1538 { 1539 url: '/' + sLng + '/lead/finder/', 1540 type: 'post', 1541 beforeSubmit: function() 1542 { 1543 $( '#frmPropertyFinderExtended' ).validate 1544 ( 1545 { 1546 rules: 1547 { 1548 name: { required:true }, 1549 email: { required:true, email:true } 1550 }, 1551 messages: 1552 { 1553 name: '', 1554 email: '' 1555 }, 1556 errorElement: "div" 1557 } 1558 ); 1559 1560 console.log( $( '#frmPropertyFinderExtended' ).valid() ); 1561 1562 if( $( '#frmPropertyFinderExtended' ).valid() ) 1563 { 1564 return true; 1565 } 1566 1567 return false; 1568 }, 1569 success: function( response ) 1570 { 1571 if( oSearch.thankYouPage == 'y' ) 1572 { 1573 window.location = "/" + sLng + "/" + response + "/"; 1574 } 1575 else 1576 { 1577 $( '#frmPropertyFinderExtendedWrapper' ).html( response ); 1578 } 1579 } 1580 } 1581 ); 1582 } 1583 1584 if( $( '#frmPropertyFinderQuick0' ).length > 0 ) 1585 { 1586 $( '#frmPropertyFinderQuick0' ).ajaxForm 1587 ( 1588 { 1589 url: '/' + sLng + '/lead/finder/', 1590 type: 'post', 1591 beforeSubmit: function() 1592 { 1593 $( '#frmPropertyFinderQuick0' ).validate 1594 ( 1595 { 1596 rules: 1597 { 1598 name: { required:true }, 1599 email: { required:true, email:true } 1600 }, 1601 messages: 1602 { 1603 name: '', 1604 email: '' 1605 }, 1606 errorElement: "div" 1607 } 1608 ); 1609 1610 console.log( $( '#frmPropertyFinderQuick0' ).valid() ); 1611 1612 if( $( '#frmPropertyFinderQuick0' ).valid() ) 1613 { 1614 return true; 1615 } 1616 1617 return false; 1618 }, 1619 success: function( response ) 1620 { 1621 if( oSearch.thankYouPage == 'y' ) 1622 { 1623 window.location = "/" + sLng + "/" + response + "/"; 1624 } 1625 else 1626 { 1627 $( '#frmPropertyFinderQuick0Wrapper' ).html( response ); 1628 } 1629 } 1630 } 1631 ); 1632 } 1633 1634 if( $( '#frmPropertyFinderQuick1' ).length > 0 ) 1635 { 1636 $( '#frmPropertyFinderQuick1' ).ajaxForm 1637 ( 1638 { 1639 url: '/' + sLng + '/lead/finder/', 1640 type: 'post', 1641 beforeSubmit: function() 1642 { 1643 $( '#frmPropertyFinderQuick1' ).validate 1644 ( 1645 { 1646 rules: 1647 { 1648 name: { required:true }, 1649 email: { required:true, email:true } 1650 }, 1651 messages: 1652 { 1653 name: '', 1654 email: '' 1655 }, 1656 errorElement: "div" 1657 } 1658 ); 1659 1660 console.log( $( '#frmPropertyFinderQuick1' ).valid() ); 1661 1662 if( $( '#frmPropertyFinderQuick1' ).valid() ) 1663 { 1664 return true; 1665 } 1666 1667 return false; 1668 }, 1669 success: function( response ) 1670 { 1671 if( oSearch.thankYouPage == 'y' ) 1672 { 1673 window.location = "/" + sLng + "/" + response + "/"; 1674 } 1675 else 1676 { 1677 $( '#frmPropertyFinderQuick1Wrapper' ).html( response ); 1678 } 1679 } 1680 } 1681 ); 1682 } 1683 1684 if( $( '#frmEnquiry' ).length > 0 ) 1685 { 1686 $( '#frmEnquiry' ).ajaxForm 1687 ( 1688 { 1689 url: '/en/lead/enquiry/', 1690 type: 'post', 1691 beforeSubmit: function() 1692 { 1693 $( '#frmEnquiry' ).validate 1694 ( 1695 { 1696 rules: 1697 { 1698 name: { required:true }, 1699 email: { required:true, email:true }, 1700 accept: { required:true } 1701 1702 }, 1703 messages: 1704 { 1705 name: '', 1706 email: '', 1707 accept: '' 1708 }, 1709 errorElement: "div" 1710 } 1711 ); 1712 1713 console.log( $( '#frmEnquiry' ).valid() ); 1714 1715 if( $( '#frmEnquiry' ).valid() ) 1716 { 1717 $( '#frmEnquiryWrapper' ).block 1718 ( 1719 { 1720 overlayCSS: { backgroundColor: '#fefefe' }, 1721 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1722 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1723 } 1724 ); 1725 1726 return true; 1727 } 1728 1729 return false; 1730 }, 1731 success: function( response ) 1732 { 1733 $( '#frmEnquiryWrapper' ).unblock(); 1734 1735 if( oSearch.thankYouPage == 'y' ) 1736 { 1737 window.location = "/" + sLng + "/" + response + "/"; 1738 } 1739 else 1740 { 1741 $( '#frmEnquiryWrapper' ).html( response ); 1742 } 1743 } 1744 } 1745 ); 1746 } 1747 1748 if( $( '#frmValuation' ).length > 0 ) 1749 {
1750 $( '#frmValuation' ).ajaxForm 1751 ( 1752 { 1753 url: '/en/lead/valuation/', 1754 type: 'post', 1755 beforeSubmit: function() 1756 { 1757 $( '#frmValuation' ).validate 1758 ( 1759 { 1760 rules: 1761 { 1762 name: { required:true }, 1763 email: { required:true, email:true }, 1764 accept: { required:true } 1765 1766 }, 1767 messages: 1768 { 1769 name: '', 1770 email: '', 1771 accept: '' 1772 }, 1773 errorElement: "div" 1774 } 1775 ); 1776 1777 console.log( $( '#frmValuation' ).valid() ); 1778 1779 if( $( '#frmValuation' ).valid() ) 1780 { 1781 $( '#frmValuationWrapper' ).block 1782 ( 1783 { 1784 overlayCSS: { backgroundColor: '#fefefe' }, 1785 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1786 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1787 } 1788 ); 1789 1790 return true; 1791 } 1792 1793 return false; 1794 }, 1795 success: function( response ) 1796 { 1797 $( '#frmValuationWrapper' ).unblock(); 1798 1799 if( oSearch.thankYouPage == 'y' ) 1800 { 1801 window.location = "/" + sLng + "/" + response + "/"; 1802 } 1803 else 1804 { 1805 $( '#frmValuationWrapper' ).html( response ); 1806 } 1807 } 1808 } 1809 ); 1810 } 1811 1812 if( $( '#frmListProperty' ).length > 0 ) 1813 { 1814 $( '#frmListProperty' ).ajaxForm 1815 ( 1816 { 1817 url: '/en/lead/property/', 1818 type: 'post', 1819 beforeSubmit: function() 1820 { 1821 $( '#frmListProperty' ).validate 1822 ( 1823 { 1824 rules: 1825 { 1826 name: { required:true }, 1827 email: { required:true, email:true }, 1828 accept: { required:true } 1829 1830 }, 1831 messages: 1832 { 1833 name: '', 1834 email: '', 1835 accept: '' 1836 }, 1837 errorElement: "div" 1838 } 1839 ); 1840 1841 console.log( $( '#frmListProperty' ).valid() ); 1842 1843 if( $( '#frmListProperty' ).valid() ) 1844 { 1845 $( '#frmListPropertyWrapper' ).block 1846 ( 1847 { 1848 overlayCSS: { backgroundColor: '#fefefe' }, 1849 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1850 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1851 } 1852 ); 1853 1854 return true; 1855 } 1856 1857 return false; 1858 }, 1859 success: function( response ) 1860 { 1861 $( '#frmListPropertyWrapper' ).unblock(); 1862 1863 if( oSearch.thankYouPage == 'y' ) 1864 { 1865 window.location = "/" + sLng + "/" + response + "/"; 1866 } 1867 else 1868 { 1869 $( '#frmListPropertyWrapper' ).html( response ); 1870 } 1871 } 1872 } 1873 ); 1874 } 1875 1876 if( $( '#frmHotProperty' ).length > 0 ) 1877 { 1878 $( '#frmHotProperty' ).ajaxForm 1879 ( 1880 { 1881 url: '/en/lead/property/', 1882 type: 'post', 1883 beforeSubmit: function() 1884 { 1885 $( '#frmHotProperty' ).validate 1886 ( 1887 { 1888 rules: 1889 { 1890 name: { required:true }, 1891 email: { required:true, email:true }, 1892 accept: { required:true } 1893 1894 }, 1895 messages: 1896 { 1897 name: '', 1898 email: '', 1899 accept: '' 1900 }, 1901 errorElement: "div" 1902 } 1903 ); 1904 1905 console.log( $( '#frmHotProperty' ).valid() ); 1906 1907 if( $( '#frmHotProperty' ).valid() ) 1908 { 1909 $( '#frmHotPropertyWrapper' ).block 1910 ( 1911 { 1912 overlayCSS: { backgroundColor: '#fefefe' }, 1913 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 1914 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1915 } 1916 ); 1917 1918 return true; 1919 } 1920 1921 return false; 1922 }, 1923 success: function( response ) 1924 { 1925 $( '#frmHotPropertyWrapper' ).unblock(); 1926 1927 if( oSearch.thankYouPage == 'y' ) 1928 { 1929 window.location = "/" + sLng + "/" + response + "/"; 1930 } 1931 else 1932 { 1933 $( '#frmHotPropertyWrapper' ).html( response ); 1934 } 1935 } 1936 } 1937 ); 1938 } 1939 1940 if( $( '#frmLanding' ).length > 0 ) 1941 { 1942 $( '#frmLanding' ).ajaxForm 1943 ( 1944 { 1945 url: '/en/lead/landing/', 1946 type: 'post', 1947 beforeSubmit: function() 1948 { 1949 $( '#frmLanding' ).validate 1950 ( 1951 { 1952 rules: 1953 { 1954 name: { required:true }, 1955 email: { required:true, email:true }, 1956 accept: { required:true } 1957 1958 }, 1959 messages: 1960 { 1961 name: '', 1962 email: '', 1963 accept: '' 1964 }, 1965 errorElement: "div" 1966 } 1967 ); 1968 1969 if( $( '#frmLanding' ).valid() ) 1970 { 1971 $( '#frmLandingWrapper' ).block 1972 ( 1973 { 1974 overlayCSS: { backgroundColor: '#fefefe' }, 1975 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 },
1976 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 1977 } 1978 ); 1979 1980 return true; 1981 } 1982 1983 return false; 1984 }, 1985 success: function( response ) 1986 { 1987 $( '#frmLandingWrapper' ).unblock(); 1988 1989 if( oSearch.thankYouPage == 'y' ) 1990 { 1991 window.location = window.location.href + "/" + response + "/"; 1992 } 1993 else 1994 { 1995 $( '#frmLandingWrapper' ).html( response ); 1996 } 1997 } 1998 } 1999 ); 2000 } 2001 2002 if( $( '#frmSellProperty' ).length > 0 ) 2003 { 2004 $( '#frmSellProperty' ).ajaxForm 2005 ( 2006 { 2007 url: '/en/lead/hotproperty/', 2008 type: 'post', 2009 beforeSubmit: function() 2010 { 2011 $( '#frmSellProperty' ).validate 2012 ( 2013 { 2014 rules: 2015 { 2016 name: { required:true }, 2017 email: { required:true, email:true }, 2018 accept: { required:true } 2019 2020 }, 2021 messages: 2022 { 2023 name: '', 2024 email: '', 2025 accept: '' 2026 }, 2027 errorElement: "div" 2028 } 2029 ); 2030 2031 console.log( $( '#frmSellProperty' ).valid() ); 2032 2033 if( $( '#frmSellProperty' ).valid() ) 2034 { 2035 $( '#frmSellPropertyWrapper' ).block 2036 ( 2037 { 2038 overlayCSS: { backgroundColor: '#fefefe' }, 2039 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 2040 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 2041 } 2042 ); 2043 2044 return true; 2045 } 2046 2047 return false; 2048 }, 2049 success: function( response ) 2050 { 2051 $( '#frmSellPropertyWrapper' ).unblock(); 2052 2053 if( oSearch.thankYouPage == 'y' ) 2054 { 2055 window.location = "/" + sLng + "/" + response + "/"; 2056 } 2057 else 2058 { 2059 $( '#frmSellPropertyWrapper' ).html( response ); 2060 } 2061 } 2062 } 2063 ); 2064 } 2065 2066 if( $( '#frmAgent' ).length > 0 ) 2067 { 2068 $( '#frmAgent' ).ajaxForm 2069 ( 2070 { 2071 url: '/en/lead/agent/', 2072 type: 'post', 2073 beforeSubmit: function() 2074 { 2075 $( '#frmAgent' ).validate 2076 ( 2077 { 2078 rules: 2079 { 2080 name: { required:true }, 2081 email: { required:true, email:true }, 2082 accept: { required:true } 2083 2084 }, 2085 messages: 2086 { 2087 name: '', 2088 email: '', 2089 accept: '' 2090 }, 2091 errorElement: "div" 2092 } 2093 ); 2094 2095 console.log( $( '#frmAgent' ).valid() ); 2096 2097 if( $( '#frmAgent' ).valid() ) 2098 { 2099 $( 'frmAgentWrapper' ).block 2100 ( 2101 { 2102 overlayCSS: { backgroundColor: '#fefefe' }, 2103 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 2104 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 2105 } 2106 ); 2107 2108 return true; 2109 } 2110 2111 return false; 2112 }, 2113 success: function( response ) 2114 { 2115 $( 'frmAgentWrapper' ).unblock(); 2116 2117 if( oSearch.thankYouPage == 'y' ) 2118 { 2119 window.location = "/" + sLng + "/" + response + "/"; 2120 } 2121 else 2122 { 2123 $( '#frmAgentWrapper' ).html( response ); 2124 } 2125 } 2126 } 2127 ); 2128 } 2129 2130 if( $( '#frmBooking' ).length > 0 ) 2131 { 2132 $( '#frmBooking' ).ajaxForm 2133 ( 2134 { 2135 url: '/jx/booking/request/', 2136 type: 'post', 2137 beforeSubmit: function() 2138 { 2139 $( '#frmBooking' ).validate 2140 ( 2141 { 2142 rules: 2143 { 2144 name: { required:true }, 2145 email: { required:true, email:true }, 2146 telephone: { required:true }, 2147 }, 2148 messages: 2149 { 2150 name: '', 2151 email: '', 2152 telephone: '' 2153 }, 2154 errorElement: "div" 2155 } 2156 ); 2157 2158 console.log( $( '#frmBooking' ).valid() ); 2159 2160 if( $( '#frmBooking' ).valid() ) 2161 { 2162 $( '#frmBookingWrapper' ).block 2163 ( 2164 { 2165 overlayCSS: { backgroundColor: '#fefefe' }, 2166 css: { border: 'none', height:'100%', width:'100%', backgroundColor: '#fefefe', opacity: 0.5 }, 2167 message: '<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom"></i>', 2168 } 2169 ); 2170 2171 return true; 2172 } 2173 2174 return false;
2175 }, 2176 success: function( response ) 2177 { 2178 $( '#frmBookingWrapper' ).unblock(); 2179 2180 if( oSearch.thankYouPage == 'y' ) 2181 { 2182 window.location = "/" + sLng + "/" + response + "/"; 2183 } 2184 else 2185 { 2186 $( '#frmBookingWrapper' ).html( response ); 2187 } 2188 } 2189 } 2190 ); 2191 } 2192 2193 if( $( '#weather' ).length > 0 ) 2194 { 2195// $( "#weather" ).load( "/dt/blck/weather.code" ); 2196 $( "#weather" ).load( "/jx/weather.load.php" ); 2197 2198// var o = $.parseJSON( $( ".searchData" ).html() ); 2199// 2200// $.simpleWeather 2201// ( 2202// { 2203// location: o.weatherLocation, 2204// woeid: '90237741', 2205// unit: o.weatherUnit, 2206// success: function( weather ) 2207// { 2208// html = '<img class="main" src="/thm/usr/img/weather/' + weather.code + 'd.png"> '; 2209//// html += '<span class="city">' + weather.city + '</span>'; 2210// html += '<span class="temp">' + weather.temp + '°' + weather.units.temp + '</span>'; 2211//// html += '<span class="current">' + weather.currently + '</span>'; 2212// html += '<table>' 2213// 2214// for( var i=1; i<3; i++) 2215// { 2216// html += '<tr><td><img class="icon" src="/thm/usr/img/weather/' + weather.forecast[i].code + 'd.png"></td><td>' + weather.forecast[i].day + ': ' + weather.forecast[i].high + '°' + weather.units.temp + '</td></tr>'; 2217// } 2218// 2219// html += '</table>' 2220// 2221// $( "#weather" ).html( html ); 2222// }, 2223// error: function( error ) 2224// {
2225// $("#weather").html( '<p>' + error + '</p>' ); 2226// } 2227// } 2228// ); 2229 } 2230 2231 // Back button on CMS pages 2232 $( 'a.back' ).click 2233 ( 2234 function() 2235 { 2236 parent.history.back(); 2237 return false; 2238 } 2239 ); 2240 2241 if( $( '#frmMortgage' ).length > 0 ) 2242 { 2243 $( "#amount" ).val( addCommas( $( ".prc" ).html(), "." ) ); 2244 $( '#start-date, #amount, #interest, #term-years, #term-months' ).keyup( calculateMonthlyPayment ); 2245 2246 calculateMonthlyPayment(); 2247 } 2248 2249 if( $( "#gallerySlider" ).length > 0 ) 2250 { 2251 var slider = new MasterSlider(); 2252 2253 slider.control( 'arrows' ); 2254 slider.control( 'lightbox' ); 2255 slider.control( 'thumblist' , { autohide:false ,dir:'h',align:'bottom', width:130, height:95, margin:1, space:1, hideUnder:400 } ); 2256 slider.setup( 'gallerySlider', { width:1240, height:700, layout:'boxed', space:0, loop:true, autoplay:true, view:'fade' } ); 2257 2258 $( "a[data-gal^='prettyPhoto']" ).prettyPhoto( { deeplinking:false, social_tools:false, overlay_gallery:false } ); 2259 } 2260 2261 if( $( "#gallerySliderCMS" ).length > 0 ) 2262 { 2263 var slider = new MasterSlider(); 2264 2265 slider.control( 'arrows' ); 2266 slider.control( 'lightbox' ); 2267 slider.control( 'thumblist' , { autohide:false ,dir:'h',align:'bottom', width:130, height:95, margin:1, space:1, hideUnder:400 } ); 2268 slider.setup( 'gallerySliderCMS', { width:1240, height:700, layout:'boxed', space:0, loop:true, autoplay:true, view:'fade' } ); 2269 2270 $( "a[data-gal^='prettyPhoto']" ).prettyPhoto( { deeplinking:false, social_tools:false, overlay_gallery:false } ); 2271 } 2272 2273 if( $( "#currencyConverter" ).length > 0 ) 2274 { 2275 function calculate() 2276 { 2277 n = $( "#amountCC" ).val().replace( /\D/g,'' ) / $( "#convertFromCC" ).children( ":selected" ).attr( "data-q23" ); 2278 n = n * $( "#convertToCC" ).children( ":selected" ).attr( "data-q23" ); 2279 n = numeral( n ).format( '0,0' ); 2280 2281 $( "#resultCC" ).val( n ); 2282 } 2283 2284 $( "#refreshCC" ).on( "click", function(){ calculate() } ); 2285 $( "#amountCC" ).on( "change", function(){ calculate() } ); 2286 $( "#convertFromCC" ).on( "change", function(){ calculate() } ); 2287 $( "#convertToCC" ).on( "change", function(){ calculate() } ); 2288 2289 $( "#amountCC" ).val( numeral( $( ".prc" ).html().replace( /\D/g,'' ) ).format( '0,0' ) ); 2290 $( "#convertToCC" ).val( "GBP" ); 2291 $( "#convertToCC" ).selectpicker( 'refresh' ); 2292 2293 calculate(); 2294 } 2295 2296 if( $( ".func" ).length > 0 ) 2297 { 2298 $( '.func' ).each 2299 ( 2300 function( index ) 2301 { 2302 $( this ).load 2303 ( 2304 '/jx/function.php?' + $( this ).attr( 'data-q23' ) 2305 ); 2306 } 2307 ) 2308 } 2309 2310 // FAQ 2311 function togglePanelIcon( e ) 2312 { 2313 $( e.target ).prev( ".panel-heading" ).find( ".accordion_icon" ).toggleClass( "fa-plus fa-minus" ); 2314 } 2315 2316 $( '.panel-group' ).on( 'hidden.bs.collapse', togglePanelIcon ); 2317 $( '.panel-group' ).on( 'shown.bs.collapse', togglePanelIcon ); 2318 } 2319);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.