/**
* Configure Universal Feed javascript controller for this site's html
*
* These properties, except for filenames, integers, classnames, etc., are
* all jQuery expressions
*
* @todo comment_form_done_match, stf_form_done_match
*/


var uf = {
    //default system: 0/all, 1/news, 2/q&a, 3/journal
    default_system: 0,

    //links for changing system; they must have hrefs with 'uf_system_id=[id]'
    //system_links: 'div.systems a.system',
    system_links: 'center div.site div.content div.tabs a.tab_item',

    ajax_loading_html: "Loading...",
    //paginator page select input (if it exists)
    paginate_select: 'div.pagination form select',
    //paginator previous and next links
    paginate_prev_next: 'a#previous_btn, a#next_btn',

    //list view item container - will be made clickable
    //elements must have attribute id="uf_list_[item id]"
    //list_item: 'center div.site div.content div.uf_content div.uf_list_view div.uf_list_item_outer div.uf_list_item',
    list_item: 'div.uf_list_item',
	//css class to add to list item that matches current detail item
    list_item_selected_class: 'selected',

    detail_page: 'detail.php',

    list_view: '_ufeed_list.php',
    detail_view: '_ufeed_detail.php',
    //list_view_area: 'div.uf_list_container',
	//list_view_area: 'div.uf_list_view',
    list_view_area: 'div.ufeed_content_wrapper',
	detail_view_area: 'div.uf_detail_view',

    //the link to the comment form; must have href containing "uf_item_id=[id]"
    //comment_form_link: 'div.links table tr td a.comment',
	comment_form_link: 'div.interactive a.comment',
    comment_form_area: '#add_comment_form',

    //<form> element in comment form view must have an action attribute that
    // contains "uf_item_id=[uf item id]
    comment_form_view: '_comment_form.php',

    //comment elements
    // must have id="comment_[id]"
    comment: 'div.comment_item',

    //Max # of comments to show initially ("show all" link is added when needed)
    comment_show_max: 10,

    //comment moderation container elements
    // must have classname "user_[user id]"
    // should have css "display: none" by default
    // they will be revealed according to user's permissions
    comment_moderation_areas: 'div.comment_user_info div.moderation span#moderation_links',

    //comment remove link
    comment_remove: 'a.remove',
    //comment_remove: 'a.remove',
    //Expression leading to the comment element from the remove link
    //comment_remove_to_comment: '../..',
    comment_remove_to_comment: '../../../../../../../..',

    //comment edit link
    comment_edit: 'a.edit',
    //comment_edit: 'div.comment_user_info div.moderation span#moderation_links a.edit',
    //XPath (jQuery) expression that will lead to the comment element from
    // the edit link
    comment_edit_to_comment: '../../../../div:last',
    //comment_edit_to_comment: '../../../../[@class="comment_form_wrapper"]',
    //the link to the "Send To A Friend" form; must have href containing "uf_item_id=[id]"
    stf_form_link: 'div.interactive a.send',

    stf_form_area: 'div#stf_form',
    stf_form_view: '_ufeed_stf_form.php'
};

document.write('<script type="text/javascript" src="/www2/lib/controllers/js/ufeed.js"></script>');