$().ready(function() {
  var curr_articleID = false;
  $('#modalDIV').jqm({ajax: 'modal_email_article.html', trigger: 'a.modal_link', modal: 'true' });
   
  $("a.link_topic").click(function () {    
	linkID = this.getAttribute('id');
	linkID = linkID.substring(linkID.length,linkID.length-1)
	if ($("#article_"+linkID).hasClass("article_on")){
		$("#article_"+linkID).removeClass("article_on");
		$("#article_"+linkID).addClass("article");
		$("img#bullet_"+linkID).attr({ src: "img/exp_topic_arrow_off.png"});

	}else{
		$("#article_"+linkID).removeClass("article");
		$("#article_"+linkID).addClass("article_on");
		$("#bullet_"+linkID).attr({ src: "img/exp_topic_arrow_on.png"});
	}
	return false;
	
 });
  
  $("a.btn_expand").click(function (e) {

	  $("div[@id^='article_']").removeClass("article");
	  $("div[@id^='article']").addClass("article_on");
	  $("img[@id^='bullet_']").attr({ src: "img/exp_topic_arrow_on.png"});
	  
      
	  
	  e.preventDefault();
      return false;
    });


});

	/*
if (typeof window.charter == 'undefined') {

// define namespaces
var charter = window.charter || {}; // rent global namespace
charter.modal
charter.toggleArticle
/*
charter.modal = {
  showModal:function(element) {
    var linkurl = element.getAttribute('href');
    if (linkurl) {
      
    }
  }
}:

charter.toggleArticle = {
	
};

*/