document.domain = 'cbc.ca';
$S = CBC.SETTINGS;

//page settings
$S.setVal("pluckEnabled",true);

//comments settings
$S.setVal("cmtSort","RecommendationsDescending");
$S.setVal("cmtPerPage",5);
$S.setVal("maxCmtLength",2500);
$S.setVal("cmtAbuseReportWrapperOffset",[150,210]);

//server url
$S.setVal("serverUrl","http://sitelife.cbc.ca/ver1.0/Direct/Process");

//modules
$S.setVal("p-article",{loader:{_src:'/includes/objects/pluck/js/article.js',_name:'Article',_class:'Article'}});
$S.setVal("p-lineup",{loader:{_src:'/includes/objects/pluck/js/lineup.js',_name:'Lineup',_class:'Lineup'}});
$S.setVal("p-comments",{loader:{_src:'/includes/objects/pluck/js/comments.js',_name:'Comments',_class:'Comments'}});
$S.setVal("p-discovery",{loader:{_src:'/includes/objects/pluck/js/discovery.js',_name:'Discovery',_class:'Discovery'}});

//post status box messages
$S.setVal("cmt-post-statusbox-posted","Thank you for submitting a comment. Please note that comments are pre-moderated and may not appear immediately.");
$S.setVal("cmt-post-statusbox-maxchars","You have exceeded the maximum number of characters. Please type in a comment that is less than "+$S.getVal("maxCmtLength")+" characters.");
$S.setVal("cmt-post-statusbox-notloggedin",'You must be logged in to leave a comment. <a href="/sso/SSOAuthenticationDomain.ashx?mode=Login&amp;redirecturl='+document.location.href+'#socialcomments-submit">Log in</a> | <a href="/membercentre/SignUp.aspx" target="_blank">Sign up</a>');

//article module templates
$S.setVal("tpl_socialhead",'<a href="#socialcomments">Comments<em class="cmt">#{NumberOfComments}</em></a>#[CurrentUserHasRecommended: {false:<a href="#" title="Recommend this #{ArticleType}" onclick="CBC.APP.PLUCK.Article.recommend(this,\'#{ArticleKey}\');return false;">Recommend<em class="rec">#{NumberOfRecommendations}</em></a>||true:Recommended<em class="rec">#{NumberOfRecommendations}</em>}]');
$S.setVal("tpl_socialtools",'<li class="l"><a href="#socialcomments-submit" onclick="CBC.APP.PLUCK.Comments.focusCommentForm();"><div class="cmt-h">Post a comment</div><div><em class="cmt">#{NumberOfComments}</em>Comments have been posted</div></a></li>#[CurrentUserHasRecommended: {false:<li class="r"><a onclick="CBC.APP.PLUCK.Article.recommend(this,\'#{ArticleKey}\');return false;" href="#"><div class="rec-h">Recommend this #{ArticleType}</div><div><em class="rec">#{NumberOfRecommendations}</em>People have recommended this #{ArticleType}</div></a></li>||true:<li class="full"><div class="rec-h full">Recommended</div><div class="rec-txt"><em class="rec">#{NumberOfRecommendations}</em>People have recommended this #{ArticleType}</div></li>}]');

//lineup module templates
$S.setVal("tpl_socialicons",'<a href="#{PageUrl}#socialcomments"><em>Comments</em><em class="cmt">#{NumberOfComments}</em></a>|<em>Recommend</em><em class="rec">#{NumberOfRecommendations}</em>');

//discovery module templates (must be defined before discoveryObjects)
$S.setVal("tpl_headline",'<dt class="headline"><a href="#{PageUrl}">#{PageTitle}</a> <span class="socialicons"><a href="#{PageUrl}#socialcomments"><em class="cmt">#{NumberOfComments}</em></a>|<em class="rec">#{NumberOfRecommendations}</em></span></dt>');
$S.setVal("tpl_headline_rec",'<dt class="headline"><a href="#{PageUrl}">#{PageTitle}</a> <span class="socialicons"><em class="rec">#{NumberOfRecommendations}</em></span></dt>');
$S.setVal("tpl_headline_cmt",'<dt class="headline"><a href="#{PageUrl}">#{PageTitle}</a> <span class="socialicons"><a href="#{PageUrl}#socialcomments"><em class="cmt">#{NumberOfComments}</em></a></span></dt>');
