$(document).ready(function(){
    var zz = 0;
    $("#select-shop").click(function(event){
        event.preventDefault();
        $("#shops-list-container").toggle();
        if ( !zz ){
            $(this).text('schowaj');
            zz = 1;
        } else {
            if($("#menu .shop a").text() == "Twój sklep"){
              $(this).text('wybierz');
            }
            else{
              $(this).text('zmień')
            }
               
               zz = 0;
        }
    });
    /* --- */
    $("#select-shop-1").click(function(event){
        event.preventDefault();
        $("#shops-list-container").toggle();
    });
    /* --- */
    $("#btn-promo-country").mouseenter(function(){
        $("#promos-list").show();
    });
    
    $("#btn-promo-country").mouseleave(function(){
        $("#promos-list").hide();
    });
    
    $("#promos-list").mouseenter(function(){
        $(this).show();
    });
    $("#promos-list").mouseleave(function(){
        $(this).hide();
    });
    //jQuery("#contact-links").columns(2, false);
    /* --- */
});

$(document).ready(function() {
    $(document).ready(function(){
        $("#main-rotator2-tabs").tabs("#main-rotator2-images > div", {
            effect: 'fade',
            rotate: true
        }).slideshow({interval: 4000, clickable: false});

        $("#main-rotator2-tabs").each(function() {
            $(this).data("slideshow").play();
        });
    })
});

function detectIE6() {
    if($.browser.msie && ($.browser.version).substring(0,1) == '6') {
	    $('#page-content').prepend(
            '<div id="ie6info">W twojej przeglądarce ten serwis może nie działać poprawnie,' +
            '   <a href="http://www.microsoft.com/poland/windows/internet-explorer/" target="_blank">zaktualizuj wersję przeglądarki</a>' +
            '</div>'
        );
    }
}

detectIE6();
