onmouseout_cluetip = function(e) { hide_cluetip_timeout = setTimeout("$j(\'#cluetip\').hide();",500); };

onmouseover_cluetip = function(e) { clearTimeout(hide_cluetip_timeout); };

var hide_cluetip_timeout = null;

$j(document).ready(function() {

	$j.preloadImages([
		'/img/tooltip/rarrowleft.gif', 
		'/img/tooltip/rarrowright.gif', 
		'/img/tooltip/rarrowdown.gif',
		'/img/tooltip/rarrowup.gif', 
		'/img/tooltip/bl.gif', 
		'/img/tooltip/tl.gif',
		'/img/tooltip/tr.gif',
		'/img/tooltip/br.gif',
		'/img/tooltip/close.gif',
		'/img/layout/default/li4.gif'						
		]);

    $j('.loginBoxTooltip').cluetip({
        sticky: true,
        activation: 'click',
        positionBy: 'bottomTop',
        topOffset: 20,
        leftOffset: 20,
        cluetipClass: 'rounded',
        width: '210px',
        height: 'auto',
        showTitle: true,
        arrows: false,
        dropShadow: false,
        local: true,
        closeText: '<img src="/img/tooltip/close.png" alt="Zamknij" title="Zamknij" />',
        cursor: 'pointer',
        fx: {
            open: 'show'
        }
    });
    
    $j('#moreCategoriesIntro').cluetip({
        sticky: true,
        activation: 'click',
        topOffset: 20,
        leftOffset: 20,
        cluetipClass: 'rounded',
        width: '250px',
        height: 'auto',
        showTitle: true,
        arrows: true,
        dropShadow: false,
        local: true,
        closeText: '<img src="/img/tooltip/close.png" alt="Zamknij" title="Zamknij" />',
        cursor: 'pointer',
        fx: {
            open: 'show'
        }
    });    

    $j('.loginBoxTooltip, #cluetip-outer, #cluetip-arrows').mouseout(onmouseout_cluetip);
    $j('.loginBoxTooltip, #cluetip-outer, #cluetip-arrows').mouseover(onmouseover_cluetip);

});


universalBlock = function (elem){
    elem.block({
        message: '<img src="/img/loading.gif" />',
        css: {border: '0px',backgroundColor: 'transparent'},
        overlayCss: {opacity: '0.7'}
    });
}


