//function pageLoad() {

//    $(function () {
//        // $(".shadow").dropShadow({left: 3, top: 3, opacity: 0.35, blur: 3});
//        // $(".topnav").hover(
//        //     function () {
//        //       $(this).dropShadow({left: 3, top: 3, opacity: 0.75, blur: 3});
//        //     }, 
//        //     function () {
//        //       $(this).removeShadow();
//        //     }
//        //);

//        $('#thumbs').galleriffic({
//            delay: 0, // in milliseconds
//            numThumbs: 20, // The number of thumbnails to show page
//            preloadAhead: -1, // Set to -1 to preload all images
//            enableTopPager: false,
//            enableBottomPager: false,

//            imageContainerSel: '#product-media', // The CSS selector for the element within which the main slideshow image should be rendered

//            renderSSControls: false, // Specifies whether the slideshow's Play and Pause links should be rendered
//            renderNavControls: false // Specifies whether the slideshow's Next and Previous links should be rendered

//        });

//    });

//}


function prodHashEH() {
    // Bind an event to window.onhashchange that, when the hash changes, gets the
    // hash and displays the content appropriately
    $(window).hashchange(function () {
        var hash = location.hash;
        var strippedHash = hash.replace(/^#/, '');

        var strOverview = "overview"
        var strSpecs = "specs"
        var strReviews = "reviews"

        switch (strippedHash) {
            case strOverview:
                {
                    $("#prodOverview").show();
                    $("#prodSpecs").hide();
                    $("#prodReviews").hide();
                };
                break;

            case strSpecs:
                {
                    $("#prodOverview").hide();
                    $("#prodSpecs").show();
                    $("#prodReviews").hide();
                };
                break;

            case strReviews:
                {
                    $("#prodOverview").hide();
                    $("#prodSpecs").hide();
                    $("#prodReviews").show();
                };
                break;

            default:
                {
                    $("#prodOverview").show();
                    $("#prodSpecs").hide();
                    $("#prodReviews").hide();
                };
        }

    })

    // Since the event is only triggered when the hash changes, we need to trigger
    // the event now, to handle the hash the page may have loaded with.
    $(window).hashchange();
}

function initHeroRotator() {
    $('#heroPics').cycle({
        fx: 'fade',
        timeout: 8000,
        pager: '#heroNav',
        pagerAnchorBuilder: function (idx, slide) {
            // return sel string for existing anchor
            return '#heroNav li:eq(' + (idx) + ') a';
        },
        before: function () {
            // remove the "current" class from all nav links
            $('#heroNav li a').removeClass('current');
            var captionText = $('img', this).attr('alt');
            var captionHeadline = $('img', this).parent().attr('title');
            var captionLink = $('img', this).parent().attr('href');
            var captionId = $('img', this).parent().attr('id').substring(2);
            var captionSelPrefix = "#l-";
            $('#hero-caption-text').html(captionText);
            $('#hero-headline').html(captionHeadline);
            if (captionLink == '') {
                $('#hero-caption-link').hide();
            } else {
                $('#hero-caption-link').show();
                $('#hero-caption-link').attr('href', captionLink);
            };
            $(captionSelPrefix.concat(captionId)).addClass('current');
        }
    });
}

function initTextBoxEvents() {
    $(".textbox").focus(function (srcc) {
        if ($(this).val() == $(this)[0].title) {
            $(this).removeClass("textboxActive");
            $(this).val("");
        }
    });

    $(".textbox").blur(function () {
        if ($(this).val() == "") {
            $(this).addClass("textboxActive");
            $(this).val($(this)[0].title);
        }
    });

    $(".textbox").blur();

}

























