jQuery(document).ready(function($){	
	
	/* Cufon replacement */
	
	Cufon.replace('h1,h2,p.more a,#main-nav > ul > li > a,.sendbutton,#teaser .caption', { fontFamily: 'Myriad Pro', hover: true });
	
	/* HP Main navigation */
	
	$('#main-nav > ul > li').hover(function(){
		$(this).children('ul').toggleClass('hover');
		return false;
	});

	/* Photo slider */	
	
	$("#photo-slider").sudoSlider({ 
		auto: true,
		pause: '10000',
		prevHtml: '<a href="#" class="prevBtn">&laquo;</a>',
		nextHtml: '<a href="#" class="nextBtn">&raquo;</a>'
	});

	/* Teaser slider */	
	
	$("#teaser-slider").sudoSlider({ 
		auto: true,
		controlsShow: false,
		fade: true,
		slideCount: 1,
		pause: '10000',
		prevHtml: '<a href="#" class="prevBtn">&laquo;</a>',
		nextHtml: '<a href="#" class="nextBtn">&raquo;</a>'
	});	

	/* Services hover */
	
	$('.services > .item').hover(function(){
		$(this).toggleClass('hover');
		return false;
	});

	/* Main nav */
	
	$('#main-nav > ul > li > a').append('<span class="main-nav-r">');
	$('.sub-nav li:first a').addClass('first');	

	/* Animate map */
	
	$('.contact-box-map img.active').animate({ opacity: 0 });
	$('.contact-box-map img.active').hover(
		function(){ $(this).stop().animate({ opacity: 1 }, '100');
		},
		function(){ $(this).stop().animate({ opacity: 0 }, '100');
		return false;
	});
	
	/* Accordion list */
	
	$('.roll-list dd').hide();
	$('.roll-list dt').click(function() {
		$('.roll-list dt').removeClass('active');
		$('.roll-list dt span').text("více");
		$('.roll-list dd').slideUp('normal');		
   
		if($(this).next().is(':hidden') == true) {
			$(this).addClass('active').children("span").text("méně");
			$(this).next().slideDown('normal');			
		}
		return false;
	});
	
	$('.roll-list dt').append("<span>více</span>");
	$('.roll-list dt span').hide();
	$('.roll-list dt').hover(
		function() { $(this).children("span").show();
				   },
		function() { $(this).children("span").hide();
		return false;
	});
	
	$('ol li').wrapInner("<span class='normal'></span>");
	
	$('.roll-list dd:even').addClass('even');
	$('.roll-list dt:even').addClass('even');


	/* Lightbox */
	
	$(function() { $('.ngg-gallery-thumbnail a').lightBox(); });
	$(function() { $('#photo-slider a').lightBox(); });
	$(function() { $('.reference a').lightBox(); });
	return false;
});
