// JavaScript Document
$(document).ready(function(){	
		$('#fading_curtain').aviaSlider({	blockSize: {height: 'full', width:40},
			display: 'topleft',
			transition: 'fade',
			autorotationSpeed:15,
			betweenBlockDelay:10,
			animationSpeed: 600,
			switchMovement: true
		});

	//fancybox implementation
	/*$("a[rel=gallery1], a[rel=gallery2], a[rel=gallery3], a[rel=gallery4], a[rel=gallery5], a[rel=gallery6], a[rel=gallery7], a[rel=gallery8], a[rel=gallery9]").fancybox({
				'autoScale'	: 'false',
				'centerOnScroll'	: 'true',
				'padding'		    : '0',
				'cyclic'		    : 'true',
				'changeFade'		: 'fast',
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' + title : '') + '</span>';
				}
			});
	*/
	
	//prettybox implementation 
	$(".gallery a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:0,slideshow:5000});

		
$("#profile").fancybox({
		'width'				: 600,
		'height'			: 790,
        'autoScale'     	: false,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'type'				: 'iframe',
		'centerOnScroll'	: 'true'
});
$("#contact").fancybox({
		'width'				: 400,
		'height'			: 200,
        'autoScale'     	: false,
		'autoDimensions'     	: false,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'type'				: 'iframe',
		'centerOnScroll'	: 'true'
});

				timeout=null;
		  
				$(".tooltip, #tooltip-handler").mouseover(function()
				{
					clearTimeout(timeout);
					if(!$(".tooltip").is(":visible"))
					{
						
						$(".tooltip").show();	
					}
					$("#tooltip-handler").css("background-position","-182px");
					
				});
				
				$(".tooltip,  #tooltip-handler").mouseout(function()
				{
					 timeout = setTimeout(function(){
						if($(".tooltip").is(":visible"))
						{
							
							$(".tooltip").hide();
							$("#tooltip-handler").css("background-position","0px");		
						}					 
					},1000);
					
					
				});
			
			
			
			
		
			
});	

