$(document).ready(function(){
	
	$(	".site .topbar .left a:last," +
		".site .topbar .right a:last," +
		".site .container .navigation a:last," +
		".site .container .footer .links a:last")
		.addClass("last");
	
	$("div.login").css('opacity',0.8);
	
	$("a[href$=login]")
		.click(function(){
			if($("div.login").is(":hidden"))
				$("div.login")
					.slideDown("slow",function(){
						$(this)
							.css('z-index',101)
							.find("input:first")
								.focus();
					})
			else
				$("div.login").slideUp("slow");

			return false;
		});
	
	$(".site .topbar .right select")
		.change(function(){
			location.href = $(this).val();
		});
		
	$(".slideshow")
		.innerfade({
			speed:4000,
			timeout:15000,
			children:":not(.ontop)",
			containerheight:180,
			type:"random"
		});
	
	$("a[rel=lightbox]").lightBox({
		imageLoading:'/img/lightbox-ico-loading.gif',
		imageBtnPrev:'/img/lightbox-btn-prev.gif',
		imageBtnNext:'/img/lightbox-btn-next.gif',
		imageBtnClose:'/img/lightbox-btn-close.gif',
		imageBlank:'/img/lightbox-blank.gif'
	});
	
	swfobject.embedSWF(bannerurl, "ad", "160", "600", "9.0.0");
	
	$(".imageBox").append('<div style="clear:both;"/>');
	
});