/* Tsapper (c) LinkU Internet Media // Rens van Dongen 2007 - 2009 */ var standaardNickname = ''; var standaardPassword = ''; var radioStorage = []; var msgTimerPointer = false; var checkboxStorage = []; var addNoAlpha = $.browser.msie && $.browser.version < 7 ? '_noalpha' : ''; // voor phpbb var onload_functions = new Array(); var onunload_functions = new Array(); // data var getalWoorden = ["nul","één","twee","drie","vier","vijf","zes","zeven","acht","negen","tien","elf","twaalf","dertien","veertien","vijftien","zestien","zeventien","achttien","negentien","twintig"]; var htmlLoader = ''; // gewoonte geworden if ( window != top ) { top.location.href = location.href; } // the allmighty initiator, please beware of its p0werzz $(document).ready(function() { bakeFormStyles(); // maak tooltip layertjes van .tooltip titles en leegt de title $("dt label.tooltip").each(function() { $(this).after(" "+$(this).attr("title")+"").attr("title", "") .mouseover(function() { $("dt span").hide(); $(this).next().fadeIn(); }) .mouseout(function() { $(this).next().hide(); }); }); // browser history $.historyInit(historyPageload); initHistoryLinks(); // IE radio loss fix var lastkey = ''; $(':radio').each(function() { if ( lastkey != this.name ) { radioStorage[this.name] = varGet("input[name='"+this.name+"']:checked"); } lastkey = this.name; }); $(':radio').click(updateRadioStorage); // stukke links beschermen if ( !$.browser.msie ) { $("a").each(function() { if ( $(this).attr("href") == '#' ) { $(this).click(function() { window.alert('Sorry, deze pagina is nog niet beschikbaar in deze Tsapper versie.'); return false; }); } }); } // spotlijst.php $("a.closeAndOpenNext").click(function() { $(this).hide("slow").parent().next().show("slow"); return false; }); /* vies var tooltipZindex = 99; $("dt").each(function() { $(this).css("z-index", tooltipZindex); tooltipZindex--; });*/ //if ( !($.browser.msie && parseInt($.browser.version) < 7) ) if ( !$.browser.msie ) { // tabs $("input.tabButton").show(); $("#tabSystem").show().addClass("tabSystem").tabs({ fx: { opacity: 'toggle' } }); $("input.tabNext").show().each(function(i) { $(this).click(function() { $('#tabSystem').tabs('select', i+1); return false; }); }); } // error handling $("div.messageError").each(function() { if ( $("#"+this.id).html().length ) { hideMsgTimer(this.id); } }); $("div.statusError").each(function() { if ( $("#"+this.id).html() ) { hideMsgTimer(this.id); } }); // laat een #autoTimer automatisch terugtellen en doorkoppelen if ( number = $("#autoTimer").html() ) { countAutoTimer(parseInt(number)); } // nav menu $("#headerMenu li.main").hover(function() { $(this).find("a:first").addClass('current'); $("#headerMenu li ul").hide(); $(this).find("ul").show(); },function() { $(this).find("a:first").removeClass('current'); }); $("#headerSub"+currentPage).show().parent().find("a:first").addClass('current'); // style van H1's aanpassen $("div.boxContent .bd .c").find("h1:first").css("margin-top", 0); // rijen uitklappen in te lange tabel $("td.showAllResults").click(function() { $(this).parent().hide().parent().parent().find("tbody").show(); }); // title'tjes leggen $(".gesloten").addClass("tooltip").attr('title', 'Dood!'); // schakelen in avatar block $("#avatarBlockTerug").click(avatarBlockTerug); $("#avatarBlockVerder").click(avatarBlockVerder); // alles selecteren $("input.checkSerieCheckboxAll").livequery('click', function() { // checkt of nu alle boxjes met zijn naam zijn gecheckt, en toggled dan ook de "selecteer alle" checkbox met zijn naam checkSerieCheckboxAllByName($(this).attr('name'), $(this).attr('checked')); }); $("input.activateCheckboxAll").livequery('click', function() { // onclick op de "check all" box, werken waardes bij in checkboxStorage array checkedVal = $(this).attr('checked'); checkboxName = $(this).attr('name'); $("input[name='"+checkboxName+"']").each(function() { if ( $(this).val() > 0 ) { valueFound = false; for( key in checkboxStorage ) { if ( $(this).val() == checkboxStorage[key] ) { if ( checkedVal ) { valueFound = true; } else { checkboxStorage.splice(key, 1); break; } } } if ( checkedVal && !valueFound ) { checkboxStorage.push($(this).val()); } } }); // (de)selecteert alle checkboxjes met zijn naam var checkedVal = $(this).attr("checked") ? true : false; $("input[name='"+this.name+"']").each(function() { $(this).attr("checked", checkedVal); }); }); // popup techniek $("a.fancybox").fancybox(); /* // datepicker taal $.datepicker.regional['nl'] = { clearText: 'Wissen', clearStatus: 'Wis de huidige datum', closeText: 'Sluiten', closeStatus: 'Sluit zonder verandering', prevText: '<Terug', prevStatus: 'Laat de voorgaande maand zien', prevBigText: '<<', prevBigStatus: '', nextText: 'Volgende>', nextStatus: 'Laat de volgende maand zien', nextBigText: '>>', nextBigStatus: '', currentText: 'Vandaag', currentStatus: 'Laat de huidige maand zien', monthNames: ['Januari','Februari','Maart','April','Mei','Juni', 'Juli','Augustus','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mrt','Apr','Mei','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], monthStatus: 'Laat een andere maand zien', yearStatus: 'Laat een ander jaar zien', weekHeader: 'Wk', weekStatus: 'Week van het jaar', dayNames: ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'], dayNamesShort: ['Zon','Maa','Din','Woe','Don','Vri','Zat'], dayNamesMin: ['Zo','Ma','Di','Wo','Do','Vr','Za'], dayStatus: 'DD', dateStatus: 'D, M d', dateFormat: 'dd.mm.yy', firstDay: 1, initStatus: 'Kies een datum', isRTL: false}; $.datepicker.setDefaults($.datepicker.regional['nl']); */ });