         alert 'Playback Error (' + video_error_codes[code] + ')'
         PlayNext(__currentTrack.artist, __currentTrack.title)
 
-$('#PlayerContainer .volume-bg').ready ->
-    $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide()
-    $('#PlayerContainer .controls .volume-icon #action i.fa-volume-off').hide()
-
-$('#PlayerContainer .progress-bg').on 'click', (e) ->
+playerContainer.find('.volume-bg').ready ->
+    playerContainer.find('.controls .volume-icon .action i.fa-volume-down').hide()
+    playerContainer.find('.controls .volume-icon #action i.fa-volume-off').hide()
+
+playerContainer.find('.progress-bg').on 'click', (e) ->
     percentage = (e.pageX - $(this).offset().left) / $(this).width()
     videojs('video_player').currentTime(percentage * videojs('video_player').duration())
-    $('#PlayerContainer .progress-current').css({'width': (percentage) * 100 + '%'})
-
-$('#PlayerContainer .volume-bg').on 'click', (e) ->
+    playerContainer.find('.progress-current').css({'width': (percentage) * 100 + '%'})
+
+playerContainer.find('.volume-bg').on 'click', (e) ->
     percentage = (e.pageX - $(this).offset().left) / $(this).width()
+    playerContainer.attr("data-volume", percentage)
+    playerContainer.find('.volume-icon').attr("data-ismuted", 0)
+    playerContainer.find('.volume-icon').find("i").removeClass("fa-volume-off").addClass("fa fa-volume-up")
     videojs('video_player').volume(percentage)
-    $('#PlayerContainer .volume-current').css({'width': (percentage) * 100 + '%'})
-    if percentage > 0.5
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').show()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-off').hide()
-    else if percentage < 0.5 and percentage > 0.1
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').hide()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').show()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-off').hide()
-    else
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').hide()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide()
-        $('#PlayerContainer .controls .volume-icon .action i.fa-volume-off').show()
-
-$('#PlayerContainer .track-info .backward').on 'click', (e) ->
+    playerContainer.find('.volume-current').css({'width': (percentage) * 100 + '%'})
+
+playerContainer.find('.track-info .backward').on 'click', (e) ->
     PlayPrevious(__currentTrack.artist, __currentTrack.title)
 
-$('#PlayerContainer .track-info .forward').on 'click', (e) ->
+playerContainer.find('.track-info .forward').on 'click', (e) ->
     PlayNext(__currentTrack.artist, __currentTrack.title)
 
-$('#PlayerContainer .track-info .repeat').on 'click', (e) ->
+playerContainer.find('.track-info .repeat').on 'click', (e) ->
     $(@).closest(".action").toggleClass("active")
 
-$('#PlayerContainer .track-info .random').on 'click', (e) ->
+playerContainer.find('.track-info .random').on 'click', (e) ->
     $(@).closest(".action").toggleClass("active")
 
-$('#PlayerContainer .volume-icon').on 'click', (e) ->
+playerContainer.find('.volume-icon').on 'click', (e) ->
     if(+$(@).attr("data-ismuted") == 1)
       $(@).attr("data-ismuted", 0)
       $(@).find("i").removeClass("fa-volume-off").addClass("fa fa-volume-up")
+      videojs('video_player').volume(playerContainer.attr("data-volume"))
     else
       $(@).attr("data-ismuted", 1)
       $(@).find("i").removeClass("fa-volume-up").addClass("fa fa-volume-off")
-
-$("#video-container .ExpandButton").on "click", (e) ->
+      videojs('video_player').volume(0)
+
+videoContainer.find(".ExpandButton").on "click", (e) ->
       $("#video-container").toggleClass "expanded"
    if e.keyCode is 39 and e.target.tagName != 'INPUT'
        PlayNext(__currentTrack.artist, __currentTrack.title)

$('#PlayerContainer .info .track-info .action .play, #PlayerContainer .info .track-info .action .pause').click ->
    if $(@).hasClass('play')
        videojs('video_player').play()
    else


    @.on 'play', ->
        if spinner_cover
            playerContainer.find('.cover #LoadingOverlay').hide()
            spinner_cover.stop()
        playerContainer.find('.info .track-info .action i.play').hide()
        playerContainer.find('.info .track-info .action i.pause').show()
    @.on 'pause', ->
        playerContainer.find('.info .track-info .action i.pause').hide()
        playerContainer.find('.info .track-info .action i.play').show()

    @.on 'error', (e) ->
        code = if e.target.error then e.target.error.code else e.code
