function onPlayerStateChange(event) { var platform = getUrlParameter('platform'); var platform_id = getUrlParameter('platform_id'); switch(event.data) { case YT.PlayerState.ENDED: $('#rec247878397').removeClass("hithblk"); break; default: return; } }