var RecaptchaOptions = {
		theme : 'white'
};


$(document).ready(function() {
	var times = 0;
	
	function updateLines() {
		var pgh = parseFloat($('#area-content').height());
		if(pgh > 670.0) $('.pg_sep').height(pgh);
		if(++times < 5)
			setTimeout(updateLines, 1000);
	};
	
	var pgh = parseFloat($('#area-content').height());
	if(pgh > 670.0) $('.pg_sep').height(pgh);
	
	$(this).click(function() {
		var pgh = parseFloat($('#area-content').height());
		if(pgh > 670.0) $('.pg_sep').height(pgh);
	});

	updateLines();
    
	$('#main-content img').each(function() {
        var $maxWidth = $('#main-content').innerWidth();
		$(this).removeAttr('height');
		if(parseInt($(this).attr('width')) > $maxWidth)
			$(this).attr('width', '537px');
	});
	
	
	$('#leftnav li a').hover(
		function() {
			$(this).addClass('active').find('img').fadeTo(400, 0.90);
		},
		function() {
			$(this).removeClass('active').find('img').fadeTo(200, 0.5);
		}
	);
	
	$('#nav_t ul:first li a img').hover(
		function() {
			$(this).fadeTo(400, 1);
		},
		function() {
			$(this).fadeTo(300, 0.5);
		}
	);
	
	$('#nav_t ul:first li').hover(
		function() {
			$(this).find('a:first').addClass('active');
			$(this).find('ul').fadeIn(300).find('li a').fadeTo(1, 0.8);
		},
		function() {
			$(this).find('ul').fadeOut(100);
			$(this).find('a:first').animate({className: ''});
		}
	);
	
	$('#nav_t ul ul a').hover(
		function() {
			$(this).fadeTo(400, 1);
		},
		function() {
			$(this).fadeTo(200, 0.8);
		}
	);
	

	$('#main-content img.img_fullscreen').each(function(i) {
		$(this).wrap('<a href="' + $(this).attr('src') + '" class="lBox" />');
	});
	$('#main-content .lBox').lightBox();
});
