// JavaScript Document

$(document).ready(function(){

    var col_director0 = 'EF3E42'; 
	var col_director1 = 'EF3E42'; 
	var col_director2 = 'F89828';
	var col_director3 = '009BC9';
	var col_director4 = '00853F';
	var col_director5 = 'EF3E42'; 
	var col_director6 = 'EF3E42';
	var col_director7 = 'EF3E42'; 
	var col_director8 = 'EF3E42'; 

	$('.directorbox .info').css({opacity : '0.0', right:'-150px'});

	// transition effect
	style = 'jswing';

	// if the mouse hover the image
		$('.directorbox').hover(
			function() {
				var director = $(this).attr('id');
				color = '#' + eval('col_'+ director);
				$('#' + director).css({'border-color': color});
			
				//display heading and caption
				$(this).children('img').stop(false,true).animate({marginTop:'40px', marginLeft:'-65%'},{duration:300, easing: style});
				$(this).children('div:last').stop(false,true).animate({opacity:'0.8', right:'0px'},{duration:300, easing: style});
				$(this).find('.info p').css({'border-color': color});
				//$(this).find('.info p').stop(false,true).animate({opacity:'1.0', right:'0px'},{duration:800, easing: style}).fadeTo(1000,1.0);
			},

			function() {

				var director = $(this).attr('id');
				$('#' + director).css({'border-color': "#999"});
			
				$(this).children('img').stop(false,true).animate({marginTop:'0px', marginLeft:'0px'},{duration:200, easing: style});
				$(this).children('div:last').stop(false,true).animate({opacity:'0.0', right:'-150px'},{duration:200, easing: style});
			}
		);

	})/*


	$('.directorbox').mouseover(function() {
			
			var director = $(this).attr('id');
			color = '#' + eval('col_'+ director);
			$('#' + director).css({'border-color': color});
				
			$(this).find('img').stop()
				.animate({
				marginTop: '30%', 
				marginLeft: '-60%'}, 150);
					
			$(this).find('.info').stop().animate({top:'0px', right:'0px', opacity:'1.0', width:'125px', height:'280px'},{queue:false,duration:200}).css({'background-color': color});
			$(this).find('.info p').stop().fadeTo(550,1.0);
			
			});
	

	
	$(".directorbox").mouseout(function() {
			var director = $(this).attr('id');
			$('#' + director).css({'border-color': "#999"});
	

		$(this).find('img').stop()
				.animate({
				marginTop: '0', 
				marginLeft: '0'}, 150);
		
		$(this).find('.info p').stop().fadeTo(100,0.0);
		$(this).find('.info').stop().animate({top:'0px', right:'0px', opacity:'0', width:'0', height:'280px'},{queue:false,duration:200}).css({'background-color': color});
		
		//$(this).find('.info p').stop().fadeTo("fast",0.0);
		
		});

});
	
*/

/*
    $(document.body).click(function () {
      $("div").show("slow");
      $("div").animate({left:'+=200'},2000);
      $("div").queue(function () {
        $(this).addClass("newcolor");
        $(this).dequeue();
      });
      $("div").animate({left:'-=200'},500);
      $("div").queue(function () {
        $(this).removeClass("newcolor");
        $(this).dequeue();
      });
      $("div").slideUp();
    });



/*
		//$('.thumbnail .info').hide();
		$('.thumbnail a').hover(function(){
			$(this).parent().find('.info').animate({top:'134px'},{queue:false,duration:300});
		}, function(){
			$(this).parent().find('.info').animate({top:'171px'},{queue:false,duration:400});
		});

*/

/*

$(document).ready(function(){

//Larger thumbnail preview 

$("ul.thumb li").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '174px', 
			height: '174px',
			padding: '20px' 
		}, 200);
	
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '100px', 
			height: '100px', 
			padding: '5px'
		}, 400);
});

//Swap Image on Click
	$("ul.thumb li a").click(function() {
		
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
 
});
</script> 
*/

