(function ($, Drupal, drupalSettings) { $(document).ready(function () { // User login form $("#content #user-login-form .form-type-textfield label").text( $("#content #user-login-form .form-type-textfield label") .text() .replace("Username", "Username or e-mail address") ); $("#block-userlogin #user-login-form .form-type-textfield label").text( $("#block-userlogin #user-login-form .form-type-textfield label") .text() .replace("Username or email address.", "Email") ); $("#content #user-login-form").prepend( '
Please login using your email address to access members-only content.
' ); $("#content #user-login-form .form-type-textfield").append( 'You may login with either your assigned username or your e-mail address.' ); $("#content #user-login-form .form-type-password").append( 'The password field is case sensitive.' ); // get window width // $(window).resize(function() { var windowWidth = $(window).width(); if (windowWidth < 1024) { $("ul#superfish-main-navigation-accordion li .menuparent").click( function (event) { var element = $(this); var offsetX = event.offsetX; var elementWidth = element.width(); var calculated_width = windowWidth - 50; // if (clickPercentageX >= 75 && clickPercentageY >= 75) { if (offsetX <= calculated_width) { window.location.href = element.attr("href"); } } ); } // }); // Caption for images // Select all the images within the body tag $("body #content .field--name-field-body img, body #content .field--name-body img").each(function () { var altText = $(this).attr("alt"); // Get the alt text of the image var caption = $("