$(function (){
$("#main-content h1")

.prepend (' <div class="RoundedCorner"><div class="rtop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div> ')
.append (' <div class="rbottom"><div class="r4"></div><div class="r3"></div><div class="r2"></div><div class="r1"></div></div></div> ');

});


$(function() {
$("#main-content").css("display","none");
});

$(document).ready(function(){
$("#main-content").fadeIn(2000);
});


$(function (){
$("#searchsubmit,#submit").attr("class","sexybutton sexysimple sexysmall sexyblue");
});


$(function (){
$("#access").css("opacity","1.0");
});


$(function (){
$(".accessKey").css({"opacity":"0.2","font-size":"8px"});
$(".accessKey").focus(function () {
    $(this).css({"opacity":"1.0","font-size":"20px"});
  });
$(".accessKey").blur(function () {
    $(this).css({"opacity":"0.2","font-size":"8px"});
  });
});


/*** 
    Simple jQuery Slideshow Script
    Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
***/
 
function slideSwitch() {
    var $active = $('#slideshow DIV.active');
 
    if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
 
    // use this to pull the divs in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow DIV:first');
 
    // uncomment below to pull the divs randomly
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );
 
 
    $active.addClass('last-active');
	 
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
 
$(function() {
    setInterval( "slideSwitch()", 5000 );
});


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") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
	}
}
window.onload = externalLinks;


$(function (){

$("a").focus(function () {
    $(this).css({"color":"red","font-weight":"bold","text-shadow":"1px  1px  1px  #000"});
  });
  
$("a").blur(function () {
    $(this).css({"color":"","font-weight":"","text-shadow":""});
  });

});


/***
$(function (){

$("img").focus(function () {
    $(this).css("border","2px red solid");
  });
  
$("img").blur(function () {
    $(this).css("border","");
  });

});
***/
