$(function() {
	$.fn.loopedSlider.defaults.addPagination = true;
	$('.slider').loopedSlider({
		autoStart:3500,
		restart:2000,
		containerClick: false,
		slidespeed:1000
	});
	
	var slider_pages = $('.slider .pagination li').size();
	$('.slider').addClass('slider-' + slider_pages);
	
	$('.reason .details').css( 'height', '0px' );
	
	$('.reason').hover(function(e){
		$('.details',this).stop().animate({'height':'150px'},200);
		$('.icon',this).stop().animate({'margin-top':'-150px'},200);
	}, function(e) {
		$('.details',this).stop().animate({'height':'0px'},200);
		$('.icon',this).stop().animate({'margin-top':'0px'},200);
	});
	
	$('.prices .pricing-basic, .prices .pricing-medium, .prices .pricing-eshop').hover(function(e){
		var icon = $('.icon', this);
		icon.stop();
		icon.animate({'background-position-y':'-55px'},300,'easeOutCubic');
	}, function(e) {
		var icon = $('.icon', this);
		icon.stop();
		icon.animate({'background-position-y':'0px'},1000,'easeOutBounce');
	});
	
	$('.form-buttons .form-submit a').click(function(e) {
		$(this).parents('form').submit();
		return false;
	});
	
	$("a.lightbox").fancybox({
		'hideOnContentClick': true,
		'titleShow': false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',
		'overlayShow'	: true,
		'showNavArrows'	: false
	});
	
});

