﻿var fadeDuration = 150;
jQuery(document).ready(function () {
    if ($('#scroller > li').size() > 10) {
        $("#scroller").simplyScroll({
            className: 'vert',
            horizontal: false,
            frameRate: 20,
            speed: 8
        });
    }
    $('#nav li a').hover(function () {
        $(this).animate({ paddingLeft: '10px' }, fadeDuration);
        $(this).children('span').show().animate({ left: -5 }, fadeDuration);
    }, function () {
        $(this).animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);
    });
    $('#adminLogin').click(function () {
        $('#loginControl').show();
    });
    $('#loginClose').click(function () {
        $('#loginControl').hide();
    });
    $('#media').media();
    $('#nav li a').click(function (e) {
        e.preventDefault();
        window.location.href = "/Content.aspx?id=" + $(this).attr('href');
    });
    $('body iframe').hide();
});
//function showPage(contentUrl) {
//    var pageheight = window.innerHeight - 195;
//    $('#nextPage').css('height', window.innerHeight - 150 + 'px');
//    $('#nextPage').html('<nav><ul id="topNav"></ul></nav><iframe id="IFrameNew" name="IFrameNew" scrolling="auto"  frameborder="1" width="980px" height="' + pageheight + 'px"></iframe>');
//    $('#nextPage iframe').attr('src', contentUrl);
//    $('#topNav').html($('#nav').html());
//    $('#nextPage').show('slow');
//}
$(function () {
    $('#js-news').ticker({
        speed: 0.10,
        fadeInSpeed: 600,
        titleText: 'Updates:'
    });
});
        

