$(function () {
    content.init();
    $('nav#mainmenu ul').superfish({
    autoArrows: false
  });
});

var content = function ($) {
    var $scroller;

  setupScroller = function () {
      $scroller = $(".scrollable");

      if (!$scroller.length) return;

      $scroller.cycle({ fx: 'fade', timeout:8000 });

  },

  init = function () {

      setupScroller();

  };

    return { init: init };
} (jQuery);

/* Utility functions */
(function ($) {
    $.fn.defaultValueInput = function () {
        for (var i = 0; i < this.length; i++) {
            $(this[i]).data('defaultValue', $(this[i]).attr('value'));
            $(this[i]).addClass('default-value');
        };
        this.focus(function () {
            if ($(this).attr('value') == $(this).data('defaultValue')) {
                $(this).attr('value', '');
                $(this).removeClass('default-value');
            }
        });
        this.blur(function () {
            if ($(this).attr('value') == '' || $(this).attr('value') == $(this).data('defaultValue')) {
                $(this).attr('value', $(this).data('defaultValue'));
                $(this).addClass('default-value');
            }
        });
    }
})(jQuery);
