$(document).ready(function(){	
		
		var width = 1170;
	if($(window).width() > 1170)
		width = $(window).width();
	
	$("#headerImages").width(width);
	$("#headerImages ul").width(width);
	$("#headerImages ul li").width(width);
	
	/* cases */
	$('.whiteBlock.large.case').mouseenter(function() {
		var elem = $(this).find('article').first();
  		elem.slideDown('fast', function() {
     });
	  $(this).find('.description').first().css('cursor','pointer');
	  $(this).find('.description').first().click(function(){
		window.location = $(this).attr('title');
		//alert($(this).attr('linkhref'));
	});
	 
});
	$('.whiteBlock.large.case').mouseleave(function() {
		var elem = $(this).find('article').first();
  elem.slideUp('fast', function() {
    // Animation complete.
  });
});
$(".slide").each(function(){
	$(this).easySlider({
		auto: false,
		numeric: true,
		fade: true,
		speed: 1500,
		numericId: 'slideControls'
	});
});

	$("#references").easySlider({
		auto: false,
		continuous: true,
		numeric: false,
		pause: 7000,
		prevText: '<',
		nextText: '>'
	});
	
	$('#footer ul li').find('a.first').first().parent('li').remove();
	$('.topheader').first().find('a.first').first().parent('li').css('border','none'); 
	
});

$(window).load(function(){

	
	$("#headerImages").show();
	$("#headerImages").easySlider({
		auto: true,
		continuous: true,
		numeric: false,
		controlsShow: false,
		fade: true,
		vertical: false,
		pause:4700,
		speed: 1500
	});
	
	$("#headerImages").removeClass('loader');
});

