1 document.getElementById("footeryear").innerHTML = new Date().getFullYear(); 2 3 $(function () { // wait for document ready 4 5 6 $('a.downarrowfixed').on('click', function() { 7 $('html, body').animate({scrollTop: '+=700px'}, 700); 8 }) 9 var lockfooter = new ScrollMagic.Scene({ 10 triggerElement: "main .goldlockup-trigger", 11 triggerHook: 1 12 }) 13 .setClassToggle("footer.goldlockup", "lock") 14 // .addIndicators({name: "animation5"}) 15 .addTo(controller) 16 17 18 }); 19 //form placeholders 20 $('.contactfields').on('input',function(e){ 21 currentinputid = "#" + $(this).attr('id'); 22 parentdiv = $(currentinputid).parent(); 23 //get the label of the parent of input 24 var thelabel = parentdiv.find('label'); 25 countchar = $(currentinputid).val().length; 26 if (countchar > 0) { 27 thelabel.fadeOut(0); 28 } else { 29 thelabel.fadeIn(0); 30 } 31 }); 32 33 jQuery(function($){ 34 $("#formdata_phone").mask("999-999-9999"); 35 }); 36 37 38 39 40 41 //Parallax header 42 jQuery(document).ready(function($){ 43 44 var top=$(window).scrollTop(); 45 var windowHeight=$(window).height(); 46 47 $(window).bind('scroll', function (e) { 48 top=$(window).scrollTop(); 49 // $('header').css({'background-position-y':Math.floor(top/4)}); 50 // console.log(top, windowHeight); 51 }); 52 }); 53 54 55 // $(document).on('click', '#hamburger', function() { 56 // $('body').toggleClass("menuopen"); 57 // loadmenu(); 58 // }); 59 60 61 jQuery(function($){ 62 $("#formdata_phone").mask("(999) 999-9999"); 63 }); 64 65 66 67 $("form .input .holddate input.movenext").keyup(function () { 68 if (this.value.length == this.maxLength) { 69 $(this).next('input').focus(); 70 } 71 }); 72 73 74 function loadhero() { 75 var theease = Expo.easeOut; 76 var tl = new TimelineMax(); 77 tl.to('header .img', 0.1, { 78 opacity: 1 79 }) 80 tl.to('header .coverup', 0.3, { 81 height:0 82 }) 83 tl.to('.menu', 0.4, { 84 top:27, 85 opacity:1, 86 onComplete: function() { 87 logosvg.play(); 88 } 89 }) 90 tl.addLabel('line') 91 tl.to('header .copy .line1.hidden .line', 1, { 92 top:0, 93 opacity:1, 94 ease: theease 95 },'line') 96 tl.to('header .copy .line2.hidden .line', 1, { 97 top:0, 98 opacity:1, 99 ease: theease 100 },'line') 101 tl.to('header .copy .line3.hidden .line', 1, { 102 top:0, 103 opacity:1, 104 ease: theease 105 },'line+=0.9') 106 tl.to('header .arrowdown', 0.2, { 107 opacity:1 108 }) 109 } 110 111 112 // $(document).on('click', '.formsubmit', function() { 113 // event.preventDefault(); 114 // var url = "action/captcha.php"; 115 // var captcha = $('#recaptchaResponse').val(); 116 // var postData = "recaptcha_response=" + captcha; 117 // $.ajax({ 118 // type: 'POST', 119 // url: url, 120 // data: postData, 121 // dataType: "html", 122 // beforeSend: function() { 123 // // setting a timeout 124 // $('.formsubmit').addClass('on'); 125 // $('.formsubmit').html('Sending <span>.</span><span>.</span><span>.</span>'); 126 // console.log(postData); 127 // }, 128 // success: function(data) { 129 // console.log(data); 130 // formSubmit(); 131 // } 132 // // dataType: 'html' 133 // }); 134 // }); 135 136 137 138 139 function isJson(str) { 140 try { 141 JSON.parse(str); 142 } catch (e) { 143 return false;
144 } 145 return true; 146 } 147 148 $(document).on('click', '.formsubmit', function() { 149 150 $('[id^="error_formdata_"]').hide(); 151 //check full name 152 // if (/\w+\s+\w+/.test($("#formdata_name").val())) { 153 // console.log('good'); 154 // } else { 155 // console.log('bad'); 156 // if ($('#formerror').length) { 157 // $('#formerror').fadeOut(); 158 // $('#formerror').html('Please enter a full name.'); 159 // $('#formerror').fadeIn(); 160 // } 161 // else { 162 // $('#error_formdata_name').html('Please enter a full name.'); 163 // $('#error_formdata_name').show(); 164 // } 165 // return false; 166 // } 167 168 // var moveindate = $('#date_month').val() + '/' + $('#date_day').val() + '/' + $('#date_year').val(); 169 var url = "action/contact.php"; 170 171 //if name is split // and account for fname var in actions/ php 172 // var fname = $('#formdata_fname').val(); 173 // var lname = $('#formdata_lname').val(); 174 // var grabpostdata = $('#theform').serialize(); 175 // var postData = grabpostdata + "&formdata_name=" + fname + " " + lname; 176 177 var postData = $('#theform').serialize(); 178 // var postData = postData_get + '&formdata_move_in_date=' + moveindate; 179 180 $.ajax({ 181 type: 'POST', 182 url: url, 183 data: postData, 184 dataType: "html", 185 beforeSend: function() { 186 // setting a timeout 187 $('.formsubmit').addClass('on'); 188 $('.formsubmit').html('Sending <span>.</span><span>.</span><span>.</span>'); 189 console.log(postData); 190 }, 191 success: function(data) { 192 $('.formsubmit').removeClass('on'); 193 if (data == "Success") { 194 if ($('#formerror').length) { 195 $('#formerror').fadeOut(); 196 } 197 else { 198 $('[id^="error_formdata_"]').hide(); 199 } 200 $(".holdform").fadeOut(function() { 201 $(".holdthanks").fadeIn(); 202 }); 203 204 //track Adwords conversion 205 gtag('event', 'conversion', {'send_to': 'AW-1029912699/VxFWCNu9kpUBEPvwjOsD'}); 206 207 208 } else if (data == "nameerror") { 209 $('#formerror').html('Please enter a first and last name'); 210 $('.formsubmit').html('Submit'); 211 } else { 212 if (isJson(data)) { 213 let res = JSON.parse(data); 214 for (index in res) { 215 $('#' + res[index].id).html(res[index].msg); 216 $('#' + res[index].id).show(); 217 } 218 $('.formsubmit').html('Submit'); 219 } 220 else { 221 if ($('#formerror').length) { 222 $('#formerror').fadeIn(); 223 $('#formerror').html(data); 224 $('.formsubmit').html('Submit'); 225 } 226 } 227 } 228 } 229 // dataType: 'html' 230 }); 231 }); 232 233 234 235 //smooth scroll 236 $(function() { 237 // Desired offset, in pixels 238 var offset = -140; 239 // Desired time to scroll, in milliseconds 240 var scrollTime = 850; 241 242 $('a[href^="#"]').click(function() { 243 // Need both `html` and `body` for full browser support 244 $("html, body").animate({ 245 scrollTop: $( $(this).attr("href") ).offset().top + offset 246 }, scrollTime); 247 248 // Prevent the jump/flash 249 return false;
250 }); 251 }); 252 253 254 255 256 257 //slide to options 258 // $( ".swiper-container2 .swiper-slide" ).on( "click", function() { 259 // var slider2click = swiper1.clickedIndex - 2; 260 // swiper.slideTo(slider2click, 600); 261 // $('html, body').animate({ 262 // scrollTop: $('#portfolioitem').offset().top 263 // }, 800); 264 // }); 265 266 // $( ".navlinks.next" ).on( "click", function() { 267 // swiper1.slideNext(600); 268 // }); 269 270 // $( ".navlinks.prev" ).on( "click", function() { 271 // swiper1.slidePrev(600); 272 // }); 273 274 275 //Fancybox 276 $("[data-fancybox]").fancybox({ 277 loop : true, 278 keyboard : true, 279 toolbar : true, 280 animationEffect : "zoom-in-out", //false,zoom,fade, zoom-in-out 281 transitionEffect : "zoom-in-out", //false,fade, slide, circular,tube, zoom-in-out, rotate 282 transitionDuration : 600, 283 btnTpl : { 284 close : '<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}">' + 285 '<svg viewBox="0 0 40 40">' + 286 '<path d="M10,10 L30,30 M30,10 L10,30" />' + 287 '</svg>' + 288 '</button>', 289 // Arrows 290 arrowLeft : '<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}">' + 291 '<svg viewBox="0 0 40 40">' + 292 '<path d="M10,20 L30,20 L10,20 L18,28 L10,20 L18,12 L10,20"></path>' + 293 '</svg>' + 294 '</button>', 295 296 arrowRight : '<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}">' + 297 '<svg viewBox="0 0 40 40">' + 298 '<path d="M30,20 L10,20 L30,20 L22,28 L30,20 L22,12 L30,20"></path>' + 299 '</svg>' + 300 '</button>' 301 }, 302 // What buttons should appear in the top right corner. 303 buttons : [ 304 //'download', 305 //'zoom', 306 'close' 307 ], 308 }); 309 310 window.addEventListener('scroll', function(e) { 311 if( $(window).scrollTop() <= 200) { 312 if ($('.wow').hasClass('animated')) { 313 $(this).removeClass('animated'); 314 $(this).removeAttr('style'); 315 new WOW().init(); 316 } 317 } 318 }); 319 320 321 322 323 // function loadmenu() { 324 // var theease = Expo.easeOut; 325 // var mtl = new TimelineMax(); 326 // mtl.to('.navigationMenu', 0.4, { 327 // top: 0 328 // }) 329 // // tl.addLabel('line') 330 // } 331 332 // $(document).on('click', '#hamburger.off', function() { 333 $(document).on('click', '.menutext.off', function() { 334 loadmenu(true); 335 $(this).toggleClass('off on'); 336 $('.menu ul li.menutext').html('MENU <span>X</span>'); 337 $('body').toggleClass("menuopen"); 338 console.log(true); 339 }); 340 341 // $(document).on('click', '#hamburger.on', function() { 342 $(document).on('click', '.menutext.on', function() { 343 console.log(false); 344 loadmenu(false); 345 $('.menu ul li.menutext').html('MENU'); 346 $(this).toggleClass('off on'); 347 $('body').toggleClass("menuopen"); 348 }); 349 350 function loadmenu(what) { 351 if (what === true) { 352 mtl.play().timeScale(1.4); 353 } else { 354 mtl.reverse().timeScale(2); 355 } 356 } 357 358 var mtl = new TimelineMax(); 359 mtl.pause(); 360 mtl.to('.navigationMenu', 0.1, { 361 top:0, 362 opacity: 1, 363 ease: Power4.easeOut 364 }) 365 mtl.addLabel('menustart') 366 mtl.to('.navigationMenu ul li:nth-child(1)', 1, { 367 opacity:1, 368 y:35, 369 ease: Power4.easeOut 370 },'menustart+=0.1') 371 mtl.to('.navigationMenu ul li:nth-child(2)', 1, { 372 opacity:1, 373 y:35, 374 ease: Power4.easeOut 375 },'menustart+=0.2') 376 mtl.to('.navigationMenu ul li:nth-child(3)', 1, { 377 opacity:1, 378 y:35, 379 ease: Power4.easeOut 380 },'menustart+=0.3') 381 mtl.to('.navigationMenu ul li:nth-child(4)', 1, { 382 opacity:1, 383 y:35, 384 ease: Power4.easeOut 385 },'menustart+=0.4') 386 mtl.to('.navigationMenu ul li:nth-child(5)', 1, { 387 opacity:1, 388 y:35, 389 ease: Power4.easeOut 390 },'menustart+=0.5') 391 mtl.to('.navigationMenu ul li:nth-child(6)', 1, { 392 opacity:1, 393 y:35, 394 ease: Power4.easeOut 395 },'menustart+=0.6') 396 mtl.to('.navigationMenu ul li:nth-child(7)', 1, { 397 opacity:1, 398 y:35, 399 ease: Power4.easeOut 400 },'menustart+=0.7') 401 mtl.to('.navigationMenu ul li:nth-child(8)', 1, { 402 opacity:1, 403 y:35, 404 ease: Power4.easeOut 405 },'menustart+=0.8') 406 mtl.to('.navigationMenu ul li:nth-child(9)', 1, { 407 opacity:1, 408 y:35, 409 ease: Power4.easeOut 410 },'menustart+=0.9') 411 mtl.to('.navigationMenu ul li:nth-child(10)', 1, { 412 opacity:1, 413 y:35, 414 ease: Power4.easeOut 415 },'menustart+=1') 416 mtl.to('.navigationMenu ul li:nth-child(11)', 1, { 417 opacity:1, 418 y:35, 419 ease: Power4.easeOut 420 },'menustart+=1') 421 422 423 var mtlBack = new TimelineMax(); 424 mtlBack.pause(); 425 mtlBack.to('.navigationMenu', 0.1, { 426 top:0, 427 opacity: 1, 428 ease: Power4.easeOut 429 }) 430 mtlBack.addLabel('menustart') 431 mtlBack.to('.navigationMenu ul li:nth-child(1)', 1, { 432 opacity:1, 433 y:35, 434 ease: Power4.easeOut 435 },'menustart+=0.9') 436 mtlBack.to('.navigationMenu ul li:nth-child(2)', 1, { 437 opacity:1, 438 y:35, 439 ease: Power4.easeOut 440 },'menustart+=0.8') 441 mtlBack.to('.navigationMenu ul li:nth-child(3)', 1, { 442 opacity:1, 443 y:35, 444 ease: Power4.easeOut 445 },'menustart+=0.7') 446 mtlBack.to('.navigationMenu ul li:nth-child(4)', 1, { 447 opacity:1, 448 y:35, 449 ease: Power4.easeOut 450 },'menustart+=0.6') 451 mtlBack.to('.navigationMenu ul li:nth-child(5)', 1, { 452 opacity:1, 453 y:35, 454 ease: Power4.easeOut 455 },'menustart+=0.5') 456 mtlBack.to('.navigationMenu ul li:nth-child(6)', 1, { 457 opacity:1, 458 y:35, 459 ease: Power4.easeOut 460 },'menustart+=0.4') 461 mtlBack.to('.navigationMenu ul li:nth-child(7)', 1, { 462 opacity:1, 463 y:35, 464 ease: Power4.easeOut 465 },'menustart+=0.3') 466 mtlBack.to('.navigationMenu ul li:nth-child(8)', 1, { 467 opacity:1, 468 y:35, 469 ease: Power4.easeOut 470 },'menustart+=0.2') 471 mtlBack.to('.navigationMenu ul li:nth-child(9)', 1, { 472 opacity:1, 473 y:35, 474 ease: Power4.easeOut 475 },'menustart+=0.1') 476 mtlBack.to('.navigationMenu ul li:nth-child(10)', 1, { 477 opacity:1, 478 y:35, 479 ease: Power4.easeOut 480 },'menustart+=0.1') 481 mtlBack.to('.navigationMenu ul li:nth-child(11)', 1, { 482 opacity:1, 483 y:35, 484 ease: Power4.easeOut 485 },'menustart+=0.1') 486
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.