/********************************************
@name 	: Ak-Al Javascript Engine  	*
@author : Hasan Erzi   				 		*
@date 	: 2011		   				 		*
********************************************/

/*jQuery(function($){	
	$.easy.navigation();
	$.easy.tooltip();
	$.easy.popup();
	$.easy.external();
	$.easy.rotate();
	$.easy.cycle();
	$.easy.forms();
	$.easy.showhide();
	$.easy.jump();
	$.easy.tabs();
	$.easy.accordion();
	
});*/


$(window).load(function() {
    $('#header-slider-inner').nivoSlider({
		directionNav: false,
		captionOpacity: 0
	});
});

// Start the Jquery
$(function() {

	Cufon.replace('h3, h4, .menu-item', { fontFamily: 'Myriad Pro' , hover: true });
	Cufon.replace('.infotext', { fontFamily: 'Bliss Pro ExtraLight' , textShadow: '2px 3px rgba(7, 62, 120, 0.5)'	 });
	Cufon.replace('.bigt', { fontFamily: 'Bliss Pro' , textShadow: '2px 3px rgba(7, 62, 120, 0.5)'	 });	
	Cufon.replace('.button', { fontFamily: 'Bliss Pro' , textShadow: ' 1px -1px 0 rgba(0, 0, 0, 0.4)'	 });
	Cufon.replace('.bliss', { fontFamily: 'Bliss Pro'});
	Cufon.replace('.page-title', { fontFamily: 'Bliss Pro ExtraLight'});
	Cufon.replace('.light', { fontFamily: 'Bliss Pro Light'});
	
	
	if($('#tablist').find('li').length > 0){
			var curv = $('#tablist li');
			curv.hover(function(){
				$(this).children('a').animate({
						left:'10'
				  }, 200, function() {
					isFinish = true;
				  });
			},function(){
 					$(this).find('a').animate({
							left:'0'
				    }, 200, function() {
				    });
			});
		
			curv.click(function(){
				if(curv.find('ul:visible').attr('class') == 'sub active'){
					if($(this).children('ul').attr('class') == 'sub'){
						curv.find('ul:visible li ul:visible').removeClass('active');
						curv.find('ul:visible').removeClass('active');
						curv.find('ul:visible').slideUp();	
					}
					
					if($(this).children('ul').attr('class') == 'sub sub'){
						curv.find('ul:visible li ul:visible').removeClass('active');
						curv.find('ul:visible li ul:visible').slideUp();	
					}					
					
				}
				$(this).children('ul').slideDown("slow", function(){
					$(this).addClass('active');
				});
			});		
	}
	
	if($('#in-services-items').find('li').length > 0){
		$('#in-services-items').find('li').each(function(index, value){

			$(this).hover(function(){
				$(this).find('span').animate({
						marginTop:'10',
						opacity: 0.80,
				  }, 200, function() {
					  //anim complete..
				  });
			},function(){

				$(this).find('span').animate({
					    marginTop: '0',
						opacity: 1,
				  }, 200, function() {
					  //anim complete..
				  });
			});
			
		});
	}	
	

});
