/*
 * jQuery 1.1 - New Wave Javascript
 *
 * Copyright (c) 2007 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2007-01-14 17:37:33 -0500 (Sun, 14 Jan 2007) $
 * $Rev: 1073 $
 */

/*
 * jQuery Plugin
 *
 * Copyright (c) 2007 Matt Oakes (http://www.gizone.co.uk)
 * Licensed under the MIT (LICENSE.txt)
 */

jQuery.fn.slideup = function(options) {
	this.settings = {
		closeLink: 'none',
		animation: 'slide',
		height: '50' ,
        delay: 400
	}
	if(options)
		jQuery.extend(this.settings, options);

/*	
	if ( this.settings.animation != 'slide' && this.settings.animation != 'none' && this.settings.animation != 'fade' ) {
		alert('animation can only be set to \'slide\', \'none\' or \'fade\'');
	}
*/	
	var id = this.attr('id');
	settings = this.settings;

	jQuery(this).css('padding', '0').css('height', this.settings.height + 'px').css('margin', '0').css('width', '100%');
	jQuery('html').css('padding', '0 0 ' + ( this.settings.height * 1 + 50 ) + 'px 0');
	if ( typeof document.body.style.maxHeight != "undefined" ) {
		jQuery(this).css('position', 'fixed').css('bottom', '0').css('left', '0');
	}
	
	if ( this.settings.animation == 'slide' ) {
		jQuery(this).slideDown(this.settings.delay);
	}
	/*
	else if ( this.settings.animation == 'fade' ) {
		jQuery(this).fadeIn(this.settings.delay);
	}
	else {
		jQuery(this).show();
	}
	if ( this.settings.closeLink != 'none' ) {
		jQuery(this.settings.closeLink).click(function(){
			jQuery.closeslideup(id);
			return false;
		});
	}
	*/
	
	// Return jQuery to complete the chain
	return this;
};

jQuery.closeslideup = function(id) {
	this.slideup = jQuery('#' + id);
	jQuery(this.slideup).hide();
	jQuery('html').css('padding', '0');
	jQuery('body').css('overflow', 'visible'); // Change IE6 hack back
};// Open Slide Up
 
$(window).load(function(){
    $('#slideup').hide();
    //$('#slideup').html('Nejaky kod');
    this.settings= {closeLink: 'none',animation: 'slide',height: 90,delay: 1000  };
    $('#slideup').slideup(this.settings);
    window.setTimeout(function(){slideup_hide()}, 8 * 1000);
});

function slideup_hide(){
    $('#slideup').slideUp('slow');
    return false;
}
