$(document).ready(function(){
	$('a[rel=lightbox]').lightBox({
		overlayBgColor: '#1b1b1b',
		overlayOpacity: 0.8,
		imageLoading: 'img/lightbox/loading.gif',
		imageBtnClose: 'img/lightbox/close.gif',
		imageBtnPrev: 'img/lightbox/prev.gif',
		imageBtnNext: 'img/lightbox/next.gif',
		imageBlank: 'img/lightbox/lightbox-blank.gif'
	});   
});

var sl_lock = false;
function push_p(this_) {
	if (sl_lock || $(this_).hasClass('opened'))
		return true;
	$('span').removeClass('opened');
	$(this_).addClass('opened');
	
	sl_lock = true;
	setTimeout('slUnlock()', 1000);
	var this__ = $(this_).parent().find("p");
	$(this__).each(function() {
		$(this).slideUp("fast");			
	});
	
	if($(this_).next().is(":hidden")) {
		$(this_).next().slideDown("fast");
	} else {
		$(this_).next().slideUp("fast");		
	}
}
function slUnlock()
{
	sl_lock = false;
}

function change_pages(set, this_) {
	if($(this_).attr('id')=='active'){
		return false;
	}
	activeHref = $(this_).attr('href');
	$("#content, #footer").fadeOut("fast", function(){
		$.get("pages/"+set+".php", function(swr){
			$("#content").html(swr);											
			$("#content, #footer").fadeIn("fast");
			$('a[href="'+activeHref+'"]').addClass('active');
		});
	});
	return false;
}

