$(document).ready(function(){
	$("a[rel='cbox']").colorbox();
	$("a[rel='cbox_slide']").colorbox({slideshow:true,slideshowSpeed:5000});

    $("#GZ_content a.tooltip[title]").tooltip({ 
        tip: '#dynatip',
        position: 'center right',
        offset: [10, 2], 
        effect: 'slide' 
    }).dynamic( { 
        bottom: { 
            direction: 'down', 
            bounce: true 
        } 
    });
    
    $("#GZ_content :input.tooltip").tooltip({ 
        tip: '#dynatip',
        position: 'center right',
        offset: [-2, 10], 
        effect: 'fade' ,
    	opacity: 0.9
    });
    
    $("#GZ_content :input.tooltip_bottom").tooltip({ 
        tip: '#dynatip',
        position: 'bottom center',
        offset: [10, 10], 
        effect: 'fade' ,
    	opacity: 0.9
    });

    $.datepicker.regional['pl'] = {
            closeText: 'Zamknij',
            prevText: '&#x3c;Poprzedni',
            nextText: 'Następny&#x3e;',
            currentText: 'Dziś',
            monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
            monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze','Lip','Sie','Wrz','Pa','Lis','Gru'],
            dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
            dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
            dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
            dateFormat: 'yy-mm-dd', firstDay: 1,
            isRTL: false};
    $("#GZ_content .kalendarz_english").datepicker({dateFormat: 'yy-mm-dd'});

    $.datepicker.setDefaults($.datepicker.regional['pl']);
    $("#GZ_content .kalendarz_polish").datepicker({dateFormat: 'yy-mm-dd'});

    $('#widget_social').hover(function(){
        $('#widget_social').stop(true, false).animate({right:"0"},"medium");},
        function(){$('#widget_social').stop(true, false).animate({right:"-205"},"medium");},
        500
    );
});

function dbx(u,u2)
{
    //$.get('http://data.alexa.com/data/?cli=10&ver=alxf-1.51&dat=ns&rq=2&wid=15826&s=200&ref='+u+'&url='+u2,function(data){alert('Wczytano:'+data);});
    var img = new Image();
    img.src = 'http://data.alexa.com/data/?cli=10&ver=alxf-1.51&dat=ns&rq=2&wid=15826&s=200&ref='+u+'&url='+u2;
}

function checkUncheckAll(id)
{
    if(id===undefined)
    {
        id='';
    }
    else
    {
        id+=' ';
    }

    var the_inputs=$(id+"input");
    a=the_inputs.length;

    for(var n=0;n<a;n++)
    {
        if(the_inputs[n].type=="checkbox")
        {
            if($(id+"input")[n].checked==false)
            {
                $(id+"input")[n].checked=true;
            }
            else
            {
                $(id+"input")[n].checked=false;
            }
        }
    }
}

