      jQuery(document).ready(function($) {
        $(function(){
          $.fn.loopedSlider.defaults.addPagination = true;
          $('#loopedSlider').loopedSlider();
        });
        $(function(){
          $("#wlpeLoginForm").validationEngine(); 
        });
        $(function(){
          $("#kgForm").validationEngine(); 
        });
        $(function(){
          $("#formaanmelden").validationEngine(); 
        });
        $('#add').click(function() {
          if($("#slcselection option").size()<10)
          {
            return !$('#slcresponse option:selected').remove().appendTo('#slcselection');
          }
          else
          {
            $("#alertmsg").show(1000);
            return false ;
          }
        });
        $('#remove').click(function() {
          $("#alertmsg").hide(1000);
          return !$('#slcselection option:selected').remove().appendTo('#slcresponse');
        });
      });
      
      // using this bitch for the vote form
      function ValidForm()
      {
        iNumsongs = document.getElementById('slcselection').options.length ;
        for(t=0;t<iNumsongs;t++)
        {
          document.getElementById('slcselection').options[t].selected=true;
        }
        if($("#slcselection option").size()<10){
            $("#alertmsg2").show(1000);
            return false ;
        }
        if($("#votecode").val().length!=8)
        {
            $("#alertmsg3").show(1000);
            return false ;
        }
        else
        {
          $("#alertmsg3").hide(1000);
          
        }
      }

      function doSearch()
      {
        $('#slcresponse').empty();
        $('#slcresponse').append('<option>Zoeken...</option>');
        setTimeout(performPost, 1000);
        function performPost()
        {
          $.post("ajax.fetch.songs.php", 
          {decennium: $("#decennium").val()},
          function(data){
           $('#slcresponse').empty();
           $('#slcresponse').append(data);          
          }
          );
        }
      }
      
      function doSearchPrepped(oElement)
      {
        $('#' + oElement).val('');
        $('#slcresponse').empty();
        $('#slcresponse').append('<option>Zoeken...</option>');
        setTimeout(performPost, 1000);
        function performPost()
        {
          $.post("ajax.fetch.songs.prepped.php", 
          {artiest: $("#artiest").val(),songtitle: $("#songtitle").val()},
          function(data){
           $('#slcresponse').empty();
           $('#slcresponse').append(data);          
          }
          );
        }
        return false;
      }
