$(document).ready(function(){
        /*$('.rollover').rollover();
        */
        
	$("a.zoomImage").fancybox({
		'transitionIn'	:'elastic',
		'transitionOut'	:'elastic',
		'speedIn'	:600, 
		'speedOut'	:200,
		'titleShow'	:"false"
	});
	
	$('.team').click(function(){
		$('.subMenu').toggle('slow');	
	});
	
	
	$('.replaceImage').click(function(){
		$.ajax({
			url:"./right_gallery.php?pa=get_big_image_ajax&image_id="+$(this).attr('rel'),
			type: "GET",
			success: function(msg){
				var obj = jQuery.parseJSON(msg);
				$('.imageToReplace').attr('src', obj.medium_image); //replace medium link
				$('.zoomImage').attr('href', obj.large_image); //replace fancybox link
			}
		});
		return false;
	});
	
	$('.replaceImage').mouseover(function(){
		$(this).fadeTo(500, 0.3);
	}).mouseout(function(){
		$(this).fadeTo(500, 1);
	});
	
	
	$('.closeOverlay').click(function(){
		$('.ui-overlay').fadeOut('slow');
		$('.ui-dialog-content').fadeOut('slow');
		$('.ui-widget-content').fadeOut('slow');
	});
	$("#accordion").accordion();
	$(".datepicker").datepicker({ dateFormat: 'dd-mm-yy' });
	
	$("#avIframe").fancybox({
		'width'		: '36%',
		'height'	: '50%',
		'autoScale'   	: true,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'type'		: 'iframe'
	});
	
	
})
