/* global MozActivity, alert, console, Notification */
"use strict";
(function () {

    var playRain = document.querySelector("#play-rain");
    if (playRain) {
        playRain.onclick = function () {
            var audio = document.querySelector("#audio-rain");

            if (audio.paused){
                playRain.textContent = "Pause Rain";
                audio.play();
            } else {
                playRain.textContent = "Play Rain";
                audio.pause();
            }

        }
    }

    var playCafe = document.querySelector("#play-cafe");
    if (playCafe) {
        playCafe.onclick = function () {
            var audio = document.querySelector("#audio-cafe");

            if (audio.paused){
                playCafe.textContent = "Pause Cafe";
                audio.play();
            } else {
                playCafe.textContent = "Play Cafe";
                audio.pause();
            }

        }
    }


})();
