/* pocet posunuti na referenci na hlavni strane      */


	$(document).ready(function(){
			$('#slider1').tinycarousel({ display: 2 });
		});
 
/* pocet posunuti na referenci na hlavni strane      */


/* ######################################################################     */   
    
    
/* sluzby na hlavni strane prepinani zalozek        */


 
 
    	$('document').ready(function(){
		$('#sluzby-container').quickFlip();
		
		$('#sluzby-navigation li a').each(function(){
			$(this).click(function(){
				$('#sluzby-navigation li').each(function(){
					$(this).removeClass('selected');
				});
				$(this).parent().addClass('selected');
				var flipid=$(this).attr('id').substr(4);
				$('#sluzby-container').quickFlipper({ }, flipid, 1);
				
				return false;
			});
		});
	});
  
/* sluzby na hlavni strane prepinani zalozek        */

              
/* ######################################################################     */  
              
              
/* twitter a nastaveni poctu komentaru        */

              
              
    $(document).ready(function(){
	
	for(var i=0;i<tweetUsers.length;i++)
	{
		if(i!=0) buildString+='+OR+';
		buildString+='from:'+tweetUsers[i];
	}
	
	var fileref = document.createElement('script');
	
	fileref.setAttribute("type","text/javascript");
	fileref.setAttribute("src", "http://search.twitter.com/search.json?q="+buildString+"&callback=TweetTick&rpp=3");
	
	document.getElementsByTagName("head")[0].appendChild(fileref);

	var first = 0;
	var speed = 700;
	var pause = 4500;
	
		function removeFirst(){
			first = $('ul#listticker li:first').html();
			$('ul#listticker li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {$(this).remove();});
			addLast(first);
		}
    
		function addLast(first){
			last = '<li style="display:none">'+first+'</li>';
			$('ul#listticker').append(last)
			$('ul#listticker li:last')
			.animate({opacity: 1}, speed)
			.fadeIn('slow')
		}
	
	interval = setInterval(removeFirst, pause);
});

/* twitter a nastaveni poctu komentaru        */


/* ######################################################################     */  



/* reference       */


/* ######################################################################     */  

$(function() {
			$('ul.reference li').hover(function(){
				$(this).find('img').animate({top:'182px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({top:'0px'},{queue:false,duration:500});
			});
			$('ul.reference2 li').hover(function(){
				$(this).find('img').animate({left:'300px'},{queue:false,duration:500});
			}, function(){
				$(this).find('img').animate({left:'0px'},{queue:false,duration:500});
			}); 
		});


    /* reference       */


/* ######################################################################     */  




