as a foreign visitor, (show your passport), you first should buy a
swiss 1/2 price pass (valid for one month) at the sbb (swiss railways counter) at the airport. Price for one month CHF 110. This pass allows buying 1/2 price tickets for almost any public transportation in Switzerland (trains, trams, bus, cable-cars, mountain railways, ships). This half-price pass is valid up to the Jungfrau and back! The half price is also valid for first-class tickets (if you care for such).
Link to the half-price pass:
http://www.sbb.ch/en/leisure-holiday...m-buchung.html