<commit_before>// window variables
var slideWindow = '.slidewindow',
    slideWindowButton = '.slidewindow-handle',
    slideWindowContent = '.slidewindow-content',  
    leftOffset = 0,
    rightOffset = 0,
    getSlideWindowPositionObj = {},
    slideWindowPosition,
    slideWindowContentWidth,
    getSlideWindowPosition = function(thisWindow) {
        if ($(thisWindow).hasClass('right')){return 'right';}
        else {return 'left';}// default window position 'left' 
    };

// menu variables
var slideWindowMenu = slideWindow+' '+'.menu',
    slideWindowMenuButton = slideWindowMenu+' '+'.fa-angle-down,'+slideWindowMenu+' '+'.fa-angle-up';

// tab specific variables
var tabContainer = '.tab-container',
    tab = '.tab',
    tabHandles = '.tab-handles',
    tabButtonAction,
    tabContent,
    tabClosed = true;

$(window).load(function(){
    
    //********************************************// 
    // Slide Window Function
    //********************************************// 
    
	var currentPage = $(location).attr('pathname').toLowerCase(),
		menuOpened = false;
     
    $(slideWindow).each(function(){
        
    	// open sub-menu if current page is not home page
    	$(slideWindowMenu+' li a').each(function(){
    		if(($(this).attr('href').toLowerCase() == currentPage) && (menuOpened == false)){
    	        if($(this).closest('ul').hasClass('menu')){
    	        	$(this).siblings('ul').show();
    	        	$(this).siblings('i').toggleClass('fa-angle-down fa-angle-up');
    	        }
    	        else{
    	        	$(this).parents('ul').show();
    	        	$(this).parents('ul').siblings('i').toggleClass('fa-angle-down fa-angle-up');
    	        }
    	        menuOpened = true;
    		}
    	});

    	// hiding slide windows on page load
        if (getSlideWindowPosition(this) == 'left'){
            $(this).css('top', leftOffset);
            leftOffset = leftOffset + 55;
        }
        else if (getSlideWindowPosition(this) == 'right'){
            $(this).css('top', rightOffset);
            rightOffset = rightOffset + 55;
        }
        
        $(this).css(getSlideWindowPosition(this), ('-'+($(slideWindowContent, this).width())+'px'));
        <commit_msg>fixed an issue on slidewindow-menu sub-level auto open function<commit_after>// window variables
var slideWindow = '.slidewindow',
    slideWindowButton = '.slidewindow-handle',
    slideWindowContent = '.slidewindow-content',  
    leftOffset = 0,
    rightOffset = 0,
    getSlideWindowPositionObj = {},
    slideWindowPosition,
    slideWindowContentWidth,
    getSlideWindowPosition = function(thisWindow) {
        if ($(thisWindow).hasClass('right')){return 'right';}
        else {return 'left';}// default window position 'left' 
    };

// menu variables
var slideWindowMenu = slideWindow+' '+'.menu',
    slideWindowMenuButton = slideWindowMenu+' '+'.fa-angle-down,'+slideWindowMenu+' '+'.fa-angle-up';

// tab specific variables
var tabContainer = '.tab-container',
    tab = '.tab',
    tabHandles = '.tab-handles',
    tabButtonAction,
    tabContent,
    tabClosed = true;

$(window).load(function(){
    
    //********************************************// 
    // Slide Window Function
    //********************************************// 
    
	var currentPage = $(location).attr('pathname').toLowerCase(),
		menuOpened = false;
     
    $(slideWindow).each(function(){
        
    	// open sub-menu if current page is not home page
    	$(slideWindowMenu+' li a').each(function(){
    		if((currentPage.indexOf($(this).attr('href').toLowerCase()) >= 0) && (menuOpened == false)){
    	        if($(this).closest('ul').hasClass('menu')){
    	        	$(this).siblings('ul').show();
    	        	$(this).siblings('i').toggleClass('fa-angle-down fa-angle-up');
    	        }
    	        else{
    	        	$(this).parents('ul').show();
    	        	$(this).parents('ul').siblings('i').toggleClass('fa-angle-down fa-angle-up');
    	        }
    	        menuOpened = true;
    		}
    	});

    	// hiding slide windows on page load
        if (getSlideWindowPosition(this) == 'left'){
            $(this).css('top', leftOffset);
            leftOffset = leftOffset + 55;
        }
        else if (getSlideWindowPosition(this) == 'right'){
            $(this).css('top', rightOffset);
            rightOffset = rightOffset + 55;
        }
        
        $(this).css(getSlideWindowPosition(this), ('-'+($(slideWindowContent, this).width())+'px'));
        
{'fraction_non_alphanumeric': 0.20133185349611543, 'fraction_numerical': 0.0028856825749167593, 'mean_word_length': 2.6280193236714977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3596950', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1316, 'n_words': 238}