﻿$(function() {

    dropdownIE6("#mainNav");
    dropdownIE6("#mainNav ul");

    tweets();

    $("#homepagetabs").tinyTabs();

    $(".updated").timeago();

    $('#jsprint').click(function() { window.print(); return false; });

	$('#splashbanner').scrollable({size: 1, next: '.ne', loop: true}).autoscroll(8000);
	
	$('#keyfindings').scrollable({items: '.colsayHolder', next: '#keyfindings .next', size: 3, loop: true});

});


dropdownIE6 = function(element) {
	$(element)
		.children('li')
		.each(function(){
			$(this)
				.hover(
					function(){
						$(this).addClass('sfhover');
					},
					function(){
						$(this).removeClass('sfhover');
					});
		});
}

tweets = function() {
    var opts = {
        join_text: "auto",
        username: "FRIENDSnews",
        count: 2,
        auto_join_text_default: "",
        auto_join_text_ed: "",
        auto_join_text_ing: "",
        auto_join_text_reply: "",
        auto_join_text_url: "",
        loading_text: "loading tweets..."
    };
    $(".tweet1").tweet(opts);
    opts["count"] = 5;
    $(".tweet5").tweet(opts);
}