//when the DOM is ready 
$(document).ready(function() {
  //store in a variable the second paragraph
  //the first is 0, second is 1 in JS
  var $set1 = $('.questions_list_a');
  var $set2 = $('.questions_list_b');
  var $set3 = $('.questions_list_c');
  var $set4 = $('.questions_list_d');
  var $set5 = $('.questions_list_m');
  //use hide() method to hide it
  $set1.hide();
  $set2.hide();
  $set3.hide();
  $set4.hide();
  $set5.hide();
  
  
  //when you click on more link
  $('a.more1').click(function() {
	//show the second paragraph
	//using slideToogle() method
	//slow=6sec normal=4sec fast=2sec
    $set1.slideToggle('slow');
	//store the more link in a variable
	//called link
    var $link = $(this);
	//if read more were clicked
    if ( $link.text() == "read more" ) {
	  //change the link text
      $link.text('Chestionare auto categoria A');
    } else {
	  //else let it how it is
	  $link.text('Chestionare auto categoria A');
    }
  //keep the link from activating 
  //its default action
  return false;
							 
  });
  //when you click on more link
  $('a.more2').click(function() {
	//show the second paragraph
	//using slideToogle() method
	//slow=6sec normal=4sec fast=2sec
    $set2.slideToggle('slow');
	//store the more link in a variable
	//called link
    var $link = $(this);
	//if read more were clicked
    if ( $link.text() == "read more" ) {
	  //change the link text
      $link.text('Chestionare auto categoria B');
    } else {
	  //else let it how it is
	  $link.text('Chestionare auto categoria B');
    }
  //keep the link from activating 
  //its default action
  return false;
							 
  });
  //when you click on more link
  $('a.more3').click(function() {
	//show the second paragraph
	//using slideToogle() method
	//slow=6sec normal=4sec fast=2sec
    $set3.slideToggle('slow');
	//store the more link in a variable
	//called link
    var $link = $(this);
	//if read more were clicked
    if ( $link.text() == "read more" ) {
	  //change the link text
      $link.text('Chestionare auto categoria C');
    } else {
	  //else let it how it is
	  $link.text('Chestionare auto categoria C');
    }
  //keep the link from activating 
  //its default action
  return false;
							 
  });
  //when you click on more link
  $('a.more4').click(function() {
	//show the second paragraph
	//using slideToogle() method
	//slow=6sec normal=4sec fast=2sec
    $set4.slideToggle('slow');
	//store the more link in a variable
	//called link
    var $link = $(this);
	//if read more were clicked
    if ( $link.text() == "read more" ) {
	  //change the link text
      $link.text('Chestionare auto categoria D');
    } else {
	  //else let it how it is
	  $link.text('Chestionare auto categoria D');
    }
  //keep the link from activating 
  //its default action
  return false;
							 
  });
  //when you click on more link
  $('a.more5').click(function() {
	//show the second paragraph
	//using slideToogle() method
	//slow=6sec normal=4sec fast=2sec
    $set5.slideToggle('slow');
	//store the more link in a variable
	//called link
    var $link = $(this);
	//if read more were clicked
    if ( $link.text() == "read more" ) {
	  //change the link text
      $link.text('Chestionare auto Mecanica');
    } else {
	  //else let it how it is
	  $link.text('Chestionare auto Mecanica');
    }
  //keep the link from activating 
  //its default action
  return false;
							 
  });
});

