function externalLinks() {
	if (!document.getElementsByTagName) {
		return;
	}
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href")){
			if(anchor.getAttribute("rel") == "external" || anchor.getAttribute("rel") == "external nofollow" || anchor.getAttribute("rel") == "nofollow external"){
				anchor.target = "_blank";
            }
		}
    }
}


function showimg(img,ths){
	$('#fvdw').attr('src','/images/'+img);
	$('#wknr .active').removeClass('active');
	$(ths).addClass('active');
	setleft();
}
function setleft(){
	if($('#fvdw').html() != null){
		var p = $("#wknr div .active");
		var position = p.position();
		var left = Math.round(position.left);
		if(left > 200){
			$("#wknr div").animate({left:"-"+((left-200)+10)+"px"});//("left","-"+(left-200));
		}else{
			$("#wknr div").animate({left:((200-left)-10)+"px"});//("left","-"+(left-200));
		}
	}
}
function activateLightbox(){
	$('#gallery a').lightBox();
}
$(function() {
	activateLightbox();
	setleft();
});
