$(document).ready(function() {
var easing_type = 'easeOutBounce';
var default_dock_height = '40';
var expanded_dock_height = $('#dock').height();
var body_height = $(window).height() - default_dock_height;
$('#fake-body').height(body_height);
$('#dock').css({'height': default_dock_height, 'position':'absolute', 'top': body_height});
upddock();
$(window).resize(function () {

updated_height = $(window).height() - default_dock_height;
$('#fake-body').height(updated_height); 
$('#dock').css({'top': updated_height});

upddock();

});

function upddock(){
updated_width=$(window).width()-320;
/*-$('#dock').css('marginleft')-$('#dock').css('marginright');-290-30;*/
$('#dock').css({'width': updated_width});
}

window.onfleXcrollRun=function(){ 
//your code that will be run after fleXcroll goes here. 
$('#bodyscroll_mcontentwrapper').css('zIndex', 'auto');
/*$('#bodyscroll_mcontentwrapper').css('width', 'auto');*/
$('#bodyscroll_hscrollerbar').css('zIndex', 'auto');
/*$('#bodyscroll_scrollwrapper').css('width', '100%');*/
}

/* Как вариант прыжка (прыгающего верхнего меню) */
/*
$('#menu_fixed').mouseover(function () {

$('#ddsk').animate({'marginTop':0+'px'},{queue:false, duration:800, easing: easing_type});

}).mouseout(function () {

$('#ddsk').animate({'marginTop':'-310px'},{queue:false, duration:800, easing: easing_type});

});*/

$('#dock').mouseover(function () {
expanded_height = $(window).height() - expanded_dock_height;
n=58;
$(this).animate({'height':expanded_dock_height-n,'top': expanded_height+n},{queue:false, duration:800, easing: easing_type
});

}).mouseout(function () {
body_height = $(window).height() - default_dock_height;
$(this).animate({'height':default_dock_height+20,'top': body_height},{queue:false, duration:800, easing: easing_type});
});
});
