$(document).ready(function() {
	
	$('#preSlider').slider({
	txtBoxAnimateInType: 'slideDown',
	txtBoxAnimateOutType: 'slideDown',
	txtBoxAnimateInHorzType: 'fade',
	txtBoxAnimateOutHorzType: 'blink',
	txtBoxPauseBetweenInOut: 0,
	autoPlay: true,
	containerWidth: '950px',
    containerHeight: '305px',
    autoPlayInterval: 9000 
	});
	
	$("#slider #tabContainer a:last-child").css("border-bottom", 0);
	$("#content_main #content_left .blog-post:last-child").css("border", "none"); 
	$("#content_main #content_left .testimonial-post:last-child").css("border", "none"); 
	$('#home-carousel').jcarousel();
	$('.quotes').innerfade({
		animationtype: 'fade', 
		speed: 'normal', 
		timeout: 12000, 
		type: 'random_start', 
		containerheight: '180px' 
	}); 


	$("#header_menu ul").parent().append("<span></span>");
	$("#header_menu ul li a") .mouseover(function() {

		$(this).parent().find("ul.subnav").slideDown('medium').show(); 
		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("ul.subnav").slideUp('slow'); 
		});
		}).hover(function() { 
			$(this).addClass("subhover");
		}, function() {
			$(this).removeClass("subhover");
	});
	
	$("#header_menu ul li ul.subnav li:last-child").addClass("bgBtm");
	
	$("a[rel=poly_group]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titlePosition' : 'over',
		'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});	

});

function courriel(x)
{
	window.location.href = "mailto:" + x + "@" + "polyroboteck.ca";
}



