$(function() {

    $(".compairRight  .closeBtn1").click(function() {
        $(".compairPane").remove();
    });
    
    $(".cartPopup ul li .closeBtn3").click(function() {
        $(this).parent().remove();
    });
    $(".compairRight ul li .closeBtn3").click(function() {
        $(this).parent().remove();
    });
    $(".tabelPanel   ul li .delete-icon").click(function() {
        $(this).parent().parent().remove();
    });

    $(".compairPane ul li .closeBtn2").click(function() {
        $(this).parent().remove();
    });
    $(".cartPopup  .delete-icon").click(function() {
        $(".cartPopup").slideUp("slow");
    });
    $(".accountDetails  .border_0").click(function() {
        $(".cartPopup").slideToggle("slow");
    });

//Ckekout page
    $('.acLink').click(function(event) {
        $('.acLink').removeClass('activeMe');
        var show_article = $(this).attr('href');
        $(this).addClass('activeMe');
        $('.acodd').hide();
        $(show_article).show();
        //$('.acLink').parent().addClass('active');
        event.preventDefault();
    });


//compare
    $(".contentPanel ul li .close ").click(function() {
        $(this).parent().remove();
    });






});

$(document).ready(function() {
    $('#Order_Summary').show();
   // $('.acLink').addClass('activeMe');


//compare page  Multi columns equal
    var heightArray = $(".bootomDiv").map( function(){
            return  $(this).height();
        }).get();
  var maxHeight = Math.max.apply( Math, heightArray);
  $(".bootomDiv").height(maxHeight);
  $(".titlePanel .bootomDiv").height(maxHeight-2);


});


 $(function() {
        //Hide all sub menus or next element after a
        $(".category-list a").next().hide();
        //if any li is having grand_sub_menu class then add class has_submenu to the <li>
        $(".category-list li").has(".grand_sub_menu").addClass('has_submenu');
        //if grand sub menu have active class then remove has_submenu class from parent li to avoid hover event and add active class to parent li
        $(".grand_sub_menu").has(".grand_child_active").parent('li').removeClass('has_submenu').addClass('active').find('a:first').addClass('active');
			//alert('ramya')
        //Add hover effect for has_submenu class
        $(".has_submenu ").hover(function() {

            //add slidedown effect to those li who is not having active class
            $(this).not(".active").find(".grand_sub_menu").slideDown('slow');
        }, function() {
            $(this).not(".active").find(".grand_sub_menu").hide();
        });
        //show all next element of active class
        $("a.active").next().show();
        //also show parent element of grand_child_active class
        $(".grand_child_active").parent('.grand_sub_menu').show();

    });
	$(document).ready(function() {

 $(".has_submenu").hover(function(){


    if($(".has_submenu").hasClass("active-list"))
			{
				 $(this).removeClass("active-list");

			}
			else
			{
				$(this).addClass("active-list");

			}

})


var heightArray = $(".grand_sub_menu").map( function(){
            return  $(this).height();
        }).get();
  var maxHeight = Math.max.apply( Math, heightArray);
  $(".leftMenu").height(maxHeight);
    $(".rightMenu").height(maxHeight);


	$('.faqListing li div').hide();
    $('.faqListing li a').attr('href', 'javascript:void(0)')
    $('.faqListing li:first-child a').next('.faqListing li div').slideToggle();
    $('.faqListing li:first-child a').addClass('active')
    $('.faqListing li a').click(function()
    {
        var slidedowncheck;
        if (!$(this).next('.faqListing li div').is(':visible')) {
            slidedowncheck = 1;
        }
        $('.faqListing li div').slideUp();
        if (slidedowncheck == 1)
            $(this).next('.faqListing li div').slideToggle();

        $(".faqListing li a").removeClass('active');
        $(this).addClass('active');
    });

	});

