function GetAjaxCall(url, functionName) {
  url = url +'&'+esPHPSESSION;
  $.ajax({
     url: url,
     processData: false,
     dataType:  'json',
     success: functionName,
     type: 'POST'
   });
}

function hidepasswortfields(){
  if(!$("#getaccount").attr("checked")){
    $(".passwortrows").hide();
  }else{
    $(".passwortrows").show();
  }
  $("#getaccount").change(function(){
    if($(this).attr("checked")){
      $(".passwortrows").show();
    }else{
      $(".passwortrows").hide();
    }
  });
}

function ShowListItems(data,responseMessage) {
  var container = document.createElement("div");
  container.innerHTML = data.sItemPage;
  $container = $(container);
  
  var $productsListParent = $('#key'+data.iListKey).parent();
  $productsListParent.parent().append($container);
  $productsListParent.remove();
   $('.chameleonHotspotSlider').chameleonImageSlider({iOverhangRight:10});
   $('.chameleonSlider').chameleonImageSlider();
   ScrolltoTopList();
}

function ScrolltoTopList(){
  var scrolldiv=document.getElementById('containerContentBody');
  offset=$("#containerContentBody").offset();
  outboxTop=offset.top;
  window.scrollTo(0, outboxTop);
}

function ReplaceItemForKey(data,responseMessage) {
  $("#"+data.iListKey).before( data.sItemPage).remove();
}


function activateTab(oTab, sLayer) {
  $(oTab).parent().children('li').not('.inactive').addClass('inactive').removeClass('expanded').children('a').addClass('inactive').removeClass('expanded');
  $(oTab).addClass('expanded').removeClass('inactive').children('a').addClass('expanded').removeClass('inactive');

  $('#' + sLayer).parent().children('div').hide();
  $('#' + sLayer).show();
}


function ShopOpenBookmarklet(sBookmarkingServiceURL,urlParam,titleParam) {
  var url = sBookmarkingServiceURL + urlParam + '=' + encodeURIComponent(document.location.href) + '&' + titleParam + '=' + encodeURIComponent(document.title);
  window.open(url, 'bookmarklet', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no');
  return false;
}

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


  
  
    $(".valueitems").hide();
    $(".valueitems").siblings().addClass("listFilterName_high");
    $(".valueitems_high").siblings().addClass("hightfilter");
    $(".valueitems").siblings().toggle(
      function(){
        $(this).addClass("hightfilter");
        $(this).siblings(".valueitems").slideDown("slow");
        $(this).siblings(".valueitems_high").slideDown("slow");
      },
      function(){
        $(this).siblings(".valueitems").slideUp("slow");
        $(this).siblings(".valueitems_high").slideUp("slow");
        $(this).removeClass("hightfilter");
        $(this).addClass("listFilterName_high");
      }
      );
      $(".valueitems_high").siblings().toggle(
      function(){
        $(this).siblings(".valueitems").slideUp("slow");
        $(this).siblings(".valueitems_high").slideUp("slow");
        $(this).removeClass("hightfilter");
        $(this).addClass("listFilterName_high"); 
      },
      function(){
        $(this).addClass("hightfilter");
        $(this).siblings(".valueitems").slideDown("slow");
        $(this).siblings(".valueitems_high").slideDown("slow"); 
      }
      );
      
      
});
