jQuery(function($) {
	var file = jQuery.url.attr("file");
	if (file != null){
		file = file.replace(".php", "");
		$('#' + file + '_btn').addClass('actived');

	}else 
		$('#index_btn').addClass('actived');
		
	$("a.fancy").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	
	$("a.fancy_inline").fancybox({
		'hideOnContentClick': true
	});
	
	if( !$.browser.msie ) {
		$('.opac').css('opacity', 0.4);
		
		$('.opac').hover(
			function(){
				$(this).animate({ 'opacity': 1 }, 500);	
				$(this).css('zIndex', 1000);
			},
			function(){
				$(this).animate({ 'opacity': 0.4 }, 500);	
				$(this).css('zIndex', 1);
			}
		);
	}
	
	$.ifixpng('img/pixel.gif');
	
	$('.png').ifixpng(); 
	checkHeight();
	
	setTimeout('checkHeight()', 5000);
});

function checkHeight(){
	var height_sx = $(".header").height() - 15;
	var content = $(".content").height() + 15;
	if( height_sx < content )
		$(".header").height( content + "px");
	else
		$(".content").height( height_sx + "px");
}


