(function($) {
    $.fn.floating_panel = function(settings) {

    	var config = {
    		'fromCenter': 580,
    		'fromTop': 50,
    		'minTop': 200,
    		'location': 'left'
    	};

        if (settings) $.extend(config, settings);

    	var element = $(this);

    	var curWindow = $(window);


    	updateElement();


    	curWindow.scroll(function() {
   			updateElement();
    	});

    	function updateElement() {

    		var windowTop = curWindow.scrollTop();
    		if (windowTop + config.fromTop < config.minTop) {

    			if ('absolute' != element.css('position')) {
    				element.css('position', 'absolute');
    				element.css({'top':config.minTop});
    			}
    		} else {

				if ($.browser.msie && $.browser.version.substr(0,1)<7) {
						element.css({'top': windowTop + config.fromTop + "px"});
				}
				else {
	    			if ('fixed' != element.css('position')) {
	    				element.css('position', 'fixed');
	    				element.css({'top':config.fromTop});
	    			}
				}
    		}
    	}
    };

})(jQuery);

$(function() {
	$('#blockUp').mouseenter(function() {
		$(this).css('left','0px');
           }).mouseleave(function() {
		$(this).css('left','-5px');
           });
});
