(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide01.jpg";
(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide02.jpg";
(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide03.jpg";
(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide04.jpg";
(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide05.jpg";
(new Image()).src="http://dealer.webmakerx.net/images/Sites/Site19604/Document/slide06.jpg";
(new Image()).src="http://dealer.webmakerx.net/Images/Sites/Site19604/Document/buttonON.gif";
(new Image()).src="http://dealer.webmakerx.net/Images/Sites/Site19604/Document/buttonOFF.gif";

$.noConflict();
jQuery(document).ready(function($){
  var delayFX = 10000;

  $("#button1").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide01").oneTime(250, "slideLOOP", rewriteFlash);});
  $("#button2").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide02").oneTime(250, "slideLOOP", rewriteFlash);});
  $("#button3").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide03").oneTime(250, "slideLOOP", rewriteFlash);});
  $("#button4").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide04").oneTime(250, "slideLOOP", rewriteFlash);});
  $("#button5").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide05").oneTime(250, "slideLOOP", rewriteFlash);});
  $("#button6").bind("click", function(){$("#cpButtons a.buttonON").removeClass("buttonON");$(this).addClass("buttonON");$("#Slide06").oneTime(250, "slideLOOP", rewriteFlash);});

  $("#button1").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});
  $("#button2").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});
  $("#button3").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});
  $("#button4").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});
  $("#button5").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});
  $("#button6").bind("mousedown", function(){$(this).siblings().stop(true, true);$(".button").stopTime("slideLOOP");});

  function rewriteFlash() {
  // Prevent rapid navigation
    $("#buttonCVR").css({"display":"block"});

  // Get Active Slide and Next Slide
    var $active = $("#centerpiece div.activeSlide");
    if ( $active.length == 0 ) $active = $("#centerpiece div:last");

    var $next =  $(this).length ? $(this)
        : $("#centerpiece div:first");

    
    $active.addClass("last-active");

    $next.css({opacity: 0.0})
      .addClass("activeSlide")
      .animate({opacity: 1.0}, 1500, function(){
        $active.removeClass("activeSlide last-active");
        $("#buttonCVR").css({"display":"none"});});

  // Get Active Button and Next Button
    var $activeBTN = $("#cpButtons a.buttonON");
    if ( $activeBTN.length == 0 ) $activeBTN = $("#cpButtons a:last");

    var $nextBTN =  $activeBTN.next().length ? $activeBTN.next()
        : $("#cpButtons a:first");

    $nextBTN.oneTime(delayFX, "slideLOOP", function(){$(this).click();});
  }

  $("#button1").click();
});
