$(document).ready(function() { $("#Panel").stickyPanel({ topPadding: 1, afterDetachCSSClass: "floated-panel", savePanelSpace: true }); }); function adjustDateToServerDate(date, serverTimezoneOffset){ //date object stores time in the browser's localtime. We need to artificially shift //it to var timezoneOffset = date.getTimezoneOffset()*60*1000; date.setTime(date.getTime() + timezoneOffset + serverTimezoneOffset*1000); /* date object has been shifted to artificial UTC time. Now let's * shift it to the server's timezone */ return date; } /** *handle to the jplayer window */ var _preview_window = null; /** *Gets the info from the view when menu action play choosen and opens the jplayer window. */ function openAudioPreview(p_event) { p_event.stopPropagation(); var audioFileID = $(this).attr('audioFile'); var playlistID = $('#pl_id:first').attr('value'); var playlistIndex = $(this).parent().parent().attr('id'); playlistIndex = playlistIndex.substring(4); //remove the spl_ open_playlist_preview(playlistID, playlistIndex); } function open_audio_preview(audioFileID, audioFileTitle, audioFileArtist) { // we need to remove soundcloud icon from audioFileTitle var index = audioFileTitle.indexOf("