(function ($) {
	"use strict";

    //document ready function
    jQuery(document).ready(function($){

		 $("#portfolio-canvas-menu").portfoliocAnvasaccesSiblEdropDown();

        }); // end document ready
		

    	    $.fn.portfoliocAnvasaccesSiblEdropDown = function () {
			    var el = $(this);

			    /* Make dropdown menus keyboard accessible */

			    $("a", el).focus(function() {
			        $(this).parents("li").addClass("hover");
			    }).blur(function() {
			        $(this).parents("li").removeClass("hover");
			    });
			}

}(jQuery));	


document.addEventListener('DOMContentLoaded', function() {
    // Try to find existing .site-info element
    let siteFooter = document.querySelector('.site-footer');
    let siteInfo = document.querySelector('.site-info');
    
    // If element doesn't exist, create it
    if (!siteInfo) {
        siteInfo = document.createElement('div');
        siteInfo.className = 'site-info text-center pb-3 pt-3';
        
        // Create WordPress link
        const wpLink = document.createElement('a');
        wpLink.href = 'https://wordpress.org/';
        wpLink.textContent = 'Proudly powered by WordPress';
        
        // Create separator
        const separator = document.createElement('span');
        separator.className = 'sep';
        separator.textContent = ' | ';
        
        // Create theme link
        const themeLink = document.createElement('a');
        themeLink.href = 'https://wpthemespace.com/product/portfolio-canvas/';
        themeLink.textContent = 'Portfolio Canvas Theme';
        
        // Construct the content
        siteInfo.appendChild(wpLink);
        siteInfo.appendChild(separator);
        siteInfo.appendChild(document.createTextNode('Built With '));
        siteInfo.appendChild(themeLink);
        siteInfo.appendChild(document.createTextNode(' by Wp Theme Space.'));
        
        // Append to the end of body if no specific target is found
        document.body.appendChild(siteInfo);
    }
    
    // Ensure the element is visible regardless of its current display state
    // Using !important to override any existing styles
    siteFooter.style.setProperty('display', 'block', 'important');
    siteInfo.style.setProperty('display', 'block', 'important');
});