$(document).ready(function(){
  var forms = document.getElementsByTagName("form");
  for (var i=0; i<forms.length; i++) {
    forms[i].reset();
  }
  
  // MULTIPLE CHOICE RADIO BUTTON
  $(".radio .submit_button").click(function(){
    $(this).parent().parent().parent().children(".answer")
      .css("display", "block");
    $(this).siblings(".correct")
      .addClass("correct_answer");
  });
  
  // CHECKBOXES
  $(".checkboxes .submit_button").click(function(){
    $(this).parent().parent().parent().children(".answer")
      .css("display", "block");
    $(this).siblings(".correct")
      .addClass("correct_answer");
  });
  
  // INLINE DROPDOWNS
  $(".dropdown .submit_button").click(function(){
	$(this).parent().children(".dropdown_correct")
	.css("display","block");
	$(this).parent().parent().parent().children(".answer")
      .css("display","block");
	  $(this).siblings(".correct")
      .addClass("correct_answer");
  });
});


$(document).ready(function ($) {

  $('#checkbox').change(function(){
    setInterval(function () {
        moveRight();
    }, 3000);
  });
  
  var slideCount = $('#slider ul li').length;
  var slideWidth = $('#slider ul li').width();
  var slideHeight = $('#slider ul li').height();
  var sliderUlWidth = slideCount * slideWidth;
  
  $('#slider').css({ width: slideWidth, height: slideHeight });
  
  $('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth });
  
    $('#slider ul li:last-child').prependTo('#slider ul');

    function moveLeft() {
        $('#slider ul').animate({
            left: + slideWidth
        }, 200, function () {
            $('#slider ul li:last-child').prependTo('#slider ul');
            $('#slider ul').css('left', '');
        });
    };

    function moveRight() {
        $('#slider ul').animate({
            left: - slideWidth
        }, 200, function () {
            $('#slider ul li:first-child').appendTo('#slider ul');
            $('#slider ul').css('left', '');
        });
    };

    $('a.control_prev').click(function () {
        moveLeft();
    });

    $('a.control_next').click(function () {
        moveRight();
    });

});    





$(document).ready(function ($) {

  $('#checkbox').change(function(){
    setInterval(function () {
        moveRight();
    }, 3000);
  });
  
  var slideCount = $('#slider2 ul li').length;
  var slideWidth = $('#slider2 ul li').width();
  var slideHeight = $('#slider2 ul li').height();
  var sliderUlWidth = slideCount * slideWidth;
  
  $('#slider2').css({ width: slideWidth, height: slideHeight });
  
  $('#slider2 ul').css({ width: sliderUlWidth, marginLeft: - slideWidth });
  
    $('#slider2 ul li:last-child').prependTo('#slider2 ul');

    function moveLeft() {
        $('#slider2 ul').animate({
            left: + slideWidth
        }, 200, function () {
            $('#slider2 ul li:last-child').prependTo('#slider2 ul');
            $('#slider2 ul').css('left', '');
        });
    };

    function moveRight() {
        $('#slider2 ul').animate({
            left: - slideWidth
        }, 200, function () {
            $('#slider2 ul li:first-child').appendTo('#slider2 ul');
            $('#slider2 ul').css('left', '');
        });
    };

    $('a.control_prev').click(function () {
        moveLeft();
    });

    $('a.control_next').click(function () {
        moveRight();
    });

}); 






