// JavaScript Document



$(function() {


/* Re-position pageHeader logo */
$("#pageHeaderWrapper").prependTo("#sidebar1");


/* Load content on homepage 
$("<div id='HomepageActivities'></div>").insertAfter("#modulePage7794365 blockquote");
$("#HomepageActivities").load("/activities/ .list-journal-entry-wrapper", function(){ 
  //callback...
  $("#HomepageActivities .journal-entry-wrapper:gt(2)").css("display", "none");
});
$("<div id='HomepageActivitiesTitle'>Here are some activities to choose from:</div>").insertBefore("#HomepageActivities"); 
*/

/* set "view bioprimer" btn links */
$('.journal-read-more-tag').click(function () {      
   window.location = $(this).find('a').attr('href');  
});


/* Home Page Activities Load */
$("#ActivitiesLoad").load("/activities/ .list-journal-entry-wrapper", function(){ 
  //callback...
  $("#ActivitiesLoad .journal-entry-wrapper:gt(2)").css("display", "none");
  $('.journal-read-more-tag').click(function () {      
      window.location = $(this).find('a').attr('href');  
  });
}); 



/* Adjust top margin on single entry pages 
$(".single-journal-entry-wrapper").each(function(){
 $("#contentWrapper").css("margin-top", "-55px");
 $("#sidebar1Wrapper").css("margin-top", "65px");
});
*/



/* Adjust post/page titles in discussion forum */
$("#modulePage7835558 .document-title a").each(function(){
   $(".document-title").css("font-size", "18px");
   $(".document-title").css("margin-bottom", "0px");
});

$("#modulePage7835558 .document-title").each(function(){ 
    var str = $(this).html();
	$(this).html(str.replace('&gt;',' ')); 
});




/* Activities - categoryNav */
$(".journal-filter-header:contains(Category1)").each(function(){
    $(".categoryNav a:contains(Category1)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Category2)").each(function(){
    $(".categoryNav a:contains(Category2)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Category3)").each(function(){
    $(".categoryNav a:contains(Category3)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Category4)").each(function(){
    $(".categoryNav a:contains(Category4)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});




/* Animations - categoryNav */
$(".journal-filter-header:contains(Science)").each(function(){
    $(".categoryNav a:contains(Science)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Engineering)").each(function(){
    $(".categoryNav a:contains(Engineering)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Technology)").each(function(){
    $(".categoryNav a:contains(Technology)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});

$(".journal-filter-header:contains(Community)").each(function(){
    $(".categoryNav a:contains(Community)").each(function(){
        $(this).css("color", "#45710c");
        $(this).css("font-weight", "bold");
    });
});




});

