$(function () {
	$('.dropdown').each(function () {
		$(this).parent().eq(0).hoverIntent({
			timeout: 100,
			over: function () {
				var current = $('.dropdown:eq(0)', this);
				current.fadeIn(100);
			},
			out: function () {
				var current = $('.dropdown:eq(0)', this);
				current.fadeOut(200);
			}
		});
	});

  $("a[rel=floatbox]").fancybox({overlayShow : true, overlayOpacity	: 0.5, overlayColor	: '#101010'});

  var logos = 0; var curLogo = 1;
  $('.image').each(function(){logos++});
  $("#totalLogo").html(logos);
  $("#curLogo").html("1");    

  $('#next').click(function(e){
    e.preventDefault();
    if (curLogo < logos)
    {
      $('#alllogos').animate({"left": "-=330px"}, "slow", "easeOutBack");      
      curLogo++;
      $("#curLogo").html(curLogo);
    }    
  });
  	
  $('#prev').click(function(e){
    e.preventDefault();
    if (curLogo > 1)
    {
      $('#alllogos').animate({"left": "+=330px"}, "slow", "easeOutBack");      
      curLogo--;
      $("#curLogo").html(curLogo);
    }    
  });  	

	$('#btnSend').formValidator({
		onSuccess	: function() {
      $("#frmContact").submit(); 
    },
		scope		  : '#frmContact'		
	});
});
