   $(function () {
        $('#goodsDetailAtributesUL > li').each(function () {
        	//o kolik okno vyjede nahoru
            var distance = 30;
            //čas za který se okno vykreslí
            var time = 200; // kvuli AJAXu se muselo zrusit volani hodnoty z promene a muselo se to dat primo do kodu
            //čas za který okno zmizí
            var hideDelay = 150; // kvuli AJAXu se muselo zrusit volani hodnoty z promene a muselo se to dat primo do kodu

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('a', this);
            var info = $('.goodsDetailAtributesBuble', this).css('opacity', 0);

            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;
                    
                    info.css({
                        top: 65,
                        right: -55,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, 200, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, 200, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, 150);

                return false;
            });
        });
    });
    
    
    
    
    
    //bubliny pro NENI SKLADEM a NA ZAVOLANI
    
    $(function () {
		//čas za který se okno vykreslí
		var time = 200; // kvuli AJAXu se muselo zrusit volani hodnoty z promene a muselo se to dat primo do kodu
		//čas za který okno zmizí
		var hideDelay = 150; // kvuli AJAXu se muselo zrusit volani hodnoty z promene a muselo se to dat primo do kodu

		var hideDelayTimer = null;

		var beingShown = false;
		var shown = false;
		var trigger = $('a', this);
		var info = $('.goodsDetailBuyBuble', this).css('opacity', 0);
		
		$('#onCall').mouseover(function () {
			if (hideDelayTimer) clearTimeout(hideDelayTimer);
			if (beingShown || shown) {
				// don't trigger the animation again
				return;
			} else {
				// reset position of info box
				beingShown = true;
				
				info.css({
					bottom: -112,
					left: -45,
					display: 'block'
				}).animate({
					bottom: '-82px',
					opacity: 1
				}, 200, 'swing', function() {
					beingShown = false;
					shown = true;
				});
			}

			return false;
		}).mouseout(function () {
			if (hideDelayTimer) clearTimeout(hideDelayTimer);
			hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				info.animate({
					bottom: '-82px',
					opacity: 0
				}, 200, 'swing', function () {
					shown = false;
					info.css('display', 'none');
				});

			}, 150);

			return false;
		});
		
		$('#notAvailable').mouseover(function () {
			if (hideDelayTimer) clearTimeout(hideDelayTimer);
			if (beingShown || shown) {
				// don't trigger the animation again
				return;
			} else {
				// reset position of info box
				beingShown = true;
				
				info.css({
					bottom: -112,
					left: -25,
					display: 'block'
				}).animate({
					bottom: '-98px',
					opacity: 1
				}, 200, 'swing', function() {
					beingShown = false;
					shown = true;
				});
			}

			return false;
		}).mouseout(function () {
			if (hideDelayTimer) clearTimeout(hideDelayTimer);
			hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				info.animate({
					bottom: '-98px',
					opacity: 0
				}, 200, 'swing', function () {
					shown = false;
					info.css('display', 'none');
				});

			}, 150);

			return false;
		});
    });
    
