$(document).ready(function() {
	WebFontConfig = {
	  google: { families: [ 'Terminal Dosis Light' ] }
	};
	(function() {
	  var wf = document.createElement('script');
	  wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
		  '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
	  wf.type = 'text/javascript';
	  wf.async = 'true';
	  var s = document.getElementsByTagName('script')[0];
	  s.parentNode.insertBefore(wf, s);
	})();	
		
	
	function floathefrog()
	{
		$('#movingfrog').animate({
		  top: '0'
		}, 3000, function() {
			$('#movingfrog').animate({
			  top: '30'
			}, 3000, function() { floathefrog(); });
		});
		
		$('#frogShadow').animate({
		  opacity: .5
		}, 3000, function() {
			$('#frogShadow').animate({
			  opacity: 1
			}, 3000);
		});		
	}	

	floathefrog();
	
	$("#mainmenu1 li:first-child").addClass("firstItem");
	$(".home #mainmenu1 li:first-child").addClass("current-menu-item");
	$(".single-jootools a[title='tools']").parent().addClass("current-menu-item");
	$("#mainmenu1 li:last-child").addClass("lastItem");
	$(".customerBlock:last-child").addClass("lastItem");
			
	$(".projects-tabs div a").bind({
	  click: function(){
		  
		  $(this).parent().addClass("project-active");		  
		  $(this).parent().siblings().removeClass("project-active");			  
		  $(this).addClass("myClass yourClass");
		  $(this).addClass("myClass yourClass");	
		  	  
	  },
	  mouseenter: function() {
	  	  $(this).animate({backgroundPosition:"(0 -250px)"},{duration:1000});
	  },
	  mouseleave: function() {

	  }
	});	
	
	$('#exampleList li').hover(function(){
		$(this).find('img').fadeOut('fast');
	}, function(){
		$(this).find('img').fadeIn('fast');
	});		
			

	$(".slider").scrollable({circular: true, easing: 'easeInOutBack', speed: 1000}).navigator();
	$("div.projects-tabs").tabs("div.css-panes > div", {effect: 'slide'});

	
	$("a.grouped_elements").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'overlayColor'  : '#F0EFEB'
	});
	
	$("a.openOutside").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'overlayColor'  : '#F0EFEB',
		'type'			: 'iframe',
		'width'				: '90%',
		'height'			: '90%',
		'autoScale'			: false,
		'autoDimensions'    : false
	});	
	
	$("a.gm").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'overlayColor'  : '#F0EFEB',
		'type'			: 'inline'
	});	

	$("#shoppingcart").bind({
	  click: function() {
		$(this).stop().animate({
			top: "-10px",
		  }, 800, 'easeOutCirc' );
	  },
	  mouseenter: function() {
		$(this).stop().animate({
			top: "-365px",
		}, 150, 'easeOutCirc' );
	  },
	  mouseleave: function() {
		$(this).stop().delay(500).animate({
			top: "-385px",
		}, 1000, 'easeOutElastic' );
	  }
	});
	
	$(".servicesBlock").bind({
	  mouseenter: function() {
		$(this).stop().animate({
			marginTop: "-20px",
		}, 800, 'easeOutCirc' );
	  },
	  mouseleave: function() {
		$(this).stop().animate({
			marginTop: "0",
		}, 500, 'easeOutBounce' );
	  }
	});	

});

