var Monoslideshow = {

    main : function (){
        if($('#mainFlash').length>0)
            $('#mainFlash').flash({
                id      : 'game',
                swf     : 'slideshow/monoslideshow.swf',
                width   : '940px',
                height  : '328px',
                bgcolor : '#333333',
                flashvars: {
                    dataFile: "slideshow/monoslideshow.xml",
                    showLogo: "false"
                },
                params  : {
                    allowscriptaccess: "sameDomain",
                    allowfullscreen: "false",
                    allownetworking: "all",
                    bgcolor: "#333333"
                },
                attributes : {
                    id: "monoslideshow",
                    name: "monoslideshow"
                },
                hasVersion: 10,
                
                    hasVersionFail: function (options) {
			
                        $('#mainFlash').css({
                            'color':'#000'
                        }).html('Aby poprawnie wyświetlić tę zawartość, musisz mieć zainstalowany Flash 10+. <a href="http://get.adobe.com/pl/flashplayer/" target="_blank">Instaluj &raquo;</a>');
                        return false; // returning false means the expressInstaller document will not be used
                        //return true; // would have let the expressInstaller document be used
                    }
            });
    },
    realizacjaPresentation : function(){
        if($('#flashPresentation').length>0) {
           
            $('#flashPresentation').flash({
                id      : 'slideshow',
                swf     : '/slideshow/monoslideshow.swf',
                width   : '760px',
                height  : '570px',
                flashvars: {
                    dataFile: "/slideshow/monoslideshow.php?realizacja="+$('#flashPresentation').attr('class'),
                    showLogo: "false"
                },
                params  : {
                    allowscriptaccess: "sameDomain",
                    allowfullscreen: "false",
                    allownetworking: "all",
                    bgcolor: "ccc"
                },
                attributes : {
                    id: "slideshow",
                    name: "slideshow"
                }
            });
        }
    }
    
}

/**
 * Oczekuje na zaladowanie i sparsowanie html`a w dokumencie strony
 */
$(document).ready(function(){
    // add images to slideshow
   
    Monoslideshow.main();
    Monoslideshow.realizacjaPresentation();
    
   $('#main-news li').css({
       cursor:'pointer'
   })
   $('#main-news li').mouseenter(function(){
       $(this).addClass('over');
   }).mouseleave(function(){
       $(this).removeClass('over');
   }).click(function(){
       location.href=$(this).find('a').attr('href');
   });

    
});

