
  
  curvyCorners.addEvent(window, 'load', initCorners);

  function initCorners() {
  
    var settings = {
      tl: { radius: 5 },
      tr: { radius: 5 },
      bl: { radius: 5 },
      br: { radius: 5 },
      antiAlias: true
    }

    var subpageheader = {
      tl: { radius: 5 },
      tr: { radius: 5 },
      bl: { radius: 0 },
      br: { radius: 0 },
      antiAlias: true
    }

    var subpageimage = {
      tl: { radius: 0 },
      tr: { radius: 5 },
      bl: { radius: 0 },
      br: { radius: 0 },
      antiAlias: true
    }

    var maincontent = {
      tl: { radius: 0 },
      tr: { radius: 0 },
      bl: { radius: 5 },
      br: { radius: 5 },
      antiAlias: true
    }


    /*
    Usage:

    curvyCorners(settingsObj, selectorStr);
    curvyCorners(settingsObj, Obj1[, Obj2[, Obj3[, . . . [, ObjN]]]]);

    selectorStr ::= complexSelector [, complexSelector]...
    complexSelector ::= singleSelector[ singleSelector]
    singleSelector ::= idType | classType
    idType ::= #id
    classType ::= [tagName].className
    tagName ::= div|p|form|blockquote|frameset // others may work
    className : .name
    selector examples:
      #mydiv p.rounded
      #mypara
      .rounded
    */
    curvyCorners(settings, ".rounded");
    curvyCorners(maincontent, ".main-content");
  }


function initMenu() {

$('.starfsmannalisti span').hide();
$('.starfsmannalisti span:first').show();
$('.starfsmannalisti a:first').addClass('selected');

$('.starfsmannalisti a').click(
	function() {
	$('.starfsmannalisti a').removeClass();
	$(this).addClass('selected');
    $('html, body').animate({scrollTop:180}, 'normal');

	}
);


$('.starfsmannalisti a').click(

function() {
var checkElement = $(this).next();
if((checkElement.is('span')) && (checkElement.is(':visible'))) {
return false;
}
if((checkElement.is('span')) && (!checkElement.is(':visible'))) {
$('.starfsmannalisti span:visible').slideUp('normal');
checkElement.slideDown('normal');
return false;
}
}
);
}
$(document).ready(function() {initMenu();});


$(document).ready(
    function()
    {
        //For each row...
        $('table.starfsmenn tbody tr').each(
            function()
            {  
                //...find the last cell.
                var lastCell = $(this).find('td:last');
               // $(lastCell).html('<a href="mailto:' + $(lastCell).text() + '">' + $(lastCell).text() + '</a>');
            }
        );
    }
);




	// Form Swap Values
	$(function() {
		swapValues = [];
			$("input.leitarord").each(function(i){
				swapValues[i] = $(this).val();
				$(this).focus(function(){
					if ($(this).val() == swapValues[i]) {
						$(this).val("");
					}
				}).blur(function(){
					if ($.trim($(this).val()) == "") {
						$(this).val(swapValues[i]);
				}
			});
		});
	});
	 

