
TWP.Module.BrandNavigation = function(args) {
    this.defaultOptions = {
        thisNode:null,
		commercialNode:null,
		navNode:null,
		mainNavClass:null,
		branding:[]
    };

    this.options = $.extend(this.defaultOptions, args);
	this.setupNavigation();
 
};

TWP.Module.BrandNavigation.prototype = {

    /**
     * Use setNavigation to highlight main nav channel and show up sub nav if there is
     */
    setupNavigation : function() {
		//highlight main nav channel
       if ($(".header-v3 #main-sub-nav-wrapper #main-sub-nav").length>0&&mainNavClass!=null){
	   		$(".header-v3 #main-sub-nav-wrapper #main-sub-nav li[class~="+this.options.mainNavClass+"]").addClass("active");
	   }
	   //hightlight sub nav if any
       if ($(".header-v3 #main-category-nav-wrapper .main-category-nav").length>0&&mainNavClass!=null){
	   		$(".header-v3 #main-category-nav-wrapper .main-category-nav[class~="+this.options.mainNavClass+"]").show();
	   }
	}
};

TWP.register('Brand-Navigation', TWP.Module.BrandNavigation);


