$(document).ready(function(){
	
	$('#content .container_12:last-child').addClass('container_12_last');
	$('#sidebar .section:last-child, .special li:last-child').addClass('last');
	$('.zebra tr:nth-child(2n)').addClass('even');
	
	$('.zoom, .popup').fancybox({ margin : 0, padding : 0 });
	
	$('#mainmenu li a').prepend('<span>&bull;</span>');
	
	$('a.button').prepend('<span class="bullet">&bull;</span>').append('<span class="bullet">&bull;</span>');
	
	$('.rollover').hover(function() {
		$(this).addClass('rollover_selected');
		if( !$.browser.msie ) {
			$(this).find('.rollover_bg').height(200).css('opacity','0.4').animate({
				height: 347,
				opacity: 0.9
			});
			$contenttargetheight = $(this).find('.rollover_content').height();
			$(this).find('.rollover_content').height(7).animate({
				height: 157
			});
		}
	}, function() {
		$(this).removeClass('rollover_selected');	
	});
	
	$('.rollover').click(function() {
		window.location = $(this).find('a').attr('href');
	});
	
	$('.cycle').cycle({ 				
		fx: 'fade',
		timeout: 6000,
		speed: 3000
	});
	
	$('.rotate').cycle({ 				
		fx: 'fade',
		timeout: 3000,
		speed: 2000
	});
	
	$('.cycle img').click(function() {
		window.location = $(this).attr('data-href');
	});
	
	$('.presentation').cycle({ 				
		fx: 'fade',
		timeout: 0,
		speed: 1500,
		next: '#next',
		prev: '#prev'
	});
	
	if( $.browser.msie ) {
		$('.validate').validator({ messageClass: 'FormErrorMsg'}).attr('novalidate', 'novalidate');
	}
	
//	$('input[required], select[required], textarea[required]').prev('label').append(' <span class="required">*</span>');
		
});
