/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(function (){
	
		function trackEvent(action, title) {
			_gaq.push(['_trackEvent', 'Videos', action, title]);
		}
                
    var video = $("video").each(function(){
        var title = $(this).id;
        if (title !="Breve"){
            title=$("title").text();
        }
		this.addEventListener("play", function(){
                    trackEvent("play",title);

                }, false);
		this.addEventListener ("pause", function(){
                    trackEvent("pause",title);

                }, false);
		this.addEventListener ("ended", function(){
                    trackEvent("ended",title);

                }, false);
    });

})
