﻿// JavaScript Document


  var s = null;
  var x = null;
function Opens(id,bg){
   var o = document.getElementById(id);
   if(o.style.display == 'none'){
   o.style.display = 'block';
   Closesbg(bg)
   //b.className = 'ArrowB'
   }
   if(s !== null) {
   //o.style.display = 'none';
   Closes(s);
   }
   if(s == id){
   o.style.display = 'none';
   Closesbg(bg);
   return s = null;
   }
   return s = id
}
function Closesbg(e){
  var b = document.getElementById(e);
   if(b.className == 'ArrowR'){
      b.className = 'ArrowB'
   }
   if(x !== null) {
   //o.style.display = 'none';
   ClosesbgR(x);
   }
   if(x == e){ 
   b.className = 'ArrowR'
   return x = null;
   }
   return x = e
}
function Closes(name){
  var c = document.getElementById(name);
  //if(s == null) return;
  c.style.display = 'none';
  //return s = null;
}

function ClosesbgR(name){
  var v = document.getElementById(name);
  v.className = 'ArrowR';
  //return s = null;
}









$(document).ready(function() {
    $(".productXL li").hover(
			function() {
			    $(this).css("background", "#f2f2f2");
			    $(this).css("color", "#00245e");
			    $(this).css("font-weight", "bold");
			},
			function() {

			    $(this).css("background", "#ffffff");
			    $(this).css("color", "#b7b7b7");
			    $(this).css("font-weight", "normal")
			}
			 );
    $(".productXL li").click(function() {
        var s1 = $(this).attr("value");
        $("#hiddentypeid").val(s1);
        checkactivecode(s1);
        var s = $(this).html();
        $("#productInput1").html(s);
        $(".productXL").hide();
        $("#productInput1").removeClass("productInputArrowB");
        $("#productInput1").addClass("productInputArrowR")

    })


    $("#productInput1").click(function() {
        $(".productXL").show();
        $(".productSP").hide();
        $("#productInput2").removeClass("productInputArrowB");
        $("#productInput2").addClass("productInputArrowR");
        $(this).removeClass("productInputArrowR");
        $(this).addClass("productInputArrowB")
    })





    $(".productXL").mouseover(function() {
        $(this).show();
        $("#productInput1").addClass("productInputArrowB")
        $("#productInput1").removeClass("productInputArrowR");
    }).mouseout(function() {
        $(this).hide();
        $("#productInput1").removeClass("productInputArrowB");
        $("#productInput1").addClass("productInputArrowR")
    })


    $(".productSP").mouseover(function() {

        $(this).show();
        $("#productInput2").addClass("productInputArrowB")
        $("#productInput2").removeClass("productInputArrowR");
    }).mouseout(function() {
        $(this).hide();
        $("#productInput2").removeClass("productInputArrowB");
        $("#productInput2").addClass("productInputArrowR")
    })




    $(".productSP li").hover(
			function() {

			    $(this).css("background", "#f2f2f2");
			    $(this).css("color", "#00245e");
			    $(this).css("font-weight", "bold")
			},
			function() {

			    $(this).css("background", "#ffffff");
			    $(this).css("color", "#b7b7b7");
			    $(this).css("font-weight", "normal")
			}
			 );
    $(".productSP li").click(function() {
        var s2 = $(this).html();
        var s1 = $(this).attr("value");
        $("#hiddenproductclass").val(s1);
        checkactivecodetype(s1);
        $("#productInput2").html(s2);
        $(".productSP").hide();
        $("#productInput2").removeClass("productInputArrowB");
        $("#productInput2").addClass("productInputArrowR");
        var s1 = $(this).attr("value");
        // alert(s1);
        $("#hiddenproductclass").val(s1);

    })


    $("#productInput2").click(function() {
        $(".productSP").show();
        $(".productXL").hide();
        $("#productInput1").removeClass("productInputArrowB");
        $("#productInput1").addClass("productInputArrowR");
        $(this).removeClass("productInputArrowR");
        $(this).addClass("productInputArrowB")
    })




})