 $(function(){
		$('.down_info_small').hide();
		$('.button_emag').hover(function(){
			$('.down_info_small').slideDown(200);
			$('.button_emag').animate({
			    height: '87px'
			  }, 300);
			//$('.button_emag').css('height','87px')
		}, function(){
			$('.down_info_small').slideUp(200);
			//$('.button_emag').css('height','34px');
			$('.button_emag').animate({
			    height: '34px'
			  }, 300);
		});

	});

// Slider custom controls

$(function(){
	$('.sub_navigation li:last-child').css('border-bottom','none');
});




$(function() {
	 
	 
	 
//	 $('.explore').hide();
		setTimeout(function(){ jQuery('.explore').hide() }, 6000);
	   
	   /*
	  $(".slide_entry").hover(
		  function () {
			$('#one, #inc_id').show();
		  }, 
		  function () {
			$('#one, #inc_id').hide();
		  }
		);
		*/

	$(".slide_entry").hover(
		  function () {
			$('#inc_id1').hide();
		//	$('.hover_img').show();
		  }, 
		  function () {
			$('#inc_id1').show();
		//	$('.hover_img').hide();
		  }
		);
		
	
	$(".trigger").click(function () {
		$('.dedicated_teams_container').slideToggle();
		var showMoreInfoLabel = $('#show_more_info_label');
		var hideMoreInfoLabel = $('#hide_more_info_label');

		$('#more_info_trigger').text($(this).text() == showMoreInfoLabel ? hideMoreInfoLabel : showMoreInfoLabel);


		$('.trigger').toggleClass('trigger_alt')
		$('html, body').animate({
			scrollTop: $(".trigger").offset().top
		}, 800);
	});	
	
});

// MobilySlider
$(document).ready(function() {
	if ($('.mini_slider').length > 0){
	  $('.mini_slider').mobilyslider({
		content: '.sliderContent',
		children: 'div',
		transition: 'horizontal',
		animationSpeed: 500,
		autoplay: false,
		autoplaySpeed: 3000,
		pauseOnHover: false,
		bullets: true,
		arrows: true,
		arrowsHide: true,
		prev: 'prev',
		next: 'next',
		animationStart: function(){},
		animationComplete: function(){}
	});
	}
	
	
});
// FXCS
$(function(){
	if ($('.slider').length > 0 && !$('#slider').hasClass('one_image')){

		$('.slider').fxcs({
			mode: 'horizontal',
			controls: false,
			autoHover: true,
			infiniteLoop: true,
			auto: true,
			pager: true
		});
	}
});







$(document).ready(function() {
	if ($('#items').length > 0){
	$('#items').carouFredSel({
		curcular	: false,
		infinite	: false,
		auto		: false,						
		items		: 5,
		scroll : {
			items	: 1
		},

		prev : {	
			button	: "#prev"
		},
		next : { 
			button	: "#next"
		}
	});
	}
});

// Client portfolio image swap
$(document).ready(function() {
$('a.thumbnail').click(function(){
    var src = $(this).attr('href');
	
	if (src != $('img#largeImg').attr('src').replace(/\?(.*)/,'')){
		$('img#largeImg').stop().animate({
			opacity: '0'
		},100 , function(){
			$(this).attr('src', src+'?'+Math.floor(Math.random()*(10*100)));
		}).load(function(){
			$(this).stop().animate({
				opacity: '1'
			});
		});
	}
    return false;
});
});

$(document).ready(function() {
	$('.post_img').mouseover(function() {
		$(this).stop().fadeTo(250, 0.8);
	});
	$('.post_img').mouseout(function() {
		$(this).stop().fadeTo(250, 1.0);
	});
	
	
});

$(document).ready(function() {
	$clientsHolder = $('ul.clients');
	$clientsClone = $clientsHolder.clone(); 
	$('.filterClients a').click(function(e) {
		e.preventDefault();
		$filterClass = $(this).attr('class');	 
		$('.filterClients li').removeClass('active');
		$(this).parent().addClass('active');
		if($filterClass == 'all'){
			$filters = $clientsClone.find('li');
		} 
		else if($filterClass == 'clients_all'){
			$('ul.clients').hide();
			$('ul.all_clients').show();
			$clientsHolderAll = $('ul.all_clients');
			$clientsHolderAll = $clientsHolderAll.clone(); 
	
			$filters = $clientsHolderAll.find('li');
		}
		else { 
			if($('ul.clients').is(':hidden')) {
				$('ul.all_clients').hide();
				$('ul.clients').show();
			}
			$filters = $clientsClone.find('li[data-type~='+ $filterClass +']');
		
		}
		$clientsHolder.quicksand($filters, {
			duration: 1000,
			easing: 'easeInOutQuint'
		});

		return false;
	});
});

function view_read_more(el){
	$(el).find(".mosaic-overlay").show();
	$(el).find(".mosaic-overlay").css('bottom','0px');	
	return false;
}

function hide_read_more(el){
	$(el).find(".mosaic-overlay").hide();
	$(el).find(".mosaic-overlay").css('bottom','-120px');
	return false;
}

function toggleCarouselImage(id, show)
{

	if (show)
	{
		jQuery('#explore_'+id).show(); 
		jQuery('#carousel_alt_img_'+id).show();
		jQuery('#carousel_img_'+id).hide();
	} else {
		jQuery('#explore_'+id).hide(); 
		jQuery('#carousel_img_'+id).show();
		jQuery('#carousel_alt_img_'+id).hide();
	}
}



function toggleExplore(id, show)
{

	if (show)
	{
		jQuery('#explore_'+id).show(); 
	} else {
		setTimeout(function(){ jQuery('#explore_'+id).hide() }, 6000);
	}

}






