12
12
var locked = false;
13
13
var menuScrollAmount = 0;
14
14
var scrolling = false;
16
17
this.init = function(){
17
$("#menu").mouseover(function(e){
18
if(menuTimeout != null){
19
clearInterval(menuTimeout);
24
19
$('#menu ul li').mouseover(function() {
25
20
$('#tooltip-text').text($(this).text());
30
25
$('#menu ul li').click(function() {
31
26
var theClass = $(this).attr("class").replace(' bottom','');
32
theClass = theClass.replace(' temp', '');
27
theClass = theClass.replace(' temp', '').replace(' glow', '');
33
28
_this.handleMenuClick(theClass);
42
37
this.resize = function(){
43
var menuHeight = $(window).height() - 74;
38
var menuHeight = $(window).height() - 24;
44
39
$("#menu").css('height',menuHeight);
45
40
this.scrollCheck();
220
220
$("#menu ul li."+$menu+" img.open-arrow").show();
221
var $currentBackground = $("#menu ul li."+$menu).css('background-image');
222
if($menu != 'dash' && $menu != 'rubbish' && $currentBackground.indexOf('-active') == -1){
223
$indexLastSlash = $currentBackground.lastIndexOf('.');
224
$newBackgroundLink = $currentBackground.substr(0,$indexLastSlash) + '-active.png';
225
$("#menu ul li."+$menu).css('background-image',$newBackgroundLink);
229
this.getSelectedMenu = function() {
223
233
this.increaseFullscreen = function(){
224
_parent.systemSettings.increaseFullscreen();
234
//_parent.systemSettings.increaseFullscreen();
227
237
this.decreaseFullscreen = function(){
228
_parent.systemSettings.decreaseFullscreen();
238
//_parent.systemSettings.decreaseFullscreen();
231
241
this.wiggle = function($icon){
232
242
$('#menu').css('overflow','visible');
233
243
_parent.noWIndowSelected();
234
$("#menu ul li."+$icon).stop(true,false).animate({"marginLeft": "30px"}, "1000") .animate({"marginLeft": "0px"}, "1000", function(){ $('#menu').css('overflow','hidden'); });
244
//$("#menu ul li."+$icon).stop(true,false).animate({"marginLeft": "30px"}, "1000") .animate({"marginLeft": "0px"}, "1000", function(){ $('#menu').css('overflow','hidden'); });
245
$("#menu ul li."+$icon).addClass('glow').delay(600).queue(function(next){
246
$(this).removeClass("glow");
237
252
this.closeWindow = function($icon){
238
253
$("#menu ul li."+$icon+" img").hide();
254
var $currentBackground = $("#menu ul li."+$icon).css('background-image');
255
$("#menu ul li."+$icon).css('background-image',$currentBackground.replace('-active',''));
239
256
if($("#menu ul li."+$icon).hasClass('temp')){
240
257
$("#menu ul li."+$icon).hide();
253
270
this.scrollCheck();
256
this.triggerMenuOut = function() {
268
this.triggerMenuIn = function() {
271
menuTimeout = setTimeout(function() {
282
this.triggerJumpIn = function() {
285
menuTimeout = setTimeout(function() {
296
this.setLocked = function($locked){
300
this.menuGoingIn = function(){
304
this.isRunning = function(){
305
return (menuTimeout != null);
308
this.getTimer = function(){
312
this.isMenuOut = function(){
318
275
function scrollUp(){
324
281
function scrollDown(){
325
var maxscroll = ($(window).height() - 74) - ($('#menu ul .rubbish').position().top + $('#menu ul .rubbish').height() + 30);
282
var maxscroll = ($(window).height() - 24) - ($('#menu ul .rubbish').position().top + $('#menu ul .rubbish').height() + 30);
326
283
var pos = Math.max(maxscroll ,Math.min(0,$('#menu ul').position().top - 5));
327
284
$('#menu ul').css('top',pos+'px');
328
285
scrollingTimer = setTimeout("scrollDown()",50);