function Scholarship(){}(function(A){A("body").ready(function(){A.history.init(Scholarship.pageload);A("#tabProviderAbout").click(function(){var B=this.href;B=B.replace(/^.*#/,"");A.history.load(B);return false;});A("#tabProviderInfo").click(function(){var B=this.href;B=B.replace(/^.*#/,"");A.history.load(B);
return false;});});Scholarship.pageload=function(B){if(B){if(B=="wall"){Scholarship.loadScholarshipTabAbout(A("#_provider_id").val());}else{if(B=="info"){Scholarship.loadScholarshipTabInfo(A("#_provider_id").val());}}}else{if(A("#box_container_OVERVIEW")!=null&&A("#box_container_OVERVIEW").is("*")){Scholarship.enableScholarshipTabInfo(A("#_provider_id").val());
}else{Scholarship.loadScholarshipTabInfo(A("#_provider_id").val());}}};Scholarship.loadScholarshipAddArticle=function(B){forward.getWidget("article/add?id="+B,function(C){A("#article_add_container").html(C);A("#article_close_link").click(function(){Scholarship.loadScholarshipTabAbout(B);});A("#article_content").htmlarea({css:"http://www.globalcampus.com/static/61/css/jhtmlarea/jHtmlArea.Editor.css",toolbar:["p","h2","h3","|","bold","italic","underline","|","orderedList","unorderedList","|","link","unlink","|","image","|","html"]});
A("#article_add_form").validate({rules:{article_title:{required:true,minlength:3,maxlength:100},article_content:{required:true,minlength:3,maxlength:3000}},errorLabelContainer:"#article_add_error",submitHandler:function(D){article.addProviderArticle(A("#_provider_id").val(),A("#_entity_type").val(),A("#article_title").val(),A("#article_content").val(),function(E){Scholarship.loadScholarshipTabAbout(A("#_provider_id").val());
});return false;}});});};Scholarship.enableScholarshipTabAbout=function(B){ProviderHelper.enableSuperUserManagement(B);ProviderHelper.enableShareLinks();ReviewHelper.enableSingleReview(B,"#review_container");A(".action_container").show();Scholarship.enableCampusTalk(B);A("#help_article_link").click(function(){A("#help_article_container").slideToggle("slow");
});A("#add_article_header_link").click(function(){Scholarship.loadScholarshipAddArticle(B);});A("#add_article_link").click(function(){Scholarship.loadScholarshipAddArticle(B);});A("#add_content_link").click(function(){forward.getWidget("content/add?id="+B,function(C){A("#content_add_container").html(C);
A("#content_close_link").click(function(){Scholarship.loadScholarshipTabAbout(B);});A("#content_add_form").validate({rules:{content_title:{required:true,minlength:3,maxlength:100},content_url:{required:true,minlength:10,maxlength:100}},errorLabelContainer:"#content_add_error",submitHandler:function(D){content.addProviderVideo(A("#_provider_id").val(),A("#_entity_type").val(),A("#content_title").val(),A("#content_url").val(),function(E){Scholarship.loadScholarshipTabAbout(A("#_provider_id").val());
});return false;}});});});};Scholarship.loadScholarshipTabAbout=function(B){A(".tabProviderAboutItem").attr("id","navOn");A(".tabProviderInfoItem").removeAttr("id");A("#tab_container").html(A("#waiting_message").clone().html());forward.getWidget(A("#_url_prefix").val()+"/about?id="+B,function(C){A("#tab_container").html("");
A("#tab_container").append(C);Scholarship.enableScholarshipTabAbout(B);});};Scholarship.loadScholarshipTabInfo=function(B){A(".tabProviderInfoItem").attr("id","navOn");A(".tabProviderAboutItem").removeAttr("id");A("#tab_container").html(A("#waiting_message").clone().html());forward.getWidget(A("#_url_prefix").val()+"/info?id="+B,function(C){A("#tab_container").html("");
A("#tab_container").append(C);Scholarship.enableScholarshipTabInfo(B);});};Scholarship.enableScholarshipTabInfo=function(B){ProviderHelper.enableSuperUserManagement(B);ProviderHelper.enableShareLinks();ProviderHelper.enableBox(A("#_provider_id").val(),"OVERVIEW");ProviderHelper.enableBox(A("#_provider_id").val(),"CONTACT");
ScholarshipHelper.enableScholarships(B);};Scholarship.enableCampusTalk=function(B){if(A("#start_conversation_form")!=null&&A("#start_conversation_form").is("*")){A("#start_conversation_link").click(function(){A("#start_conversation_container").show();A("#start_conversation_form").validate({rules:{text_input:{required:true,minlength:5,maxlength:1000}},errorLabelContainer:"#start_conversation_error",submitHandler:function(C){dialogAction.askSpecificQuestion("SCHOLARSHIP",A("#text_input").val(),B,"PROVIDER_SCHOLARSHIP",function(){Scholarship.loadCampusTalk(B);
});}});A("#text_input").rules("add",{minlength:2,maxlength:150});});A("#start_conversation_header_link").click(function(){A("#start_conversation_link_container").hide();A("#start_conversation_container").show();A("#start_conversation_form").validate({rules:{text_input:{required:true,minlength:5,maxlength:1000}},errorLabelContainer:"#start_conversation_error",submitHandler:function(C){dialogAction.askSpecificQuestion("SCHOLARSHIP",A("#text_input").val(),B,"PROVIDER_SCHOLARSHIP",function(){Scholarship.loadCampusTalk(B);
});}});});}};Scholarship.loadCampusTalk=function(B){forward.getWidget("campustalk/provider?id="+B+"&u="+A("#_url_prefix").val()+"&n="+A("#_provider_name").val()+"&t=PROVIDER_SCHOLARSHIP",function(C){A("#campustalk_container").html(C);Scholarship.enableCampusTalk(B);});};})(jQuery);