// @Last! Player Positioning

// Bind an event to window.onhashchange that, when the history state changes,
  // gets the url from the hash and displays either our cached content or fetches
  // new content to be displayed.
  $(window).bind( 'hashchange', function(e) {
    
    // Get the hash (fragment) as a string, with any leading # removed. Note that
    // in jQuery 1.4, you should use e.fragment instead of $.param.fragment().
    var url = $.param.fragment();
    
    // Add .bbq-current class to "current" nav link(s), only if url isn't empty.
    if(url == '/home') {
					$('#management_player').fadeOut(500);
					$('#management_playlist_button').fadeOut(500);
					$('#management_player').css({
                        'position' : 'absolute', 
                        'margin-left' : 0,
						'margin-top' : 0,
                    });
					$('.jp-play').css({
						'height' : 0,
						'width' : 0,
                    });
					$('.jp-pause').css({
						'height' : 0,
						'width' : 0,
                    });
					$('#management_playlist_button').css({
						'left' : 0,
                    });
    }
	else {
                    $('#management_player').fadeIn(500);
					$('#management_playlist_button').fadeIn(500);
					$('#management_player').css({
                        'position' : 'absolute', 
                        'margin-left' : 720,
						'margin-top' : -60,
						'height' : 34,
						'width' : 25,
                    });
					$('.jp-play').css({
						'height' : 34,
						'width' : 25,
						'background-image' : 'url(./images/player/play_menu.jpg)',
                    });
					$('.jp-pause').css({
						'height' : 34,
						'width' : 25,
						'background-image' : 'url(./images/player/pause_menu.jpg)',
                    });
					$('#management_playlist_button').css({
						'left' : -50000,
                    });
    }
  });
