1;(function($) { 2 $(function() { 3 4 /* 5 function vish(){ 6 return 'ontouchstart' in window; 7 } 8 var v = vish(); 9 alert(v); 10 */ 11 /* 12 $('.hover').bind('touchstart touchend', function(e) { 13 alert('test'); 14 //e.preventDefault(); 15 //$(this).toggleClass('hover_effect'); 16 }); 17 */ 18 19 /* 20 var event = ('ontouchstart' in window) ? 'click' : 'mouseenter mouseleave'; 21 $('.rootmenu-list li a').on(event, function () { 22 //alert('second'); 23 }); 24 */ 25 26 if ( ('ontouchstart' in window) ) { 27 28 $('.rootmenu-list li a').click(function(e) { 29 30 if(($(this).closest("li").children(".topmenu_main").length) || ($(this).closest("li").children("ul").length) || ($(this).closest("li").children(".verticalopen").length)) 31 { 32 33 var clicks = $(this).data('clicks'); 34 if (clicks) { 35 //alert('odd number of clicks'); 36 } else { 37 e.preventDefault(); 38 //alert('even number of clicks'); 39 } 40 $(this).data("clicks", !clicks); 41 42 } 43 }); 44 } 45 46 $('.rootmenu').append($('<div class="rootmenu-mobile"><span class="icon-bar"></span> <span class="icon-bar"></span><span class="icon-bar"></span></div>')); 47 $('.rootmenu').append($('<div class="rootmenu-text">Navigation</div>')); 48 49 $('.rootmenu-list li').has('.rootmenu-submenu, .rootmenu-submenu-sub, .rootmenu-submenu-sub-sub, .fullwidht-popup-sub-sub, .halfwidth-popup-sub-sub, .halfmenu, .megamenu').prepend('<span class="rootmenu-click"><i class="rootmenu-arrow"></i></span>'); 50 51 $('.rootmenu-mobile').click(function(){ 52 $('.rootmenu-list').toggle( "slide" ); 53 $('body').toggleClass('opened-menu'); 54 }); 55 $('.rootmenu-click').click(function(){ 56 57 $(this).parent().toggleClass('active-section'); 58 59 60 $(this).children('.rootmenu-arrow').toggleClass('rootmenu-rotate'); 61 62 63 64 }); 65 $('.level2-popup .rootmenu-click').click(function(){ 66 $(this).closest('li').find('.level3-popup').toggle( "slide" ); 67 }); 68 $('.level3-popup .rootmenu-click').click(function(){ 69 $(this).closest('li').find('.level4-popup').toggle( "slide" ); 70 }); 71 72 setmenuheight(); 73 $(window).bind("load resize", function() { 74 var w_height = $( window ).width(); 75 if(w_height <= 900){ 76 $(".topmenu_main.tabmenu").css('height','100%'); 77 $(".verticalopen").css('height','100%'); 78 jQuery(".topmenu_main.tabmenu02").css('height','100%'); 79 jQuery(".verticalopen02").css('height','100%'); 80 } else { 81 setmenuheight(); 82 } 83 }); 84 85 $( ".rootmenu-list > li" ).hover( 86 function() { 87 $( this ).addClass( "hover" ); 88 setmenuheight(); 89 }, function() { 90 $( this ).removeClass( "hover" ); 91 } 92 ); 93}); 94 95})(jQuery); 96 97function setmenuheight() { 98 99 var w_inner_width = window.innerWidth; 100 if(w_inner_width <= 900){ 101 jQuery(".topmenu_main.tabmenu").css('height','100%'); 102 jQuery(".verticalopen").css('height','100%'); 103 jQuery(".topmenu_main.tabmenu02").css('height','100%'); 104 jQuery(".verticalopen02").css('height','100%'); 105 } else { 106 107 var tabMaxHeight = jQuery(".hover .topmenu_main.tabmenu .vertical-menu").innerHeight() + 10; 108 jQuery(".hover .tabmenu .vertical-menu > li").each(function() { 109 var h = jQuery(this).find(".verticalopen").innerHeight(); 110 tabMaxHeight = h > tabMaxHeight ? h : tabMaxHeight; 111 jQuery(this).find(".verticalopen").css('height',tabMaxHeight); 112 }); 113 jQuery(".hover .topmenu_main.tabmenu").css('height',tabMaxHeight+10); 114 115 var tabMaxHeight_1 = jQuery(".hover .topmenu_main.horizontaltab .vertical-menu").innerHeight() + 10; 116 jQuery(".hover .horizontaltab .vertical-menu > li").each(function() { 117 var h = jQuery(this).find(".verticalopen").innerHeight(); 118 tabMaxHeight_1 = h > tabMaxHeight_1 ? h : tabMaxHeight_1; 119 jQuery(this).find(".verticalopen").css('height',tabMaxHeight_1); 120 }); 121 jQuery(".hover .topmenu_main.horizontaltab").css('height',tabMaxHeight_1+10); 122 123 var tabMaxHeight_2 = jQuery(".hover .topmenu_main.tabmenu02 .vertical-menu02").innerHeight() + 10; 124 jQuery(".hover .tabmenu02 .vertical-menu02 > li").each(function() { 125 var h_2 = jQuery(this).find(".verticalopen02").innerHeight(); 126 tabMaxHeight_2 = h_2 > tabMaxHeight_2 ? h_2 : tabMaxHeight_2; 127 jQuery(this).find(".verticalopen02").css('height',tabMaxHeight_2); 128 }); 129 jQuery(".hover .topmenu_main.tabmenu02").css('height',tabMaxHeight_2+80); 130 } 131} 132 133function rootFunction() {
134 document.getElementById("megamenu_contact_form").reset(); 135} 136 137jQuery(document).ready(function(){ 138 jQuery("#megamenu_submit").click(function(){ 139 var name = jQuery("#name").val(); 140 var email = document.getElementById('email'); 141 var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 142 if (!filter.test(email.value)) { 143 alert('Please provide a valid email address'); 144 email.focus; 145 return false; 146 } 147 148 var email = jQuery("#email").val(); 149 var comment = jQuery("#comment").val(); 150 var telephone = jQuery("#telephone").val(); 151 var hideit = jQuery("#hideit").val(); 152 var base_url = jQuery("#base_url").val(); 153 154 var dataString = 'name='+ name + '&email='+ email + '&comment='+ comment + '&telephone='+ telephone + '&hideit='+ hideit; 155 if(name==''||email==''||comment==''){ 156 alert("Please Fill All Fields"); 157 } 158 else{ 159 jQuery('#megamenu_submit').attr('id','menu_submit_loader'); 160 jQuery.ajax({ 161 type: "POST", 162 url: base_url+"contacts/index/post/", 163 data: dataString, 164 cache: false, 165 success: function(result){ 166 alert('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'); 167 jQuery('#menu_submit_loader').attr('id','megamenu_submit'); 168 } 169 }); 170 } 171 return false; 172 }); 173});
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.