1/** 2* 2007-2016 IQIT-COMMERCE.COM 3* 4* NOTICE OF LICENSE 5* 6* @author IQIT-COMMERCE.COM <[email protected]> 7* @copyright 2007-2016 IQIT-COMMERCE.COM 8* @license GNU General Public License version 2 9* 10* You can not resell or redistribute this software. 11* 12*/ 13 14 15 16 17var cbpVerticalmenu; 18 19$(document).ready(function(){ 20 21 $('.cbp-vertical-on-top').on( 'mouseover', function() { 22 $(this).addClass('cbp-vert-expanded'); 23 }); 24 25 $('.cbp-vertical-on-top').on( 'mouseleave', function() { 26 $(this).removeClass('cbp-vert-expanded'); 27 }); 28 29 30 31 cbpVerticalmenu = (function(test) { 32 33 var menuId = '#cbp-hrmenu1', 34 $listItems = $( menuId + '> ul > li' ), 35 $menuItems = $listItems.children( 'a' ), 36 $innerTabs = $( menuId + ' .cbp-hrsub-tabs-names li > a' ), 37 $body = $( 'body' ), 38 current = -1, 39 currentlevel = -1; 40 41 $listItems.has('ul').find(' > a').doubleTapToGo(); 42 43 44 45 function init() { 46 47 var isTouchDevice = 'ontouchstart' in document.documentElement; 48 if( isTouchDevice ) { 49 $menuItems.on( 'mouseover', open ); 50 } 51 else{ 52 $menuItems.hoverIntent( { 53 over: open, 54 out: dnthing, 55 interval: 30 56 } ); 57 } 58 59 60 61 $listItems.on( 'mouseover', function( event ) { event.stopPropagation(); } ); 62 63 $innerTabs.click(function(event){ 64 event.preventDefault(); 65 link = $(this).data('link'); 66 if (typeof link != 'undefined') { 67 window.location.href = link; 68 } 69 70 }); 71 72 $innerTabs.hover( function(){ 73 $(this).tab('show'); 74 }); 75 76 $( window ).resize(function() { 77 $('cbp-hrmenu-tab').not('.cbp-hropen').find( '.cbp-hrsub-wrapper' ).removeAttr( 'style' ); 78 }); 79 } 80 81 function dnthing( event ) { 82 83 } 84 85 var setCurrent = function(strName) { 86 current = strName; 87 }; 88 89 function open( event ) { 90 91 92 $othemenuitem = $('#cbp-hrmenu').find('.cbp-hropen'); 93 94 95 $othemenuitem.find('.cbp-hrsub').removeClass('cbp-show'); 96 closeElement($othemenuitem); 97 98 cbpHorizontalMenu.setCurrent(-1); 99 100 var $item = $( event.currentTarget ).parent( 'li' ), 101 idx = $item.index(); 102 103 104 105 if(current == idx ) 106 return; 107 108 $submenu = $item.find('.cbp-hrsub'); 109 $submenu.removeClass('cbp-show'); 110 111 if( current !== -1 ) { 112 closeElement($listItems.eq( current )); 113 } 114 115 if( current === idx ) { 116 closeElement($item); 117 current = -1; 118 119 } 120 else { 121 $submenu.parent().width($('#columns').width()-$(menuId).width()); 122 callerHeight = $item.height(); 123 $submenu.parent().css( { marginLeft : $item.innerWidth()+"px", marginRight : $item.innerWidth()+"px", marginTop : -callerHeight+"px" } ); 124 $submenu.find('.cbp-triangle-container').css({top: (callerHeight-24)/2}); 125 $submenu.addClass( 'cbp-show' ); 126 $item.addClass( 'cbp-hropen' ); 127 current = idx; 128 $body.off( 'mouseover' ).on( 'mouseover', close ); 129 } 130 131 132 133 return false; 134 135 } 136 137 function close( event ) { 138 closeElement($listItems.eq( current )); 139 current = -1; 140 } 141 142 function closeElement( $element ) { 143 $element.removeClass( 'cbp-hropen' ); 144 } 145 146 return { init : init, 147 setCurrent: setCurrent 148 }; 149 150})(); 151 152 cbpVerticalmenu.init(); 153 154});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.