2011-06-14 16:05:12 +00:00
|
|
|
$(function(){
|
2011-06-17 19:26:03 +00:00
|
|
|
if (document.location.host != 'beathaven.org' && document.location.host != 'localhost') {
|
|
|
|
document.location.href = 'http://beathaven.org/demo/';
|
|
|
|
}
|
2011-06-14 16:05:12 +00:00
|
|
|
beathaven.init();
|
|
|
|
$(window).resize(beathaven.adjustSizes)
|
2011-06-16 00:19:40 +00:00
|
|
|
window.setTimeout(beathaven.checkRedrawScrollbar, 500);
|
2011-06-14 16:05:12 +00:00
|
|
|
})
|
|
|
|
var beathaven = {
|
|
|
|
|
2011-06-16 00:19:40 +00:00
|
|
|
last_height: false,
|
|
|
|
|
2011-06-14 16:05:12 +00:00
|
|
|
init: function () {
|
|
|
|
this.drawInterface();
|
|
|
|
this.adjustSizes();
|
2011-06-17 15:13:47 +00:00
|
|
|
Ajax.detectPage();
|
2011-06-14 16:05:12 +00:00
|
|
|
},
|
2011-06-16 00:19:40 +00:00
|
|
|
|
2011-06-14 16:05:12 +00:00
|
|
|
drawInterface: function() {
|
|
|
|
},
|
2011-06-16 00:19:40 +00:00
|
|
|
|
2011-06-14 16:05:12 +00:00
|
|
|
adjustSizes: function() {
|
|
|
|
$('#data-container').height($(window).height() - $('#header-container').height());
|
2011-06-15 01:42:50 +00:00
|
|
|
$('#data-container').width($(window).width() - $('#player').width()).scrollbar();
|
2011-06-14 16:05:12 +00:00
|
|
|
$('#player-container').height($(window).height());
|
2011-06-15 01:42:50 +00:00
|
|
|
$('#playlist').height($(window).height() - $('#player').height()).scrollbar();
|
2011-06-16 00:19:40 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
checkRedrawScrollbar: function() {
|
|
|
|
var outer_height = $('#data-container > div').outerHeight();
|
|
|
|
if (outer_height > 300 && outer_height != beathaven.last_height) {
|
|
|
|
beathaven.last_height = outer_height;
|
|
|
|
beathaven.redrawScrollbar();
|
|
|
|
}
|
|
|
|
window.setTimeout(beathaven.checkRedrawScrollbar, 500);
|
|
|
|
},
|
|
|
|
|
|
|
|
redrawScrollbar: function() {
|
|
|
|
$('#data-container').html($('#data-container').find('.inner').first());
|
|
|
|
$('#data-container').scrollbar();
|
2011-06-14 16:05:12 +00:00
|
|
|
}
|
|
|
|
}
|