﻿/// <reference path="jquery-1.3.2-vsdoc.js"/>

// Logo rotator
var numImages = 4;
var currentImage = parseInt(Math.random() * numImages + 1);
var imagePath = 'images/';

//$(function() {
//    for (var i = 1; i <= numImages; i++)
//        (new Image()).src = imagePath + "poweredByICE_" + i + ".gif";
//});

//function rotate(item) {
//    item.src = imagePath + "poweredByICE_" + currentImage + ".gif";
//    currentImage = (currentImage % numImages) + 1;
//}

// Search box
var searchText = "Search";

$(function() {
    $(".searchbox")
        .focus(function() {
            if ($(this).val() == searchText)
                $(this).val('');
            $(this).removeClass("unselected");
            $(this).addClass("selected");
        })
        .blur(function() {
            if ($(this).val() == '') {
                $(this).val(searchText);
                $(this).removeClass("selected");
                $(this).addClass("unselected");
            }
        });

    /* banner */
    $('.jbanner').cycle({
        fx: 'fade',
        timeout: 7000,
        pause: 1
    });

});