// LOOKBOOK
//
//-- lookbook pages -----------------------------------------------------------//
// pages - FG1 //
var current_image = 1;

function FG1_lookbook_pages(action){
	if(action=='up' && current_image<25){
		$('#img_'+current_image).stop(true, true).animate({opacity: 0.0}, 500, function(){   });
		current_image = current_image + 1;
		$('#img_'+current_image).stop(true, true).animate({opacity: 1.0}, 500, function(){   });
	}
	if(action=='down' && current_image>1){
		$('#img_'+current_image).stop(true, true).animate({opacity: 0.0}, 500, function(){   });
		current_image = current_image - 1;
		$('#img_'+current_image).stop(true, true).animate({opacity: 1.0}, 500, function(){   });

	}
	
	$(".arrow_left").css({ display: "block"});
	$(".arrow_right").css({ display: "block"});
	
	if(current_image==1){
		$(".arrow_left").css({ display: "none"});
		$(".arrow_right").css({ display: "block"});
	}
	if(current_image==25){
		$(".arrow_left").css({ display: "block"});
		$(".arrow_right").css({ display: "none"});
	}
}
//-- fade lookbook in -----------------------------------------------------------//
// pages - FG2 //
var lookbook_status = 0;

function FG2_lookbook_open(){
	if(lookbook_status==0){
		$('#lookbook').stop(true, true).animate({opacity: 1.0}, 1000, function(){   });
		$('#slideshow').stop(true, true).animate({opacity: 0.0}, 1000, function(){   });

		lookbook_status = 1;
	} else {
	//	$('#lookbook').stop(true, true).animate({opacity: 0.0}, 1000, function(){   });
	//	$('#slideshow').stop(true, true).animate({opacity: 1.0}, 1000, function(){   });

	//	lookbook_status = 0;
	}
}
// SLIDESHOW
//
//-- fade lookbook in -----------------------------------------------------------//
// default from old page - FG3 //
$(window).resize(function () {
});
$(document).ready(function(){
	$('.fade_twitter').fade_Links({
		color: '#30acec',
		duration: 200
	});
	$('.fade_facebook').fade_Links({
		color: '#14537E',
		duration: 200
	});
	$('.fade_email').fade_Links({
		color: '#99A200',
		duration: 200
	});
	slideshow_cycle_1();
});

//-- slideshow
//
function slideshow_cycle_1(){
	
	setTimeout(function(){ $("#slideshow_4").fadeOut(1000) },3000);
	setTimeout(function(){ $("#slideshow_3").fadeOut(1000) },6000);
	setTimeout(function(){ $("#slideshow_2").fadeOut(1000) },9000);
	setTimeout(function(){ $("#slideshow_4").fadeIn(1000) },12000);
	
	setTimeout(function(){ $("#slideshow_2").fadeIn(1000) },13000);
	setTimeout(function(){ $("#slideshow_3").fadeIn(1000) },13000);
	
	setTimeout(function(){ slideshow_cycle_1() },12000);
}

//-- fade
//
jQuery.fn.fade_Links = function(settings) {
	settings = jQuery.extend({
		color: '#ff8c00',
		duration: 500
	}, settings);
	return this.each(function() {
		var original = $(this).css('color');
		$(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); });
		$(this).mouseout(function() { $(this).animate({ color: original },settings.duration); });
	});
};


