﻿function JobsListTemplate(result, language) {
    // This method loads the HTML template and prepares the container div to accept data.
    $('#JobsContainer').setTemplateURL('Templates/JobsListTemplate-' + language + '.htm');
    // This method applies the JSON array to the container's template and renders it.
    $('#JobsContainer').processTemplate(result);

//    $('.jobdetail').siblings().toggle();
//    $('.jobdetail').click(function() {
//        $(this).siblings().toggle();
//        //$(this).children('th').toggleClass("expand_group")
//        return false;
//    });
}

function MyAnnouncementsTemplate(result, language) {
    // This method loads the HTML template and prepares the container div to accept data.
    $('#JobsContainer').setTemplateURL('Templates/MyAnnouncementsTemplate-' + language + '.htm');
    // This method applies the JSON array to the container's template and renders it.
    $('#JobsContainer').processTemplate(result);
}

function MyOrdersTemplate(result, language) {
    // This method loads the HTML template and prepares the container div to accept data.
    $('#OrdersContainer').setTemplateURL('Templates/MyOrdersTemplate-' + language + '.htm');
    // This method applies the JSON array to the container's template and renders it.
    $('#OrdersContainer').processTemplate(result);
}

function InternshipsListTemplate(result, language) {
    $('#JobsContainer').setTemplateURL('Templates/InternshipsListTemplate-' + language + '.htm');
    $('#JobsContainer').processTemplate(result);
}

function CouponsListTemplate(result, language) {
    $('#CouponsContainer').setTemplateURL('Templates/CouponsListTemplate-' + language + '.htm');
    $('#CouponsContainer').processTemplate(result);
}

function CommunityCouponsListTemplate(result, language) {
    $('#CommunityCouponsContainer').setTemplateURL('Templates/CommunityCouponsListTemplate-' + language + '.htm');
    $('#CommunityCouponsContainer').processTemplate(result);
}

function EducationCentersListTemplate(result, language) {
    $('#EducationCentersContainer').setTemplateURL('Templates/EducationCentersListTemplate-' + language + '.htm');
    $('#EducationCentersContainer').processTemplate(result);
}

function NewsListTemplate(result, language) {
    $('#NewsContainer').setTemplateURL('Templates/NewsListTemplate-' + language + '.htm', null, { filter_data: false });
    $('#NewsContainer').processTemplate(result);
}

//$('meta[name=keywords]').attr('keywords', new_keywords);
//$('meta[name=description]').attr('description', new_description);
function fbs_click(url,content) {
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(url) + '&t=' + encodeURIComponent(content), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}
