﻿// When the DOM is ready, init scripts.
jQuery(function ($) {
    //Bind the mouse enter and mouse leave events using
    // the convenience method, hover().
    $(".mainNav li").hover(
     function () {
        var selectedLink=$(this).find('a:first').attr("title")
        //console.log(selectedLink);
         //hide others
         $("#ConvenincePreview").addClass("hidden");
         $("#RetailPreview").addClass("hidden");
         $("#VoidPreview").addClass("hidden");
         $("#HardlinerPreview").addClass("hidden");

         //show the selected

         $("#"+ selectedLink).removeClass("hidden"); 
          
     },
     function () {
        //Hide all and show default
         $("#ConvenincePreview").css('dispaly', 'none');
         $("#RetailPreview").css('dispaly', 'none');
         $("#VoidPreview").css('dispaly', 'none');
         $("#HardlinerPreview").css('dispaly', 'none');

         //show the selected
         $("#ConvenincePreview").css('dispaly', 'block');
          
     }
    );

});

