SEUNS ONDER 6
1 Hendré Badenhorst (Windhoek Affies)
2 Markus Pack (Kammis Kinderwelt)
3 Karl Jooste (Windhoek Gim)
MEISIES ONDER 6
1 Naita Mukete (WCA)
2 Milan Schutte (Windhoek Gim)
SEUNS ONDER 8
1 Ivor Chase (St. Georges)
2 Cody Heigan (Windhoek Gim)
3 Tristan van den Heuvel (St. Pauls)
MEISIES ONDER 8
1 Mienke de Beer (Windhoek Affies)
2 Kiana Brand (Pikkie Paradys)
3 Skylar Swanepoel (DHPS)
SEUNS ONDER 10
1 Micah Chase (St. Georges)
2 Christo Nell (Windhoek Gim)
3 Luke Coomer (St. Pauls)
MEISIES ONDER 10
1 Qara Volschenk (St. Pauls)
2 Lillian Kibble (Fowler House)
3 Danika de Beer (Windhoek Affies)
SEUNS ONDER 12
1 Julius Braun (DHPS)
2 Henry Chamberlain (St. Pauls)
3 Mike Baartman (Windhoek Gim
MEISIES ONDER 12
1 Anne Cramer (DHPS)
2 Xane Meyer (Windhoek Gim)
3 Nicole Surén (Windhoek Gim)
SEUNS ONDER 14
1 Roger Surén (Windhoek Gim)
2 Nathan Chase (St. Georges)
3 Marco Thiel (DHPS)
MEISIES ONDER 14
1 Delsia Janse van Vuuren (Windhoek Gim)
2 Kylie Dickerson (Windhoek Gim)
3 Rose-Marie Thiel (DHPS)
SEUNS ONDER 16
1 Daniel Hahn (St. Paul’s College)
2 Kevin Lowe (DHPS)
3 Adrian Key (DSW)
MEISIES ONDER 16
1 Ada Kahl (Windhoek Affies)
2 Lotte Beulker (DHPS)
3 Laura Engling (DHPS)
SEUNS ONDER 18
1 Bergran Jensen (Windhoek Gim)
2 Ethan L’Estrange (St. Georges College)
3 Anton Engling (DHPS)
MEISIES ONDER 18
1 Monique du Plessis (Tucsin)
var category = 'Sports'; var keywords = ["Sport uitslae"]; var article_date = "2021-04-06 00:00:00"; var adverts = []; var agent=""; //PRELOAD window.onload = showBody; function showBody(){ $("#pre_load").delay(500).fadeOut(500);
setInterval(function(){ duration = moment().format('dddd, Do MMMM, YYYY HH:mm:ss'); //show how many hours, minutes and seconds are left $('#todays-time').text(duration); }, 1000); $('#regModal').on('shown.bs.modal', function () {
$('#my_na_frame3').attr('src', 'https://nmh.my.na/main/nmh_register/2').removeClass('hide');
}); $('#interestModal').on('shown.bs.modal', function () {
$('#my_na_frame4').attr('src', 'https://www.my.na/nmh/interests/').removeClass('hide');
}); loadDeferredStyles;
//windowResize(); swipeHeight(); //heightCalculate(); //PAYGATE CODE SUBMIT $('#pay_code').on('submit', function(e){
e.preventDefault(); var frm = $(this); var dataf = frm.serialize(); var btn = $(this).find('button'); btn.addClass('disabled'); //console.log(frm.attr('action')+'?'+dataf);
$.getJSON( frm.attr('action')+'?'+dataf, function( data ) {
if(data.success){
//console.log('yeah '+data); set_code_access(data); }else{
$('#code_msg').html('
'); //console.log('Noooo '+data); btn.removeClass('disabled'); }
});
});
$('#titelseiten').flickity({ wrapAround:true, cellSelector: ".swipe-item", contain: true, lazyLoad: true, autoPlay: 3100, setGallerySize: false, initialIndex: 0, pageDots: false });
load_more(); run_my_na_na(); autoPlayYouTubeModal(); load_my_na_products(); goinit(); window.setTimeout(function(){ load_picsad('all', 8, 'ad_block_1'); get_wethear('na','windhoek'); }, 1500);
smartImage();
/*document.addEventListener('lazybeforeunveil', function(e){ var src = e.target.getAttribute('data-src');
var smartImg = $(e.target); var smartImgWidth = smartImg.width(); var smartImgHeight = smartImg.height(); console.log('setting smartimage after lazyload '+smartImgHeight+' '+smartImgWidth+' '+src); if ((smartImgWidth/smartImgHeight) >= 1.777){ //16x9 + all landscapes with height lower than 16x9 smartImg.css({'width':'100%', 'height':'auto'}); } else if ((smartImgWidth/smartImgHeight) < 1.777){ //non 16x9 + portraits smartImg.css({'height':'100%','width':'auto'}); }else{ //square smartImg.css({'height':'100%','width':'auto'}); } });*/ } function load_banner_advert() { $.ajax({ type: "GET", url: "https://www.namibiansun.com/main/write_banner_impressions/", success: function() { } }); } function set_code_access(obj){ $.getJSON( "https://www.namibiansun.com/main/set_code/?code="+JSON.stringify(obj), function( data ) { if(data.success){ window.location.reload(); }else{ } }); } var loadDeferredStyles = function() { //console.log('deferre'); var addStylesNode = document.getElementById("deferred-styles"); var replacement = document.createElement("div"); replacement.innerHTML = addStylesNode.textContent; document.body.appendChild(replacement) addStylesNode.parentElement.removeChild(addStylesNode); }; var raf = ( "undefined" != typeof requestAnimationFrame ) ? requestAnimationFrame : false || ( "undefined" != typeof mozRequestAnimationFrame ) ? mozRequestAnimationFrame : false || ( "undefined" != typeof webkitRequestAnimationFrame ) ? webkitRequestAnimationFrame : false || ( "undefined" != typeof msRequestAnimationFrame ) ? msRequestAnimationFrame : false; if( raf ) { raf( loadDeferredStyles ); } else { if( "undefined" != typeof window.addEventListener ) window.addEventListener( 'load', loadDeferredStyles ); else if( "undefined" != typeof window.attachEvent ) window.attachEvent( 'onload', loadDeferredStyles ); } function get_wethear(cunt,city){ $.getJSON( "https://nmh.my.na/weather/display/"+cunt+"/"+city+"/"+2, function( data ) { if(data.success){ $('#weather_cont').html(data.html); $('.city-weather').unbind('click').bind('click', function(e){ var city = $(this).data('location'); //console.log(city); get_wethear('na', city); }); } }); } function go_login(){ $('#profile_holder').find('a').click(); } function load_picsad(q, l, b){ $.getJSON( "https://nmh.my.na/main/get_picsad_hub/"+q+"/"+l+"/?bus_id=3454&keywords="+encodeURI(JSON.stringify(keywords))+"&category="+encodeURI(category), function( data ) { var adb = $("https://www.namibiansun.com/news/sport-uitslae2021-04-06/#"+b); for(var i = 0; i < data.length; i++) { var obj = data[i]; adb.prepend(obj.body); adverts.push(obj); agent = obj.user_agent; } //MOBILE FIX if(agent == 'mobile'){ for(var ii = 0; ii < data.length; ii++) { var obj = data[ii]; $('#adholder_'+ii).html(obj.body); } } load_content_ads(); }); } //FUNCTION TO GET AND AUTO PLAY YOUTUBE VIDEO FROM DATATAG function autoPlayYouTubeModal() { var trigger = $("body").find('.video'); trigger.click(function () { var theModal = $(this).data("target"), videoSRC = $(this).attr("data-theVideo"), videoSRCauto = videoSRC + "?autoplay=1"; $(theModal + ' iframe').attr('src', videoSRCauto); $(theModal + ' button.close').click(function () { $(theModal + ' iframe').attr('src', videoSRC); }); $('.modal').click(function () { $(theModal + ' iframe').attr('src', videoSRC); }); $('.modal').on('hidden.bs.modal', function () { $(theModal + ' iframe').attr('src', ''); }) }); } function load_more(){ $('.load-more').unbind('click').bind('click', function(e){ e.preventDefault(); var link = $(this).attr('href'), targ = $(this).data('target'); var more = $("https://www.namibiansun.com/news/sport-uitslae2021-04-06/#"+targ+'_more'); more.html('Loading'); //console.log(link); $.get( link, function( data ) { var adb = $("https://www.namibiansun.com/news/sport-uitslae2021-04-06/#"+targ); //console.log(adb); adb.append(data); adb.animate({ scroll: -200 }); more.fadeOut() window.setTimeout(function(){ more.remove(); },1000); load_more(); autoPlayYouTubeModal(); smartImage(); //MOBILE FIX if(agent == 'mobile'){ window.setTimeout(function(){ for(var ii = 1; ii < adverts.length; ii++) { var obj = adverts[ii]; $('#adholder_'+ii).html(obj.body); console.log(ii+' going '+obj.body); } }, 1000); } }); }); //smartImage(); } function load_content(link, targ, type){ //console.log(link); $.get( link, function( data ) { var adb = $("https://www.namibiansun.com/news/sport-uitslae2021-04-06/#"+targ); adb.hide(); //console.log(adb); adb.html(data); load_more(); run_my_na_na(); if(type == 'normal'){ //heightCalculate(); } if(type == 'menings'){ //POLL RESULTS $(".poll-percent").each(function() { var percent = $(this).attr('rel'); $(this).attr('title',percent+'% percent').append('
'+percent+'%'); //heightCalculate(); }); } if(type == 'social'){
//TWITTER (function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs")); (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); }
window.setTimeout(function(){
adb.fadeIn(500); //heightCalculate(); }, 100);
//$('.image .category,.image .price').append('
'); });
}
function run_my_na_na(){
$('.my_na_na_btn').unbind('click').bind('click', function(e) { e.preventDefault(); var type = $(this).data('type'), id = $(this).data('id'), cur =$(this); //console.log(type); $.getJSON( "https://www.namibiansun.com/main/my_na_na/?type="+type+"&type_id="+id, function( data ) {
if(data.result){
cur.find('span').html(parseInt(cur.find('span').text()) + 1); }else{
cur.attr('rel', 'tooltip').attr('title', data.msg); cur.tooltip('show'); }
});
});
} function load_my_na_products(){
$('.load-more-products').unbind('click').bind('click', function(e){
e.preventDefault(); var btn = $(this), cont = $('#my_products_tab'); var h = cont.css('height'); cont.html('

').css('height', h); var link = btn.attr('href');//, targ = btn.data('target'); $.get( link, function( data ) {
cont.html(data); //cont.fadeIn(); $('.my_na_prod_slider').flickity({ wrapAround:false, cellSelector: ".swipe-item", contain: true, lazyLoad: true, autoPlay: true, setGallerySize: true, initialIndex: 2, pageDots: false });
swipeHeight(); //heightCalculate(); load_my_na_products(); });
})
return false;
}
function start_products(){ var cont = $('#my_products_tab'); $.get( "https://www.namibiansun.com/main/get_my_na_products/0/0/0/10/my_products_tab/", function( data ) {
cont.html(data); //cont.fadeIn(); $('.my_na_prod_slider').flickity({ wrapAround:false, cellSelector: ".swipe-item", contain: true, lazyLoad: true, autoPlay: true, setGallerySize: true, initialIndex: 2, pageDots: false }); load_my_na_products(); //$('.image .category,.image .price').append('
'); });
} function submit_poll(id){
var frm = $('#form_poll_'+id), btn = $('#form_poll_btn_'+id);
if (!$("input[name="answers"]:checked").val()) {
frm.attr('rel', 'tooltip').attr('title', 'Please select an answer'); frm.tooltip('show'); }else { frm.tooltip('destroy'); btn.val('Submitting...'); $.ajax({ type: "POST", url: "https://www.namibiansun.com/survey/submit_poll/", data: frm.serialize(), success: function(data) { var res = JSON.parse(data); frm.attr('rel', 'tooltip').attr('title', res.msg); frm.tooltip('show'); btn.val('Thank You').addClass('disable').attr('onclick', 'return false;'); $.each(res.percent, function (key, data) {
var elem = $('#poll_q_'+key), perc = Math.round(data); elem.attr('rel', perc); elem.find('div').animate({ width: perc+'%' }, 500); elem.find('span').html(perc+'%'); });
} });
}
return false;
}
function swipeHeight(){ $('.swipe').each(function(){ var thisFlickity = $(this); var swipeHeight = $(this).find('.swipe-item').height(); thisFlickity.find('.flickity-viewport').height(swipeHeight); }); }
function heightCalculate(){ var windowWidth = $(window).width(); if(windowWidth >= 800) { $('.overflower').each(function(){ var overflowMain = $(this).find('.overflow-main').height(); var overflowAdjust = $(this).find('.tab-overflow'); overflowAdjust.height(overflowMain);
});
}
} function goinit(){
$('[data-toggle="tooltip"]').tooltip(); function menuCalculate(){ var windowWidth = $('body').css('width').replace(/[^-d.]/g, ''); //var windowHeight = $('body').css('height').replace(/[^-d.]/g, ''); var menuWidth = $('#menu').css('width').replace(/[^-d.]/g, ''); var totalWidth = parseInt(windowWidth, 10) - parseInt(menuWidth, 10); var headerHeight = $('#header').css('height').replace(/[^-d.]/g, ''); var mobile = $('#mobile'); //var h2 = (windowHeight - 102);
if (mobile.hasClass('is-open')) {
if (windowWidth <= 800) {
$('#main,#header').stop().animate({'width':windowWidth,'margin-left':menuWidth},0);
}else{
$('#main,#header').stop().animate({'width':totalWidth,'margin-left':menuWidth},0);
}
$('#main').stop().animate({'padding-top':headerHeight},0);
$('#menu').stop().animate({'margin-left':'0px'},0);
$('#mobile i').removeClass('fa-angle-double-right').addClass('fa-angle-double-left');
}else{
$('#main,#header').stop().animate({'width':windowWidth,'margin-left':'0px'},0);
$('#main').stop().animate({'padding-top':headerHeight},0);
$('#menu').stop().animate({'margin-left':-menuWidth},0);
$('#mobile i').removeClass('fa-angle-double-left').addClass('fa-angle-double-right');
}
}
function mediaQuerry(){
var windowWidth = $(window).width();
if (windowWidth <= 801) {
// FOR MOBILE
$('#mobile').removeClass('is-open');
menuCalculate();
swipeHeight();
//heightCalculate();
}else{
// FOR DESKTOP
//console.log(get_local('menu_open', true));
if(get_local('menu_open')){
$('#mobile').removeClass('is-open');
}else{
$('#mobile').addClass('is-open');
}
menuCalculate();
swipeHeight();
heightCalculate();
}
// grab an element
var myElement = document.getElementById("header");
// construct an instance of Headroom, passing the element
var headroom = new Headroom(myElement, {
"offset": 10,
"tolerance": 20,
"classes": {
"initial": "animated",
"pinned": "slideDown",
"unpinned": "slideUp"
}
});
// initialise
headroom.init();
}
$('#mobile').unbind('click').bind('click', function() {
if ($(this).hasClass('is-open')) {
$(this).removeClass('is-open');
menuCalculate();
save_local('menu_open', true);
}else{
$(this).addClass('is-open');
menuCalculate();
save_local('menu_open', false);
}
});
$( window ).resize(function() {
mediaQuerry();
});
mediaQuerry();
//FANCY BOX
$(".linker").fancybox({margin: 20, padding: 5});
$("a.media").fancybox({margin: 20, padding: 0, helpers : {
title: {
type: 'outside'
}
}});
//FANCY BOX
$(".fancy-images").fancybox({margin: 20, padding: 5});
$(".fancy-media").fancybox({margin: 20, padding: 0, type: 'iframe', iframe: {preload: false}});
$(".fancy-print").fancybox({width:150, height: 150, margin: 20, padding: 0, type: 'iframe', iframe: {preload: false}});
$('.inview').bind('inview', function (event, visible) {
var type = $(this).data('type');
var tt = $(this).data('display');
if (visible == true) {
if(tt == 0){
}else{
if(type == 'products'){
start_products();
}
if(type == 'normal' || type == 'fotos' || type == 'menings' || type =='social'){
var link = $(this).data('link'), targ = $(this).data('target');
load_content(link, targ, type);
}
//console.log(type);
$(this).data('display', 0);
}
} else {
// element has gone out of viewport
}
});
}
function save_local(type, str){
if (typeof(Storage) !== "undefined") {
// Code for localStorage/sessionStorage.
sessionStorage[type] = str;
return true;
} else {
// Sorry! No Web Storage support..
return false;
}
}
function get_local(type){
if (typeof(Storage) !== "undefined") {
// Code for localStorage/sessionStorage.
if (sessionStorage[type] === 'true') {
return true;
}else{
return false;
}
} else {
// Sorry! No Web Storage support..
return false;
}
}
function load_content_ads(){
if($('#post_content').html()){
var str = $('#post_content');
var str1 = str.html().split('
');
var height = str.height();
str.empty();
}else{
var str="";
var str1 = [];
var height = 0;
}
var gallery = $('#gallery').length;
var go = false, go2 = false,go1 = false; var has_id = 0; var keygo = false, keygo2 = false,keygo1 = false; var has_key_id = 0; var fail = false; var $stop = true; console.log("height: "+height); console.log("Advert Count: "+adverts.length); console.log("Category: "+category);
console.log(keywords); console.log("Gallery length "+gallery); var keywordsA = keywords;
//MATCH KEYWORD
for( var xx = 0, len = adverts.length; xx < len; xx++ ) {
if(adverts[xx].keywords != null){
var keyA = adverts[xx].keywords.split(",");
for( var kk = 0, lenA = keyA.length; kk < lenA; kk++ ){
//console.log('key test: '+keyA[kk]);
//if( keywordsA.indexOf(keyA[kk]) != -1) {
if ($.inArray(keyA[kk], keywordsA) != -1) {
result = adverts[xx];
has_key_id = xx;
keygo = true;
console.log('yes Keyword match: id: '+result.id+" "+keyA[kk]);
}else{
keygo1 = true;
//console.log('NO keyword match');
}
}
}
}
//MATCH CATEGORY
for( var xxx = 0, len = adverts.length; xxx < len; xxx++ ) {
if( adverts[xxx].category === category ) {
result = adverts[xxx];
has_id = xxx;
go = true;
console.log('yes category match: id: '+result.id+" "+result.category);
}else{
go1 = true;
//console.log('NO category match');
}
}
for (var i=0;i
"+str1[i] + "
"); h_top = $('#para_'+i).position().top;
//NO CAT AND KEYWORD MATCH if(has_id == 0 && has_key_id == 0){
//NO MATCH if((h_top > 500 || gallery == 0) && go2 === true){ var result = adverts[0]; str.append(result.body.replace("