$(function() {
    $(".carousel").jCarouselLite({
        visible: 5,
        btnNext: ".next",
        btnPrev: ".prev",
    	scroll: 1,
     	auto: 15000,
    	speed: 250,
    	mouseWheel: true
    });


    $(".gnnewscarousel").jCarouselLite({
        visible: 1,
        btnNext: ".nextgn",
        btnPrev: ".prevgn",
    	scroll: 1,
    	start: 0, //cannot launch fancybox from 0 position
    	vertical: true,
    	mouseWheel: true
    });


    $(".gwsenewscarousel").jCarouselLite({
        visible: 1,
        btnNext: ".nextgwse",
        btnPrev: ".prevgwse",
    	scroll: 1,
    	start: 0, //cannot launch fancybox from 0 position
    	vertical: true,
    	mouseWheel: true
    });


    $(".featurecarousel").jCarouselLite({
        visible: 1,
        btnNext: ".nextfeature",
        btnPrev: ".prevfeature",
    	scroll: 1,
     	auto: 15000,
    	start: 1, //cannot launch fancybox from 0 position
		vertical: true,
		mouseWheel: true
    });
    
});

       $(function() {
                $('#container-1 > ul').tabs();
                $('#container-1 > ul').tabs( 'rotate' , 10000 );
            });

$(document).ready(function(){

				$('#email-s').autofill({

					value: 'Email Address',

					defaultTextColor: '#777777',

					activeTextColor: '#FFFFFF'

				});

			});

$(document).ready(function(){

				$('#s').autofill({

					value: 'Search',

					defaultTextColor: '#777777',

					activeTextColor: '#FFFFFF'

				});

			});

function mailpage()
		{
		mail_str = "mailto:?subject=Link From Shark.com: " + document.title;
		mail_str += "&body=I thought you might enjoy this page from Shark.com at " + location.href;
		location.href = mail_str;
		}


var Count;
var Total;

$(document).ready(function(){
    Count= 20;
    ShowItems();
    CountItems();


    $("#add").click(function(){
        Count = Count + 20;
        ShowItems();
        ItemsRemaining(Count);
    });
    
    
    $("#remove").click(function(){
        Count = Count - 20;
        ShowItems();
    });
    
    
}); //end ready

function CountItems() {
   if ($("#list li").size() <= Count) {
   } else if ($("#list li").size() - Count < Count) {
   var Left = $("#list li").size() - Count;
   $("#left").text(Left);
   $("#add").attr({ style: 'display: block;'});
   } else {
   $("#add").attr({ style: 'display: block;'});
   }
}
function ItemsRemaining(Count) {
    if ($("#list li").size() <= Count) {
    $("#add").attr({ style: 'display: none;'});
    } else {
    var Left = $("#list li").size() - Count;
    if (Left > 20) { Left = 20; }
    $("#left").text(Left);
    }
}

function ShowItems() {
    if (Count > $("#list li").size()) { Count = $("#list li").size() };
    $("#list li:lt(" + Count + ")").show();
    $("#list li:gt(" + (Count - 1) + ")").hide();
}


