	var flashvars = {};
	flashvars.xmlFile = "http://info.soundtropolis.pl/flash/timer/xml/timer.xml";
		
	var params = {};
	params.play = "true";
	params.menu = "false";
	params.scale = "showall";
	params.wmode = "transparent";
	params.allowfullscreen = "true";
	params.allowscriptaccess = "always";
	params.allownetworking = "all";
	
$(document).ready(function(){

	    swfobject.embedSWF('/flash/timer/flash_timer.swf', 'timer', '280', '35', '10', null,flashvars,params, null);
		
		$('#fb_like').html(
				'<iframe src="http://www.facebook.com/plugins/likebox.php?id=142123202474826&width=190&connections=30&stream=false&header=true&height=609" scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 190px; height: 609px; position: absolute; top: 255px; left: 50%; margin-left: -645px; background: none repeat scroll 0% 0% white;" allowTransparency="true"></iframe>'
		);
					
	  $('#fb_like').delegate('iframe','mouseover',
	      function(){        
	          $(this).animate({          
	            marginLeft: '-525px'
	          },{ duration: 1000, queue: false });
	      }
	   );		
		
	  $('#fb_like').delegate('iframe','mouseout',
	      function(){
	        $(this).animate({          
	          marginLeft: '-645px'
	        },{ duration: 1000, queue: false });
	      }
	  );
			  
		$("a.fngal").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 
		
		$('#menu li').not('.lileft,.liright,.sep,#m_home').hover(
					function(){
						$(this).find('div:first').fadeIn('fast');
					},
					function(){
						$(this).find('div:first').fadeOut('fast');
					}
			);			

		if(parent.frames.length != 0){			
      $('a').attr('target','_parent');
		}
		var sitepath = $('.sitepath');
		
		if(requestCatId	!= ''){
			
			var aCat = $('ul#menu').find('a[id=m_'+requestCatId+']');
			aCat.addClass('active');
			var thCatName = '';
			if(aCat == undefined || !aCat.length){ //3rd menu				
				var thCat = $('div.thirdmenu a[id=thm_'+requestCatId+']');
				if(thCat.length){
					thCat.css('color','#06387E');
					var subId = thCat.parent().attr('id').split('_')[1];
					var aCat = $('ul#menu').find('a[id=m_'+subId+']'); //overwrite
					var thCatName = thCat.text();
				}
			}
						
			if(aCat.parent().hasClass('submenu')){
				sitepath.append(' -> '+aCat.parent().next().find('a').text());
			}
			
			if(aCat.length){
				sitepath.append(' -> '+aCat.text());
			} 		
			
			var bottomCat = $('#bottom_menu a[id=mb_'+requestCatId+']');						
			if(bottomCat.length){
				sitepath.append(' -> '+bottomCat.text());
			}
			
			if(thCatName){
				sitepath.append(' -> '+thCatName);
			}

			var gpages = $('#gpages .pageactive');
			if(gpages.length){
				sitepath.append(' (Strona: '+gpages.text()+')');
			}

			var pages = $('#pages .page_active');				
			if(pages.length){
				sitepath.append(' (Strona: '+pages.text()+')');
			}
										
		} else if(document.location == serverUrl+'/'){
			 $('ul#menu li[id=m_home]').find('a').addClass('active');
		}
					
		if(shop){
			sitepath.html('Home -> Shop');
		}
		
		var logos = Array(
        'videoworld.jpg#http://www.videoworld.pl/',
        'itrance.jpg#http://www.itrance.pl/',
        'hot_party.jpg#http://www.hotparty.pl/',
        'idance.jpg#http://idance.pl/',
        'dla_studenta.jpg#http://www.dlastudenta.pl/',
        'mm_silesia.pl.jpg#http://www.mmsilesia.pl/',
        'tromedia.jpg#http://tro.pl/',
        'planero.png#http://www.planero.pl/',
        'globtrance.jpg#http://www.globaltrance.pl/',
        'insilesiapl.jpg#http://insilesia.pl/',
        'wme.com.pl_white.jpg#http://www.wme.com.pl/',
        'ticketpro.png#http://www.ticketpro.pl/',
        'ftb.jpg#http://ftb.pl/',
		'nocowanie.png#http://nocowanie.pl/',
        'mediam.jpg#http://www.mediam.com/',
        'addicted.jpghttp://addicted.com.pl/',
        'djstrefa.gif#http://www.djstrefa.pl/',
        'sobotnia_noc.gif#http://www.sobotnianoc.pl/',
        'mojchorzow.jpg#http://mojchorzow.pl/',
        'amnesia.jpg#http://www.amnesia.com.pl/',
        'shok_logo.gif#http://www.shok.pl/',
        'iloveparty.jpg#http://www.iloveparty.pl/',
        'clubbing.png#http://www.clubbing.pl/v10/',
        'sm.jpg#http://www.stosunkimiedzynarodowe.pl/',
        'radio_park.png#http://radiopark.com.pl/',
        'radio-piekary.jpg#http://www.radiopiekary.pl/',
        'klubowa.jpg#http://www.klubowa.pl/'
			);

		logos.sort(function(){return 0.5 - Math.random();});
		var logosLength = logos.length;
		var marquee = $('ul#marquee');
		var el = marquee.find('li:first');

		for(var i=0;i<logosLength;i++){
			//marquee.find('li:first').append('<img src="/images/logos/'+logos[i]+'" alt="" />');
			var data = logos[i].split('#');
			el.append('<a href="'+data[1]+'" onclick="javascript: target=\'new\'" rel="nofollow"><img src="/images/logos/'+data[0]+'" alt="" /></a>');			
		}		
		marquee.marquee(
				{ 
			        yScroll: "bottom"  
			       , scrollSpeed: 20 
			       , pauseSpeed: 0  
			});			
		marquee.marquee('resume');
		
		 if(randImages.length){	    	   	
	   	$('#indexphoto').hide();
	   	switchImg(0);	    	
	 }
		
		
	});
		
    function switchImg(index) {
    	var bf = $('#indexphoto');
    	var path = serverUrl + randImages[index]["path"];    	
    	$('#indexphoto').fadeOut('normal',function(){
    		bf.html('<img style="display: block;margin: 0 auto" src="'+path+'" alt="">');
        	if(randImages[index]["orientation"] == "0"){	        	
            	bf.find('img:first').attr('width','402');
            } else {
            	bf.find('img:first').attr('height','287');        	
            }
    		bf.fadeIn('normal');    		
            if(index == randImages.length - 1) index = 0;
            else index = index + 1;        
            myTime = window.setTimeout("switchImg("+index+")",3500);
    	});
    }
