// gebruik $j als jquery variabele zodat deze niet conflicteerd met de scripts uit de smartsite formulieren generator
var $j = jQuery.noConflict();  
$j(document).ready(function(){

   // maak twee koloms lijsten van class='tweekoloms' door ze halverwege te splitsen

   $j('#meestbezochtlinks .tweekoloms').each(function(){
      var extraclass = "" + $j(this).attr('class');
      extraclass = extraclass.replace(/tweekoloms/,"");
      var aantal = Math.ceil(($j('li', this).length)/2)-1;
      $j('li:gt('+aantal+')',this).remove().clone().insertAfter(this).wrapAll("<ul class='"+extraclass+" tweekoloms twee'></ul>");
      $j(this).next('.twee').after('<br class="clear" />');
   })

   //  RANDOM FOTO OP HOMEPAGE

   var randnum = Math.random();
   var inum = 8;
   // Pas dit nummer aan naar het aantal foto's dat je wilt gebruiken

   var rand1 = Math.round(randnum * (inum-1)) + 1;
   images = new Array
   // Vul hier de te gebruiken foto's in
   images[1] = "vormgeving/image-homepage.jpg"
   images[2] = "vormgeving/moodimage/gemeentebalie.jpg"
   images[3] = "vormgeving/moodimage/Fietsers.jpg"
   images[4] = "vormgeving/moodimage/Dorpsstraat.jpg"
   images[5] = "vormgeving/moodimage/Landbouw.JPG"
   images[6] = "vormgeving/moodimage/Wonen.JPG"
   images[7] = "vormgeving/moodimage/Park.jpg"
   images[8] = "vormgeving/moodimage/Vistrap.jpg"


   // Ensure you have an array item for every image you are using.
   var image = images[rand1]
   $j("#top .moodimage").css('backgroundImage','url('+image+')')

   
});
