// JavaScript Document

$(document).ready(function() {
// Preload all rollovers and apply active status
  $("a.vt_autorollover").each(function() {
    rollsrc =  $(this).children("img").attr("src");
    rollON = rollsrc.replace(/_off./ig,"_on.");
	$("<img>").attr("src", rollON);
	if ( $(this).hasClass("act") ) {$(this).children("img").attr("src", rollON);};
  });
//Rollover images
  $("a.vt_autorollover img").hover(
    function() {
	  imgsrc = this.src;
      matches = imgsrc.match(/_on./);
      if (!matches) {
        imgsrcON = imgsrc.replace(/_off./ig,"_on.");
        this.src = imgsrcON;
      }
	},
    function() {this.src = imgsrc;}
  );
//Dropdown menu
    $('ul.vt_dropdown li').hover(
        function() {
            $(this).find('ul.submenu').slideDown(200);
        },
        function() {
            $(this).find('ul.submenu').slideUp(1);
        }
    );
});