//########################## GOOGLE ANALYTICS #################################
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27848779-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();




$(document).ready(function(){	
	$("#headerImages").width($(window).width());
	$("#headerImages ul").width($(window).width());
	$("#headerImages ul li").width($(window).width());
	$("#headerImages ul li").each(function(){
		$(this).css('backgroundImage','url(/plugins/photoalbums/images/' + $(this).attr('data-src') +')');
	});
	/* 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: false,
		numeric: false,
		pause: 7000,
		prevText: '<',
		nextText: '>',
		autoWidth: false,
		inRow: 4,
		controlsFade: true
	});
	
	$('#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: false,
			controlsFade: true,
		numeric: false,
		fade: true,
		vertical: false,
		pause:9500,
		speed: 1500,
		prevId: 'prevBtnMain',
		nextId: 'nextBtnMain',
		prevText: 		'',
		nextText: 		''
	});
	
	$("#headerImages").removeClass('loader');
});

