$(document).ready(function(){

// open img

	$(".show A").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});

	$(".img.show A").attr("rel", "group");
		
	$("a[rel=group]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			//return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

//open swf

	$("A.swf-bt").click(function(){
		var $this = $(this).siblings(".swf");
		$.fancybox({
			'content' : $this.clone().show().css({
				'height' : 'auto',
				'width'  : 'auto',
				'top'    : '50%',
				'cursor' : 'default'
			})
			//'padding': 10
		});
		return false;
	});
	
//menu site navigation 
	
	$("#nav UL LI.post_1 A:first").css("cursor", "default");
	$("#nav UL LI.post_1 A:first").click(function(){ return false; });
	
	$("#fooNav").children("UL").children("LI:last").addClass("last");
	
	var nav = $("#nav").children("UL");
	nav.children("LI:first").addClass("first");
	nav.children("LI").children("UL").css('display', 'none');
	nav.children("LI").children("UL").css({ opacity: 0.90 });
	
	$('#nav UL LI').hover(function(){
		$(this).find('ul:first').css({visibility: 'visible', display: 'none'}).show(268);
		},function(){
			$(this).find('ul:first').css({visibility: 'hidden'});
	});
	
// image hover

	$(".img_box").mouseover(function(){
		$(".info").css("display", "none");
		$(".img_box").css("z-index", "1");
		$(this).css("z-index", "21");
		$(this).children(".info").delay(700).toggle();
	});

	
	$(".img_box").hover(function(){
		$(this).children(".info").animate({
			opacity: 0.90
		}, 350 );
	}, function(){
		$(this).children(".info").animate({
			opacity: 0
		}, 350 );
	});


});
