// JavaScript Document

$(function() {
	
	$("#about-tabs").tabs({ fx: { opacity: 'toggle' } });
	
	// hide slider buttons
	$('.simpleSlide-window').live('mouseover mouseout',
		function(event) {
			if(event.type == 'mouseover'){
				$(this).children('.left-button, .right-button').stop(true, true).fadeIn();
		}
			else {
				$(this).children('.left-button, .right-button').stop(true, true).fadeOut();
			}
		 }
	); 
});

//  home-slider
$(function() {
	$('#slider').cycle({
		fx: 'scrollLeft',
		easing: 'easeOutExpo',
		speed: 1500,
		timeout: 5000,
		pager: '#slider-nav',
		slideExpr: 'img'
	});
}); 

// passport silhouettes
$(function() {
	$('.passport').cycle({
		fx: 'fade',
		speed: 'slow',
		timeout: 5000,
		slideExpr: 'img'
	});
});

$(function(){
	// adding class to all even gallery-box 
	$('.gallery-box:even').addClass('box-margin');
});


$(function(){
	
	//Caption Sliding 
	$('.gallery-box.caption').hover(function(){
		$(".cover", this).stop().fadeTo(200,1);
	}, function() {
		$(".cover", this).stop().fadeTo(200,0);
	});
});

$(function(){
	// fadeing thumbs
	$('.ul-latest-examples li').hover(function(){
		$(".view-more", this).stop().fadeTo(200, 1);
	}, function() {
		$(".view-more", this).stop().fadeTo(200, 0);
	});
});

$(function(){
	//Horizontal Sliding for homepage #Slider
	
	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute

	$('#slider').hover(function(){
		$("#slider-nav", this).stop().animate({top:'220px'},{queue:false,duration:300});
	}, function() {
		$("#slider-nav", this).stop().animate({top:'240px'},{queue:false,duration:300});
	});
	
});