Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- $(function() {
- $("#shop-tea-img").mouseover(function(){
- $(this).css('cursor', 'pointer');
- });
- $("#shop-tea-img").click(function(){
- window.location='our-teas';
- });
- $('#about-us').mouseover(function(){
- $(this).css('cursor','pointer');
- });
- $("#about-us").click(function(){
- window.location='about-us';
- });
- $('#tea-of-mnth').mouseover(function(){
- $(this).css('cursor','pointer');
- });
- $("#tea-of-mnth").click(function(){
- window.location='teas-of-the-month';
- });
- // Selecting first menu item
- if( $("#tbCN").val() === "815EB6371535") {
- $("#subnav").find("li.dropdown.level1").first().addClass("open");
- }
- // scrollTo functionality
- //================================================
- var hand = function(){ $(this).css('cursor', 'pointer') };
- // feature1 image
- //---------------
- $('#Image-Maps_03 > .circle2').on('click', function(){
- $.scrollTo( '#feature2', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_03 > .circle2').mouseover(hand);
- $('#Image-Maps_03 > .circle3').on('click', function(){
- $.scrollTo( '#feature3', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_03 > .circle3').mouseover(hand);
- $('#Image-Maps_03 > .circle4').on('click', function(){
- $.scrollTo( '#feature4', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_03 > .circle4').mouseover(hand);
- // feature2 image
- //---------------
- $('#Image-Maps_08 > .circle1').on('click', function(){
- $.scrollTo( '#feature1', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_08 > .circle1').mouseover(hand);
- $('#Image-Maps_08 > .circle3').on('click', function(){
- $.scrollTo( '#feature3', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_08 > .circle3').mouseover(hand);
- $('#Image-Maps_08 > .circle4').on('click', function(){
- $.scrollTo( '#feature4', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_08 > .circle4').mouseover(hand);
- // feature3 image
- //---------------
- $('#Image-Maps_11 > .circle1').on('click', function(){
- $.scrollTo( '#feature1', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_11 > .circle1').mouseover(hand);
- $('#Image-Maps_11 > .circle2').on('click', function(){
- $.scrollTo( '#feature2', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_11 > .circle2').mouseover(hand);
- $('#Image-Maps_11 > .circle4').on('click', function(){
- $.scrollTo( '#feature4', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_11 > .circle4').mouseover(hand);
- // feature4 image
- //---------------
- $('#Image-Maps_13 > .circle1').on('click', function(){
- $.scrollTo( '#feature1', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_13 > .circle1').mouseover(hand);
- $('#Image-Maps_13 > .circle2').on('click', function(){
- $.scrollTo( '#feature2', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_13 > .circle2').mouseover(hand);
- $('#Image-Maps_13 > .circle3').on('click', function(){
- $.scrollTo( '#feature3', 1800, {offset: {top: -83, left: 0}});
- });
- $('#Image-Maps_13 > .circle3').mouseover(hand);
- // Store Locator
- $(".home-page").on("click", "#locate-a-store", function() {
- var zipCode = $("#zip-code").val();
- console.log("click" );
- if( zipCode ) {
- window.location = "store-locator?&ZIPCODE=" + zipCode;
- } else {
- // No Zip Code Entered
- }
- });
- //newsletter
- //--------------
- $('button#newsletter-register').click( function () {
- var $newsletterForm = $('#mc-embedded-subscribe-form');
- $newsletterForm.validate();
- if( $newsletterForm.valid() ) $newsletterForm.submit();
- });
- }); //document ready ends
- })(jQuery); //self invoking function ends
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement