// $(window).on("load", function () { // defer this until everything else has loaded
//
// var script = document.createElement("script");
// script.type = "text/javascript";
// script.src = "//assets.pcrl.co/js/jstracker.min.js";
// script.onload = function () {
// };
// document.body.appendChild(script);
// });
// //
//
// $('.main_menu_item, #sub_menus > ul').hover(
// function () {
// subMenu($(this).attr('id'), 'on');
// }, function () {
// subMenu($(this).attr('id'), 'off');
// });
// Looks for a link inside div with class of "pointer". Redirects to that link value when anywhere in div is clicked.
$(".pointer").click(function () {
window.location = $(this).find("a").attr("href");
return false;
});
// FOR IE8 Radio, Checkboxes
$('input').change(function () { // click() worked too but change is safer
$(this).addClass("selected");
$('input:not(:checked)').removeClass("selected");
// adding a class to a wrapping element
// and then remove it to force IE8 to rerender
var testClass = "testClass";
$(this).parent().parent().addClass(testClass).removeClass(testClass);
});
$(document).ready(function () {
// $(document).on('click', '#welcomeEmail', function () {
// var value = $(this).val();
// if (value == 'Enter email address') {
// $('#welcomeEmail').val('');
// }
// });
// $(document).on('keydown', '#welcomeEmail', function (event) {
// if (event.which == 13) {
// event.preventDefault();
// $('#welcomeFrmBtn').click();
// }
// });
//
// $(document).on('blur', '#welcomeEmail', function () {
// var value = $(this).val();
// if (value == '') {
// $('#welcomeEmail').val('Enter email address');
// }
// });
//
// $(document).on('click', '#welcomeFrmBtn', function () {
// $(".error").hide();
// var hasError = false;
// var emailReg = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
// var gmailReg = /\w+([+]\w+)*@gmail\.com$/i;
// var emailaddressVal = $("#welcomeEmail").val();
// if (emailaddressVal == '') {
// hasError = true;
// } else if (!emailReg.test(emailaddressVal) && !gmailReg.test(emailaddressVal)) {
// showAlert('Please enter a valid email address.');
// hasError = true;
// }
//
// if (hasError == true) {
// return false;
// } else {
// openGoogleCaptchaDialog(validCaptcha, errorCaptcha);
// }
// });
//
// var uniformHeight = 0;
// $('#nav .submenu').each(function () {
// var submenuHeight = $(this).height();
// if (submenuHeight > uniformHeight) uniformHeight = submenuHeight;
// });
//
// $('#nav .submenu').css('height', uniformHeight + 'px');
if (typeof tryInit === 'function') {
tryInit();
customRec();
}
$('#footerContainer').show();
});
function validCaptcha() {
var g = $('#g-recaptcha-response').val();
var input = $("
").attr("name", "g-recaptcha-response").val(g);
$('#welcomeFrm').append(input);
$('#welcomeFrm').submit();
}
function errorCaptcha() {
showAlert('Please verify you\'re a real person by completing the Captcha.');
return false
}