3 $('ul.tabNav a').click(function() {
4 var curChildIndex = $(this).parent().prevAll().length + 1;
5 $(this).parent().parent().children('.current').removeClass('current');
6 $(this).parent().addClass('current');
7 $(this).parent().parent().next('.tabContainer').children('.current').each(function() {
8 $(this).removeClass('current');
9 $(this).parent().children('div:nth-child('+curChildIndex+')').each(function() {
10 $(this).addClass('current');
18 function enable_modals() {
21 $(".iframe").fancybox( {
22 'overlayOpacity' : 0.0,
23 'showCloseButton' : true,
24 'centerOnScroll' : false
28 //----------------------------------------
29 function PreventIt(evt)//Specially for the browser chrome.
30 {//When focus is on the text box and enter key is pressed the form gets submitted.TO prevent it this function is used.
31 evt = (evt) ? evt : window.event;
32 var charCode = (evt.which) ? evt.which : evt.keyCode;
33 if (charCode == 13)//tab key,enter key
35 if (evt.preventDefault) evt.preventDefault();
36 if (evt.stopPropagation) evt.stopPropagation();