﻿$(document).ready(function() {

    /*   var h3index = 0;
    $('#vertmenu p').each(function(index, domEle) {
    h3index2 = index;
    $('#' + index + ' li').each(function(index) {
    $(this).children('a').each(function(index) {
    var str2 = this.href;
    var str = window.location.pathname.substr(location.pathname.lastIndexOf("/") + 1, location.pathname.length);
    if (str2.search(str) != -1) {
    h3index = h3index2;

                  }
    });
    });
      
    // alert(this.tagName + index + $(this).text());

    });*/
    // $("#accordion").accordion({ collapsible: false, autoHeight: false, header: "h3", active: h3index });
    if (window.location.pathname.indexOf('News-') > 0) {
        $('#vertmenu a[href$="' + window.location.pathname.substr(location.pathname.lastIndexOf("/") + 1, location.pathname.length) + '"]')
            .prepend('<img src="custom-theme/images/liIcon.png" style="border:10px;" width="9" height="8"> ')
            .css({ 'font-weight': 'bolder', 'padding-top': '4px', 'padding-bottom': '6px', 'background': '#eceddd' });
    }
    else {
        $('#vertmenu a[href="' + window.location.pathname.substr(location.pathname.lastIndexOf("/") + 1, location.pathname.length) + '"]')
            .prepend('<img src="custom-theme/images/liIcon.png" style="border:10px;" width="9" height="8"> ')
            .css({ 'font-weight': 'bolder', 'padding-top': '4px', 'padding-bottom': '6px', 'background': '#eceddd' });
    }
    $("#vertmenu").removeClass('hide-this');
});



