Your symptoms are very suggestive for IBS.
Changed frequency and form of stools, alternating between constipation and diarrhea, bloated and feeling of gas in intestines, abdominal pain, mucus in stool are all symptoms of IBS.
Do you usually strain, feel an urgent need to have a bowel movement, or feel that you haven't completely passed a stool?
Have you noticed that abdominal pain and cramping go away after having a bowel movement?
Are you experiencing frequent headache and backache?
Do you have urinary problems?
Can you relate the appearance of these symptoms with some stressful period?