$(function() {

   

    var blogContent = $(".blogFeed").html();
        $("#blogFeed").html(blogContent);
        
    $("#breadcrumb").each(function(){
        var charReplace = $(this).html();
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        $(this).html(charReplace);
    });
    
    
    $("textarea").attr("style","");
    
    $(".more_news_home .more_news_home_item:first").hide();
    
    
    $(".archived li:nth-child(1), .archive .desc li:nth-child(1)").attr("style","width: 36px;");
    $(".archived li:nth-child(2), .archive .desc li:nth-child(2)").attr("style","width: 72px");
    $(".archived li:nth-child(3), .archive .desc li:nth-child(3)").attr("style","width: 113px");
    $(".archived li:nth-child(4), .archive .desc li:nth-child(4)").attr("style","width: 113px");
    $(".archived li:nth-child(5), .archive .desc li:nth-child(5)").attr("style","width: 100px"); 
    
    
    if ($.browser.msie) { 
        $(".contact_right .MMDataCaptureForm_LabelTD span:last").attr("style","position: relative; top: -19px");  
    }
    
    $(".contact_right .MMDataCaptureForm_LabelTD span:last").parent().addClass("last_label");  
    
    $('#defaultCountdown').countdown({ 
    until: new Date(2010, 6 - 1, 11), timezone: +11});
  
    
     
    $('#removeCountdown').toggle(function() { 
            $(this).text('Re-attach'); 
            $('#defaultCountdown').countdown('destroy'); 
        }, 
        function() { 
            $(this).text('Remove'); 
            $('#defaultCountdown').countdown({until: newYear}); 
        } 
    );

    
    
    
    var pagingItems = Math.ceil(eval($(".more_news_item").length-6)/6);
    var countItems = 1;
    $(".paging").append("<strong>Page:</strong> ");
    while (countItems<=pagingItems+1) {
        $(".paging").append("<span id=\""+countItems+"\">"+countItems+"</span>");
        countItems++;
    }
    
    $(".paging span").click(function(){
        $(".paging span").removeClass("active");
        $(this).addClass("active");
        var pageNumber=$(this).attr("id")-1;
        $(".container .more_news_item").animate({"top":"-"+eval(pageNumber*192)+"px"});
    });  
    
    
});


