$(document).ready(function(){ move(); $('.Module_4 h1').addClass("changeable ftitle normal") function showfact(oldindex) { var index = parseInt(Math.random() * $('.vf .listRow:not(.listRowAdd)').length); while(index == oldindex) { index = parseInt(Math.random() * $('.vf .listRow:not(.listRowAdd)').length); } $('.activeRow').removeClass('activeRow .footerfact').fadeOut(1000,function(){ $('.vf .listRow:not(.listRowAdd):eq('+index+')').addClass('activeRow').fadeIn(1000).css('display','block'); $('.activeRow div').css('display','block'); setTimeout(function(){showfact(index)},7000); }); } var num = $('.vf .listRow:not(.listRowAdd)').length; if (num>0) { $('.vf .listRow:not(.listRowAdd)').hide(); var index = parseInt(Math.random() * num); $('.vf .listRow:not(.listRowAdd):eq('+index+') ').addClass('activeRow').fadeIn(1000).css('display','block'); $('.activeRow div').css('display','block'); setTimeout(function(){showfact(index)},7000); } var bwidth = ($(document).width()-1300)/2; if(bwidth<0) { $('.colorblock2').css('width','0px'); } else { $('.colorblock2').css('width',bwidth+1 +'px'); } var minh = $(window).height()-$('.hcon').height()-$('.ucon').height()-$('.vf').height()-20; $('.ccon').css('min-height',minh+'px'); $(window).bind("resize", resizeWindow); function resizeWindow( e ) { var bwidth = ($(document).width()-1300)/2; if(bwidth<0) { $('.colorblock2').css('width','0px'); } else { $('.colorblock2').css('width',bwidth+1+'px'); } var minh = $(window).height()-$('.hcon').height()-$('.ucon').height()-$('.vf').height()-20; $('.ccon').css('min-height',minh+'px'); } $('li.menu_909 span a').html(''); $('
  • |
  • ').insertAfter('.menuModule_1849 li'); $('.seperator:last').remove(); addclasses(); $('.menuModule_1849 li') var size = readCookie("size"); if(size == null) { setFont(2); setImg(2); } else { if(size == 2) { setFont(2); } if(size == 3) { setFont(3); } if(size == 1) { setFont(1); } } $('.articleListLink').html('back'); $('.articleListLink').addClass('rmore'); if($('.articleNavPrev').html() != ' ') { $('.articleNavPrev').html('Previous'); $('.articleNavPrev').addClass('rmore'); } if($('.articleNavNext').html() != ' ') { $('.articleNavNext').html('Next'); $('.articleNavNext').addClass('rmore'); } $('#s1').click(function() { setFont(1); } ); $('#s2').click(function() { setFont(2); } ); $('#s3').click(function() { setFont(3); } ); /*$('.articleHeader').click(function(){ window.location = '/My_Word'; }); */ $('bullet').insertBefore('.articlePreviewFooterDatePosted'); $('.articlePreviewMore').find('span').html("read more"); $('.articleModule_1846 .article .articleMeta').each(function(index) { $(this).append(""); }); $("#file_1856").hover(function(){$("#dropdown").slideDown(250);}); $("#dropdown").hover(function(){$("#file_1856").css('color','#c64a4a');}); $("#file_1856").mouseleave(function(){setTimeout("fout()",300)}); $("#dropdown").mouseleave(function(){setTimeout("fout()",300)}); $('.content .footerfact').each(function(){ var content = '-' + $(this).html(); $(this).html(content); }); /* ---------------------- Add boxes beside categories for news modules --------------------- */ $(".articleModule .articleHeading ul li").each(function() { $(this).prepend(""); }); }); function trail(number) { if(number[number.length-1]>3) { return "th"; } else if((number>9)&&(number<14)) { return "th"; } else { var answer; switch(number[number.length-1]) { case 1: answer="st"; break; case2: answer="nd"; break; case3: answer="rd"; break; } return answer; } } function move() { $('.articlePreviewFooter').each(function(){ var datetime = $(this).find('span').html(); var con = datetime.split(" "); var num = con[2].substring(0,con.length-2); var fdigit = num[num.length-1]; var nstring = "Published on " +con[1] +" " + num +trail(num)+ ", " + con[3]; $(this).find('span').html(nstring); $(this).insertAfter($(this).parent().find('h3')); }); } function fout() { if(!$("#file_1856").is(":hover")&&!$("#dropdown").is(":hover")) { $("#dropdown").slideUp(250); $("#file_1856").css('color','#733c3c'); } } function setFont(fsize) { $('.changeable').removeClass("smalltext").removeClass("mediumtext").removeClass("largetext"); switch(fsize) { case 1: $('.changeable').addClass("smalltext"); document.cookie="size=1" + ";path=/"; $('.footer').css('padding-bottom','17px'); break; case 2: $('.changeable').addClass("mediumtext"); document.cookie="size=2" + ";path=/"; $('.footer').css('padding-bottom','10px'); break; case 3: $('.changeable').addClass("largetext"); document.cookie="size=3"+ ";path=/"; $('.footer').css('padding-bottom','2px'); break; } setImg(fsize); } function addclasses() { $('.rmore').addClass('changeable small'); $('.Text').addClass('changeable normal'); $('.articlePreviewFooterDatePosted').addClass('changeable small'); $('.articlePreviewPreview').addClass('changeable normal'); $('.articlePreviewMore').addClass('changeable small'); $('.articleHeader').addClass('changeable normal'); $('.ftitle').addClass('changeable normal'); $('.fintro').addClass('changeable normal'); } function setImg(isize) { switch(isize) { case 1: //$('.articleThumbImage img').css('min-height','109px'); $('.articleThumbImage img').css('width','148px'); $('.articlePreview').css('height','auto'); break; case 2: //$('.articleThumbImage img').css('min-height','117px'); $('.articleThumbImage img').css('width','155px'); $('.articlePreview').css('height','auto'); break; case 3: //$('.articleThumbImage img').css('min-height','149px'); $('.articleThumbImage img').css('width','203px'); $('.articlePreview').css('height','auto'); break; } }