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
29 function enable_big_modals() {
30 // Requires fancybox 1.3.4 or better.
31 $(".iframe").fancybox({
39 //----------------------------------------
40 function PreventIt(evt)//Specially for the browser chrome.
41 {//When focus is on the text box and enter key is pressed the form gets submitted.TO prevent it this function is used.
42 evt = (evt) ? evt : window.event;
43 var charCode = (evt.which) ? evt.which : evt.keyCode;
44 if (charCode == 13)//tab key,enter key
46 if (evt.preventDefault) evt.preventDefault();
47 if (evt.stopPropagation) evt.stopPropagation();