﻿jQuery(function ($) {

    $('.vertical_menu ul').hide();

    // toggle sub menus on hover
    $('.vertical_menu > li')
              .hover(function (e) {
                  $(this).children('ul').hoverFlow(e.type, {
                      'opacity': 'show'
                  });
                  $(this).css('background', 'url(images/bgItem_Over.png)');
                  $('ul.vertical_menu li').css('margin-left', '-20px');
                  $('ul.vertical_menu li').css('padding-left', '20px');
                  
                  /* 
                  $('#Item2').hasClass('itItem'); 
                  $('#Item2').removeClass('itItem'); 
                  */
              }, function (e) {
                  $(this).children('ul').hoverFlow(e.type, {
                      'opacity': 'hide'
                  });
                  $(this).css({ "background": "" })
              });

    $('.NewsContainer').vTicker({
        speed: 600,
        pause: 8000,
        animation: 'fade',
        mousePause: true,
        height: 60,
        direction: 'up'
    });

});

function resetTxtSearch() { document.getElementById("txtSearch").value = ""; }

function disableEnterKey(e) {
    var key;

    if (window.event) { key = window.event.keyCode; }
    else { key = e.which; }

    if (key == 13) { document.strSearch.submit(); return false; }
    else { return true; }
}



function ShowHideContentDiv(pOpcShowOrHide) {

    if (pOpcShowOrHide == "Hide") {
        $('#dvContBoxLeftColumn02').hide('fast');
        $('#dvContBoxLeftColumn02Show').show('fast');
    }
    else if (pOpcShowOrHide == "Show") {
        $('#dvContBoxLeftColumn02').show('fast');
        $('#dvContBoxLeftColumn02Show').hide('fast');
    }
}
