// initialise plugins

$(document).ready( function()
{
    $("<div id='ie6notify' style='border: 2px solid #0066FF; padding: 10px; position: absolute; top: 3px; left: 3px; width: 312px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; text-align: justify; background-color: #fff; letter-spacing: 1px;'><p style='margin-bottom: 10px'><img src='http://www.philstricker.com/images/warning.jpg' alt='' style='float: left; margin-right: 3px;' />Deze site heeft gedetecteerd dat u Internet Explorer 6 gebruikt als uw Internet browser. Helaas wordt de site niet weergegeven zoals bedoeld is. Om een nieuwere versie van Internet Explorer te downloaden, ga dan naar de <a href='http://www.microsoft.com/windows/internet-explorer/default.aspx'>Microsoft website</a>.</p></div>").appendTo(document.body);
    $("#ie6notify").hide();
    if ($.browser.msie + $.browser.version == "true6.0") {
        $("#ie6notify").show();
    }
    $("#Ignore").click(function () {
        $("ie6notify").hide();
    });

   $('ul.nav').supersubs ({
       minWidth:  12,
       maxWidth:  22,
       extraWidth: 1
       }).superfish({
       autoArrows: false,
       speed: 'fast',
       delay: '0'
   });

   //PEPS.rollover.init();

    if ( $('.anythingSlider').length > 0 ) {
      $('.anythingSlider').anythingSlider({
          easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
          autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
          delay: 9000,                    // How long between slide transitions in AutoPlay mode
          startStopped: false,            // If autoPlay is on, this can force it to start stopped
          animationTime: 1800,             // How long the slide transition takes
          hashTags: false,                 // Should links change the hashtag in the URL?
          buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
  		  pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
  		  startText: "Go",             // Start text
          stopText: "Stop"               // Stop text
      });
    }
});

PEPS = {};

PEPS.rollover =
{
   init: function()
   {
      this.preload();

      var browser;

        $(".ro").hover(
           function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); },
           function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
        );
   },

   preload: function()
   {
      $(window).bind('load', function() {
         $('.ro').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(this).attr('src') ) ); });
      });
   },

   newimage: function( src ) { return src.substring( 0, src.search(/(\.[a-z]+)/) ) + '-over' + src.match(/(\.[a-z]+)/)[0]; },
   oldimage: function( src ){ return src.replace(/-over/, ''); }
};

function textFill(input) { //input focus text function
  var originalvalue = input.val();
  input.focus( function() {
  		if( $.trim(input.val()) == originalvalue ){ input.val(''); }
  });
  input.blur( function(){
  		if( $.trim(input.val()) == '' ){ input.val(originalvalue); }
  });
};

