$(document).ready(function(){
  //Examples of how to assign the ColorBox event to elements
  
  //$(".seaman-clip1").colorbox({inline:true, href:"#video1"});
  //$(".seaman-clip2").colorbox({inline:true, href:"#video2"});
  //$(".seaman-clip3").colorbox({inline:true, href:"#video3"});
  
  
  //Example of preserving a JavaScript event for inline calls.
  //$("#click").click(function(){ 
  //    $('#click').css({"background-color":"#000", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
  //    return false;
  //});
                  
  $("#twitter").getTwitter({
    userName: "SuperRPO",
    numTweets: 1,
    loaderText: "Loading...",
    slideIn: true,
    slideDuration: 750,
    showHeading: true,
    headingText: "<a href='http://twitter.com/SuperRPO'>Follow Us On Twitter</a>",
    showProfileLink: false,
    showTimestamp: false
  });
  
  
  
  $('.countdown').countdown({
        until: new Date(parseInt($('span', $(this)).text())*1000),
        format: 'DHMS',
        onExpiry: function(){
            $(this).parents('.countdown-container').fadeOut('slow');
        }
    });

});


/*
son of suckerfish menu script from:
http://www.htmldog.com/articles/suckerfish/dropdowns/
 */
 
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex=200; //this line added to force flyout to be above relatively positioned stuff in IE
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	var sfEls = document.getElementById("nav2").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex=199; //this line added to force flyout to be above relatively positioned stuff in IE
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);




