
jQuery.ajaxSetup({ type:"POST", dataType:'json' });

var heap = {
  SUCCESS: 1,
  FAILURE: 0
};

heap.form = {};
heap.submit = {};
heap.media = {};
heap.media.sizes = {};

heap.api = {};
heap.config = { language:'en' };
heap.labels = {};
heap.urlmap = {};


heap.config['deploymode'] = 'prod';
heap.config['heap_location'] = '/heap';
heap.config['http_root'] = 'http://www.chezcora.com';
heap.config['request_uri'] = '/cache/heap.en.js';
heap.config['script_url'] = '';
heap.config['upload_maxfiles'] = 50;
heap.config['upload_maxsize'] = '300MB';
heap.config['default_media_source'] = 'heap';
heap.config['default_media_store'] = 'LOCAL_DOCUMENTS';
heap.config['version'] = '1.5.44040';
heap.config['last_build'] = '2009-06-26';
heap.config['thread_max_depth'] = 3;
heap.config['atom_types'] = {'activite':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'},'date':{'type':'date','label':'Date'}}},'bloc':{'meta_fields':{'link_en':{'type':'text','label':'Lien EN'},'link_fr':{'type':'text','label':'Lien FR'},'position':{'type':'select','label':'Position','options':[{'label':'Horizontale','value':'horizontal'},{'label':'Verticale','value':'vertical'}]}}},'capsule':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'}}},'carrousel':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'},'link_en':{'type':'text','label':'Lien EN'},'link_fr':{'type':'text','label':'Lien FR'}}},'contenu':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'}}},'histoire':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'year':{'type':'text','label':'Année'}}},'nouvelle':{'url_scheme':{'en':'/news/%id%/%title|cleanSlug|strtolower%','fr':'/nouvelles/%id%/%title|cleanSlug|strtolower%'},'meta_fields':[]},'page':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'}}},'plat':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'},'pop_1_title_en':{'type':'text','label':'Pop 1 Titre EN'},'pop_1_title_fr':{'type':'text','label':'Pop 1 Titre FR'},'pop_1_text_en':{'type':'textarea','label':'Pop 1 EN','mce':'true'},'pop_1_text_fr':{'type':'textarea','label':'Pop 1 FR','mce':'true'},'pop_2_title_en':{'type':'text','label':'Pop 2 Titre EN'},'pop_2_title_fr':{'type':'text','label':'Pop 2 Titre FR'},'pop_2_text_en':{'type':'textarea','label':'Pop 2 EN','mce':'true'},'pop_2_text_fr':{'type':'textarea','label':'Pop 2 FR','mce':'true'},'pop_3_title_en':{'type':'text','label':'Pop 3 Titre EN'},'pop_3_title_fr':{'type':'text','label':'Pop 3 Titre FR'},'pop_3_text_en':{'type':'textarea','label':'Pop 3 EN','mce':'true'},'pop_3_text_fr':{'type':'textarea','label':'Pop 3 FR','mce':'true'}}},'restaurant':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'},'condition':{'type':'select','label':'Condition','options':[{'value':'','label':'--'},{'value':'upcoming','label':'À venir'},{'value':'new','label':'Nouveau'},{'value':'active','label':'Actif'}]},'date_condition':{'type':'date','label':'Date de la condition'},'address_en':{'type':'text','label':'Adresse EN'},'address_fr':{'type':'text','label':'Adresse FR'},'city_en':{'type':'text','label':'Ville EN'},'city_fr':{'type':'text','label':'Ville FR'},'province_en':{'type':'text','label':'Province EN'},'province_fr':{'type':'text','label':'Province FR'},'postal_code':{'type':'text','label':'Code postal'},'phone':{'type':'text','label':'Téléphone'},'number':{'type':'text','label':'Numéro'},'number_province':{'type':'text','label':'Numéro par province'},'hours_en':{'type':'textarea','label':"Heures d\'ouverture EN"},'hours_fr':{'type':'textarea','label':"Heures d\'ouverture FR"},'commodities_en':{'type':'textarea','label':'Commodités spéciales EN'},'commodities_fr':{'type':'textarea','label':'Commodités spéciales FR'},'message_en':{'type':'textarea','label':'Message spécial EN'},'message_fr':{'type':'textarea','label':'Message spécial FR'}}},'video':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'},'youtube_id_en':{'type':'text','label':'ID YouTube (EN)'},'youtube_id_fr':{'type':'text','label':'ID YouTube (FR)'},'seek_time_en':{'type':'text','label':'Temps de lecture (EN)'},'seek_time_fr':{'type':'text','label':'Temps de lecture (FR)'},'link_label_en':{'type':'text','label':'Texte lien (EN)'},'link_label_fr':{'type':'text','label':'Texte lien (FR)'},'link_url_en':{'type':'text','label':'URL lien (EN)'},'link_url_fr':{'type':'text','label':'URL lien (FR)'},'in_breakfast':{'type':'toggle','label':'Carrousel Déjeuner'}}}};
heap.config['channel_types'] = {'contenu':{'url_scheme':{'en':'/%meta.url_token_en%','fr':'/%meta.url_token_fr%'},'meta_fields':{'url_token_en':{'type':'text','label':'URL Token EN'},'url_token_fr':{'type':'text','label':'URL Token FR'}}},'normal':[]};
heap.config['reaction_types'] = ['comment','vote','answer_image','answer_text','answer_video'];
heap.config['user_meta'] = [];
heap.config['reaction_meta'] = {'information':{'type':'textarea','display':'1','label':'Informations'}};
heap.config['media_meta'] = [];
heap.config['static_tag_prefixes'] = ['category','langue','news','region','tag','urlmap'];
heap.config['heap_logo'] = '/heap/static/heap/images/heap.png';
heap.config['heap_logo_mini'] = '/heap/static/heap/images/heap-mini.png';
heap.config['heap_module_location'] = '';
heap.config['current_language'] = 'en';
heap.config['plugins_location'] = '/heap_plugins';
heap.config['languages'] = ['en','fr'];
heap.config['now_datetime'] = '2011-12-20 14:29:41';
heap.config['now_timestamp'] = 1324409381;
heap.config['now_date'] = '2011-12-20';
heap.config['now_time'] = '14:29:41';
heap.config['mce'] = {'editor_styles':[{'title':'Titre H2','cls':'expand_content','cmd':'FormatBlock','val':'h2'},{'title':'Titre H3','cls':'expand_content','cmd':'FormatBlock','val':'h3'},{'title':'Titre H4 ','cls':'expand_content','cmd':'FormatBlock','val':'h4'},{'title':'Titre H5 ','cls':'expand_content','cmd':'FormatBlock','val':'h5'},{'title':'Titre H6 ','cls':'expand_content','cmd':'FormatBlock','val':'h6'}],'plugins':'Link,Medias,EditSource,ForceBlocks'};
heap.config['panels_visibility'] = {'HEAPM_Atom':{'edit':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'},'add':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'}},'HEAPM_Channel':{'edit':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'},'add':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'}},'HEAPM_Reaction':{'edit':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'},'add':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'}},'HEAPM_Media':{'edit':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'},'add':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'}},'HEAPM_User':{'edit':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'},'add':{'basics':'1','custom':'1','meta':'1','text':'1','tags':'1','others':'1','seo':'','documents':'1'}}};
heap.config['slug_selector_classes'] = {'HEAPM_Atom':{'api_class':'atoms','token':'atom'},'HEAPM_Channel':{'api_class':'channels','token':'channel'},'HEAPM_Reaction':{'api_class':'reactions','token':'reaction'},'HEAPM_User':{'api_class':'users','token':'user','show_field':'username'}};
heap.config['js_libs'] = [];
heap.config['cookie_domain'] = '';
heap.config['google_map_api_key'] = 'ABQIAAAAkU6kzGhuTRH1xZ98q5zuTxSYVDAUrOAK6_FNoawAHdBYdofaIxRAc0rHhqAiM-xLIpxHOVgceLtagw';
heap.config['heap_title'] = 'CORA';

heap.urlmap['root'] = "";
heap.urlmap['app_admin'] = "/heap";
heap.urlmap['app_docs'] = "/docs";
heap.urlmap['app_reactions'] = "/reactions";
heap.urlmap['tools_jsconfig'] = "/tools/jslib.js";
heap.urlmap['api_amf'] = "/heap/amf";
heap.urlmap['api_json'] = "/heap/json";
heap.urlmap['app_admin_static'] = "/heap/static/heap";
heap.urlmap['app_lang'] = "/heap/language";
heap.urlmap['app_lang_fr'] = "/heap/language/fr";
heap.urlmap['app_lang_en'] = "/heap/language/en";
heap.urlmap['app_doc_api'] = "/heap/apidoc";
heap.urlmap['app_doc_env'] = "/heap/environment";
heap.urlmap['app_admin_tagger'] = "/heap/batchTagger";
heap.urlmap['app_admin_login'] = "/heap/login";
heap.urlmap['app_admin_logout'] = "/heap/logout";
heap.urlmap['app_admin_atoms'] = "/heap/atoms";
heap.urlmap['app_admin_channels'] = "/heap/channels";
heap.urlmap['app_admin_reactions'] = "/heap/reactions";
heap.urlmap['app_admin_docs'] = "/heap/docs";
heap.urlmap['app_admin_users'] = "/heap/users";
heap.urlmap['app_admin_redirects'] = "/heap/redirects";
heap.urlmap['app_admin_tags'] = "/heap/tags";
heap.urlmap['app_admin_queue'] = "/heap/queue";
heap.urlmap['app_admin_atoms_drafts'] = "/heap/atoms/drafts";
heap.urlmap['app_admin_atoms_edit'] = "/heap/atoms/edit";
heap.urlmap['app_admin_channels_assign'] = "/heap/channels/assign";
heap.urlmap['app_admin_channels_edit'] = "/heap/channels/edit";
heap.urlmap['app_admin_docs_edit'] = "/heap/docs/edit";
heap.urlmap['app_admin_docs_list'] = "/heap/docs";
heap.urlmap['app_admin_docs_sizes'] = "/heap/docs/sizes";
heap.urlmap['app_admin_docs_modify'] = "/heap/docs/modify";
heap.urlmap['app_admin_docs_subtitles'] = "/heap/docs/subtitles";
heap.urlmap['app_admin_docs_upload'] = "/heap/docs/upload";
heap.urlmap['app_admin_docs_upload_meta'] = "/heap/docs/uploadMeta";
heap.urlmap['app_admin_docs_upload_tags'] = "/heap/docs/uploadTags";
heap.urlmap['app_admin_redirects_edit'] = "/heap/redirects/edit";
heap.urlmap['app_admin_reactions_edit'] = "/heap/reactions/edit";
heap.urlmap['app_admin_users_edit'] = "/heap/users/edit";
heap.urlmap['app_admin_queue_activejobs'] = "/heap/queue/active_jobs";
heap.urlmap['app_admin_tags_list'] = "/heap/tags/list_all";
heap.urlmap['app_admin_lm'] = "/heap/layoutmanager";
heap.urlmap['app_admin_lm_layouts'] = "/heap/layoutmanager/layouts";
heap.urlmap['app_admin_lm_layouts_edit'] = "/heap/layoutmanager/layouts/edit";
heap.urlmap['app_admin_lm_blocks'] = "/heap/layoutmanager/blocks";
heap.urlmap['app_admin_lm_blocks_edit'] = "/heap/layoutmanager/blocks/edit";
heap.urlmap['app_admin_menus'] = "/heap/menus";
heap.urlmap['app_admin_menus_edit'] = "/heap/menus/edit";
heap.urlmap['static'] = "/cora/static";
heap.urlmap['heap_static'] = "/heap/static";
heap.urlmap['en'] = "";
heap.urlmap['fr'] = "";
heap.urlmap['cora_api_json'] = "/api/";
heap.urlmap['infolettre'] = "http://www.chezcora.com/i-do-breakfast/newsletter";
heap.urlmap['menu'] = "http://www.chezcora.com/our-menu";
heap.urlmap['restaurants'] = "http://www.chezcora.com/where-to-find-us";
heap.urlmap['histoire'] = "http://www.chezcora.com/our-company/history";
heap.urlmap['recettes'] = "http://www.chezcora.com/i-do-breakfast/recipes";
heap.urlmap['dejeuner'] = "http://www.chezcora.com/i-do-breakfast";
heap.urlmap['js_heap'] = "/cache/heap.en.js";
heap.urlmap['accueil'] = "/home";
heap.urlmap['nouvelles'] = "/news";
heap.urlmap['dejeuner_videos'] = "/i-do-breakfast/video";

heap.labels['default'] = [];
heap.labels['default']['cora_menu_news'] = "News";
heap.labels['default']['cora_recherche'] = "Search";
heap.labels['default']['cora_news'] = "News";
heap.labels['default']['cora_search'] = "Search";
heap.labels['default']['cora_select_news'] = "Select a news";
heap.labels['default']['cora_submit'] = "Submit";
heap.labels['default']['cora_load'] = "Reset";
heap.labels['default']['cora_check_all'] = "Check all";
heap.labels['default']['cora_check_none'] = "Check none";
heap.labels['default']['cora_save'] = "Save";
heap.labels['default']['cora_clear'] = "Clear";
heap.labels['default']['menus_menu'] = "Navigation";
heap.labels['default']['manage_menus'] = "Manage navigation";
heap.labels['default']['m_structure'] = "Structure";
heap.labels['default']['add_menu'] = "Add navigation";
heap.labels['default']['edit_menu'] = "Edit navigation";
heap.labels['default']['layoutmanager'] = "Grid";
heap.labels['default']['menu_lm'] = "Grid";
heap.labels['default']['menu_lm_layouts'] = "Grids";
heap.labels['default']['menu_lm_blocks'] = "Blocks";
heap.labels['default']['html_body'] = "HTML Body";
heap.labels['default']['html_body_file'] = "HTML File";
heap.labels['default']['layout'] = "grid";
heap.labels['default']['manage_layouts'] = "Manage grids";
heap.labels['default']['add_layout'] = "Add grid";
heap.labels['default']['edit_layout'] = "Edit grid";
heap.labels['default']['block'] = "block";
heap.labels['default']['manage_blocks'] = "Manage blocks";
heap.labels['default']['add_block'] = "Add block";
heap.labels['default']['edit_block'] = "Edit block";
heap.labels['default']['date_F01'] = "January";
heap.labels['default']['date_F02'] = "February";
heap.labels['default']['date_F03'] = "March";
heap.labels['default']['date_F04'] = "April";
heap.labels['default']['date_F05'] = "May";
heap.labels['default']['date_F06'] = "June";
heap.labels['default']['date_F07'] = "July";
heap.labels['default']['date_F08'] = "August";
heap.labels['default']['date_F09'] = "September";
heap.labels['default']['date_F10'] = "October";
heap.labels['default']['date_F11'] = "November";
heap.labels['default']['date_F12'] = "December";
heap.labels['default']['date_M01'] = "Jan";
heap.labels['default']['date_M02'] = "Feb";
heap.labels['default']['date_M03'] = "Mar";
heap.labels['default']['date_M04'] = "Apr";
heap.labels['default']['date_M05'] = "May";
heap.labels['default']['date_M06'] = "Jun";
heap.labels['default']['date_M07'] = "Jul";
heap.labels['default']['date_M08'] = "Aug";
heap.labels['default']['date_M09'] = "Sep";
heap.labels['default']['date_M10'] = "Oct";
heap.labels['default']['date_M11'] = "Nov";
heap.labels['default']['date_M12'] = "Dec";
heap.labels['default']['date_l0'] = "Sunday";
heap.labels['default']['date_l1'] = "Monday";
heap.labels['default']['date_l2'] = "Tuesday";
heap.labels['default']['date_l3'] = "Wednesday";
heap.labels['default']['date_l4'] = "Thursday";
heap.labels['default']['date_l5'] = "Friday";
heap.labels['default']['date_l6'] = "Saturday";
heap.labels['default']['date_S01'] = "st";
heap.labels['default']['date_S02'] = "nd";
heap.labels['default']['date_S03'] = "rd";
heap.labels['default']['date_S04'] = "th";
heap.labels['default']['date_S05'] = "th";
heap.labels['default']['date_S06'] = "th";
heap.labels['default']['date_S07'] = "th";
heap.labels['default']['date_S08'] = "th";
heap.labels['default']['date_S09'] = "th";
heap.labels['default']['date_S10'] = "th";
heap.labels['default']['date_S11'] = "th";
heap.labels['default']['date_S12'] = "th";
heap.labels['default']['date_S13'] = "th";
heap.labels['default']['date_S14'] = "th";
heap.labels['default']['date_S15'] = "th";
heap.labels['default']['date_S16'] = "th";
heap.labels['default']['date_S17'] = "th";
heap.labels['default']['date_S18'] = "th";
heap.labels['default']['date_S19'] = "th";
heap.labels['default']['date_S20'] = "th";
heap.labels['default']['date_S21'] = "st";
heap.labels['default']['date_S22'] = "nd";
heap.labels['default']['date_S23'] = "rd";
heap.labels['default']['date_S24'] = "th";
heap.labels['default']['date_S25'] = "th";
heap.labels['default']['date_S26'] = "th";
heap.labels['default']['date_S27'] = "th";
heap.labels['default']['date_S28'] = "th";
heap.labels['default']['date_S29'] = "th";
heap.labels['default']['date_S30'] = "th";
heap.labels['default']['date_S31'] = "st";
heap.labels['default']['modifier'] = "Edit";
heap.labels['default']['telecharger_ce_jeu'] = "Print game";
heap.labels['default']['consulter'] = "More";
heap.labels['default']['previous'] = "Previous";
heap.labels['default']['next'] = "Next";
heap.labels['default']['restaurants_trouves_plural'] = "Cora restaurants found";
heap.labels['default']['restaurants_trouves_singular'] = "Cora restaurant found";
heap.labels['default']['nouveau'] = "New!";
heap.labels['default']['directions'] = "Directions";
heap.labels['default']['canada'] = "Canada";
heap.labels['default']['more_information'] = "More information";
heap.labels['default']['retour_liste'] = "Return to list";
heap.labels['default']['opening_hours'] = "Opening hours";
heap.labels['default']['special_commodities'] = "Special commodities";
heap.labels['default']['404_title'] = "Error 404";
heap.labels['default']['404_subtitle'] = "Page not found";
heap.labels['default']['404_body'] = "The requested page could not be displayed.";
heap.labels['default']['copyright'] = "&reg; Trademark of Coramark Inc. Copyright 2011, Coramark Inc. All rights reserved.";
heap.labels['default']['lang_switch'] = "Français";
heap.labels['default']['fermer'] = "Close";
heap.labels['default']['en_savoir_plus'] = "Details";
heap.labels['default']['print'] = "Print";
heap.labels['default']['partager'] = "Share";
heap.labels['default']['field_required'] = "This field is required";
heap.labels['default']['email_invalid'] = "Email format invalid";
heap.labels['default']['newsletter_required'] = "To participate, you have to subscribe to the newsletter";
heap.labels['default']['search_label'] = "Postal code / City";
heap.labels['default']['search_submit'] = "Search";
heap.labels['default']['search_province'] = "Or choose a province";
heap.labels['default']['province'] = "Province";
heap.labels['default']['ontario'] = "Ontario";
heap.labels['default']['quebec'] = "Quebec";
heap.labels['default']['nova_scotia'] = "Nova Scotia";
heap.labels['default']['new_brunswick'] = "New Brunswick";
heap.labels['default']['manitoba'] = "Manitoba";
heap.labels['default']['british_columbia'] = "British Columbia";
heap.labels['default']['prince_edward_island'] = "Prince Edward Island";
heap.labels['default']['saskatchewan'] = "Saskatchewan";
heap.labels['default']['alberta'] = "Alberta";
heap.labels['default']['newfoundland_labrador'] = "Newfoundland";
heap.labels['default']['search_label_result'] = "Search:";
heap.labels['default']['search_radius'] = "within a 100 km radius";
heap.labels['default']['province_all'] = "All provinces";
heap.labels['default']['locate_on_map'] = "Locate on the map";
heap.labels['default']['aucun_resultat'] = "No result to display.";
heap.labels['default']['recaptcha_error'] = "The code was not entered properly.<br />Please write both words in the field below, including the space and punctuation marks.";
heap.labels['default']['block_1_title'] = "Our menu";
heap.labels['default']['block_1_link'] = "View";
heap.labels['default']['block_2_title'] = "Our history";
heap.labels['default']['block_2_link'] = "Discover";
heap.labels['default']['block_3_title'] = "I do breakfast contest";
heap.labels['default']['block_3_link'] = "Enter to win";
heap.labels['default']['block_3_new_title'] = "Gift card";
heap.labels['default']['block_3_new_link'] = "Details";
heap.labels['default']['block_4_title'] = "Where to find us?";
heap.labels['default']['block_4_link'] = "Find a Cora restaurant";
heap.labels['default']['merci_uri'] = "thankyou";
heap.labels['default']['titre'] = "Title:";
heap.labels['default']['prenom'] = "First name:";
heap.labels['default']['nom'] = "Last name:";
heap.labels['default']['courriel'] = "Email:";
heap.labels['default']['age'] = "Age:";
heap.labels['default']['naissance'] = "Birthday:";
heap.labels['default']['jour'] = "Day";
heap.labels['default']['mois'] = "Month";
heap.labels['default']['cora_vous_invite'] = "On your birthday, Cora invites you!";
heap.labels['default']['code_postal'] = "Postal code:";
heap.labels['default']['ville'] = "City:";
heap.labels['default']['telephone'] = "Phone (facultative):";
heap.labels['default']['province_territoire'] = "Province/Territory:";
heap.labels['default']['restaurant_premier'] = "My Cora restaurant (first choice):";
heap.labels['default']['restaurant_second'] = "My Cora restaurant (second choice):";
heap.labels['default']['restaurant_troisieme'] = "My Cora restaurant (third choice):";
heap.labels['default']['dejeuner_favori'] = "My favorite breakfast:";
heap.labels['default']['derniere_visite'] = "When was your last visit to a Cora restaurant?";
heap.labels['default']['frequence'] = "Generally, when do you visit a Cora restaurant?";
heap.labels['default']['accompagne'] = "Generally, who accompanies you during your visit?";
heap.labels['default']['recevoir_infolettre'] = "I want to subscribe and receive the free <strong>Cora’s Enthusiasts’</strong> newsletter.";
heap.labels['default']['code_promo'] = "Promotional code (if applicable)";
heap.labels['default']['soumettre'] = "Submit";
heap.labels['default']['merci'] = "Thank you!";
heap.labels['default']['merci_message'] = "You have successfully registered.";
heap.labels['default']['choisissez'] = "Choose";
heap.labels['default']['titre_mme'] = "Ms.";
heap.labels['default']['titre_mlle'] = "Miss";
heap.labels['default']['titre_mr'] = "Mr.";
heap.labels['default']['age_tranche_18'] = "18-";
heap.labels['default']['age_tranche_1924'] = "19-24";
heap.labels['default']['age_tranche_2534'] = "25-34";
heap.labels['default']['age_tranche_3549'] = "35-49";
heap.labels['default']['age_tranche_50'] = "50+";
heap.labels['default']['news_anni_title'] = "For your birthday,";
heap.labels['default']['news_anni_text'] = "Madame Cora would like to wish you happy birthday in her own special way.";
heap.labels['default']['derniere_semaine'] = "last week";
heap.labels['default']['dernier_mois'] = "last month";
heap.labels['default']['trois_derniers_mois'] = "in the last 3 months";
heap.labels['default']['derniere_annee'] = "In the last year";
heap.labels['default']['plusieurs_annees'] = "Several years ago";
heap.labels['default']['jamais_visite'] = "I've never been to a Chez Cora restaurant";
heap.labels['default']['matin_weekend'] = "Weekend mornings";
heap.labels['default']['brunch_weekend'] = "Weekend brunch";
heap.labels['default']['matin_semaine'] = "Weekday mornings";
heap.labels['default']['diner_semaine'] = "Weekday lunches";
heap.labels['default']['collation'] = "For an afternoon snack";
heap.labels['default']['famille'] = "My family";
heap.labels['default']['conjointe'] = "My spouse";
heap.labels['default']['amis'] = "Friends";
heap.labels['default']['collegues'] = "Work colleagues";
heap.labels['default']['seul'] = "Alone";
heap.labels['default']['meta_title_default'] = "Cora";
heap.labels['default']['meta_desc_default'] = "For an amazing breakfast, brunch or business lunch. Choose among a wide selection of eggs, crepes or French toasts dishes, with mountains of fresh fruit. Welcome to Cora.";
heap.labels['default']['news_no_results'] = "No matches were found with this criteria.";
heap.labels['default']['news_local'] = "Local News";
heap.labels['default']['news_select_regions'] = "All regions";
heap.labels['default']['news_select_restaurants'] = "All restaurants";
heap.labels['default']['news_regions'] = "Regions";
heap.labels['default']['news_restaurants'] = "Restaurants";
heap.labels['default']['news_all'] = "See all news";
heap.labels['default']['news_tags_restaurants'] = "Restaurants";
heap.labels['default']['news_tags_breakfast'] = "I Do Breakfast";
heap.labels['default']['news_tags_foundation'] = "Cora Foundation";
heap.labels['default']['news_tags_press'] = "Press Releases";
heap.labels['default']['news_tags_alberta'] = "Alberta";
heap.labels['default']['news_tags_british-columbia'] = "British Columbia";
heap.labels['default']['news_tags_manitoba'] = "Manitoba";
heap.labels['default']['news_tags_new-brunswick'] = "New Brunswick";
heap.labels['default']['news_tags_newfoundland'] = "Newfoundland";
heap.labels['default']['news_tags_nova-scotia'] = "Nova Scotia";
heap.labels['default']['news_tags_ontario'] = "Ontario";
heap.labels['default']['news_tags_prince-edward-island'] = "Prince Edward Island";
heap.labels['default']['news_tags_quebec'] = "Quebec";
heap.labels['default']['news_tags_saskatchewan'] = "Saskatchewan";
heap.labels['default']['read_more'] = "Read more";
heap.labels['default']['intro_a_gagner_title'] = "To be won:";
heap.labels['default']['intro_a_gagner'] = "One year of breakfasts in any Cora, anywhere in Canada!";
heap.labels['default']['intro_a_gagner_subtitle'] = "One of the $50 Cora gift cards that will be drawn daily.";
heap.labels['default']['contest_enter_title'] = "One year of breakfasts";
heap.labels['default']['contest_enter_text'] = "Enter for a chance to treat yourself to Cora for a year – absolutely free. †";
heap.labels['default']['contest_gift_card_title'] = "One of the $50 Cora gift cards †";
heap.labels['default']['contest_gift_card_desc1'] = "Whether it helps you enjoy some quality family time or gives you a reason to hang out with your friends, breakfast is the starting point for a great day. Every day.";
heap.labels['default']['contest_gift_card_desc2'] = "Breakfast is so good for you, and it’s just as great to share it with others. <strong>Tell us your favourite breakfast stories and you could win a Cora gift card.</strong>";
heap.labels['default']['contest_consent_declaration'] = "Declaration of consent, authorization and exemption relating to the submitted text.";
heap.labels['default']['champs_obligatoires'] = "*Mandatory fields";
heap.labels['default']['contest_rules'] = "† No purchase necessary. Open to Canadian residents of legal age. Contest open from October 17 to November 27, 2011, at 11:59 pm (ET). A full year of breakfast will be awarded in the form of $5,000 in Cora gift cards. Limit of one entry per email address for the duration of the contest; one email address per person. Rules.";
heap.labels['default']['optin_newsletter'] = "I would like to subscribe to and receive the free Cora Enthusiasts newsletter.";
heap.labels['default']['accept_rules'] = "I have read and accept all the";
heap.labels['default']['accept_rules_link'] = "contest rules";
heap.labels['default']['accept_rules_end'] = "†.";
heap.labels['default']['moments_partages'] = "Breakfast enthusiasts share their thoughts";
heap.labels['default']['winner_title'] = "The breakfast enthusiast winner of the day";
heap.labels['default']['see_winners'] = "See the complete list of winners";
heap.labels['default']['merci_texte'] = "Thank you for participating. Come back to the contest page as often as you like to find out who the winners are! You can also visit any participating Cora location for an additional chance to win one year of breakfasts, one of 122 Cora $100 gift cards (1 winner per participating restaurant). Contest ends November 27, 2011.";
heap.labels['default']['already_participate'] = "You have already participated in the contest.";
heap.labels['default']['contest_winners_title'] = "The complete list of breakfast enthusiast winners.";
heap.labels['default']['contest_winners_subtitle'] = "With a $50 Cora gift card, all they'll be able to think of is breakfast.";
heap.labels['default']['postalcode_syntax'] = "Please enter a valid Zip code (B1B 1B1)";

heap.media.sizes['square'] = new Object();
heap.media.sizes['square']['width'] = 100;
heap.media.sizes['square']['height'] = 100;
heap.media.sizes['square']['mode'] = 'crop';
heap.media.sizes['square']['crop'] = 'center';
heap.media.sizes['large'] = new Object();
heap.media.sizes['large']['width'] = 612;
heap.media.sizes['large']['height'] = 395;
heap.media.sizes['large']['mode'] = 'resize-crop';
heap.media.sizes['large']['dimension'] = 'min';
heap.media.sizes['ref'] = new Object();
heap.media.sizes['ref']['width'] = 400;
heap.media.sizes['ref']['height'] = 400;
heap.media.sizes['ref']['mode'] = 'resize';
heap.media.sizes['ref']['dimension'] = 'max';
heap.media.sizes['header'] = new Object();
heap.media.sizes['header']['width'] = 403;
heap.media.sizes['header']['height'] = 196;
heap.media.sizes['header']['mode'] = 'resize-crop';
heap.media.sizes['header']['dimension'] = 'min';
heap.media.sizes['profile'] = new Object();
heap.media.sizes['profile']['width'] = 421;
heap.media.sizes['profile']['height'] = 233;
heap.media.sizes['profile']['mode'] = 'resize-crop';
heap.media.sizes['profile']['dimension'] = 'min';
heap.media.sizes['photo'] = new Object();
heap.media.sizes['photo']['width'] = 379;
heap.media.sizes['photo']['height'] = 253;
heap.media.sizes['photo']['mode'] = 'resize-crop';
heap.media.sizes['photo']['dimension'] = 'min';
heap.media.sizes['jeu'] = new Object();
heap.media.sizes['jeu']['width'] = 432;
heap.media.sizes['jeu']['height'] = 276;
heap.media.sizes['jeu']['mode'] = 'resize-crop';
heap.media.sizes['jeu']['dimension'] = 'min';
heap.media.sizes['video'] = new Object();
heap.media.sizes['video']['width'] = 154;
heap.media.sizes['video']['height'] = 86;
heap.media.sizes['video']['mode'] = 'resize-crop';
heap.media.sizes['video']['dimension'] = 'min';
heap.media.sizes['news'] = new Object();
heap.media.sizes['news']['width'] = 230;
heap.media.sizes['news']['height'] = 180;
heap.media.sizes['news']['mode'] = 'resize-crop';
heap.media.sizes['news']['dimension'] = 'min';
heap.media.sizes['misc'] = new Object();
heap.media.sizes['misc']['width'] = 233;
heap.media.sizes['misc']['mode'] = 'resize';
heap.media.sizes['small'] = new Object();
heap.media.sizes['small']['width'] = 300;
heap.media.sizes['small']['height'] = 300;
heap.media.sizes['small']['mode'] = 'resize';
heap.media.sizes['small']['dimension'] = 'max';
heap.media.sizes['medium'] = new Object();
heap.media.sizes['medium']['width'] = 299;
heap.media.sizes['medium']['height'] = 226;
heap.media.sizes['medium']['mode'] = 'resize-crop';
heap.media.sizes['medium']['dimension'] = 'min';
 



heap.translate = function (token, replacements, dict)
{
  if (!dict) dict = 'default';
  if (heap.labels[dict] && heap.labels[dict][token]) {
    var out = heap.labels[dict][token];
    if (replacements) {
      if (typeof(replacements) == 'string') replacements = [ replacements ];
      var type = typeof(replacements);
      
      if (type == 'object' || type == 'array') {
        for (var key in replacements) {
          var text = replacements[key];
          out = out.replace("{"+key+"}", text);
        }
      }
    }
    return out;
  } else
    return token + '-' + heap.config['current_language'];
};

heap.api.setup = function(setupParams)
{
  var target = setupParams['object'];
  var api_url = setupParams['url'];
  var api_class = setupParams['api_class'];
  var methods = setupParams['methods'];
  
  if(!target) throw new Error("Missing target for heap.api.setup");
  if(!api_url) throw new Error("Missing api_url for heap.api.setup");
  if(!api_class) throw new Error("Missing api_class for heap.api.setup");
  if(!methods) methods = new Array();
  
  for(var m = 0; m < methods.length; m++) (function(api_method)
  {
    target[api_method] = function(callback, params)
    {
      jQuery.ajax({
        url: api_url+'/'+api_class+'/'+api_method,
        data: { parameters: JSON.stringify(params) }, 
        success: callback
      }); 
    }
  })(methods[m]);
  
  
};

/** User API **/

heap.api.users = {};
heap.api.setup({
  object: heap.api.users,
  api_class:'users',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search','isloggedin','login','logout','usernameAvailability','checkEmailAvailability']
});


heap.api.users.login = function(callback, params)
{
  params['password'] = hex_md5(params['password']);
  
  jQuery.ajax({
    url: heap.urlmap.api_json+'/'+'users'+'/'+'login',
    data: { parameters: JSON.stringify(params) }, 
    success: callback
  }); 
}

/** Atoms API **/
heap.api.atoms = {};
heap.api.setup({
  object: heap.api.atoms,
  api_class:'atoms',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search','setRating','getMetaBlock','addTags','removeTags','setFavorite']
});


/** Channels API **/
heap.api.channels = {};
heap.api.setup({
  object: heap.api.channels,
  api_class:'channels',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search','getMetaBlock','addTags','removeTags','getFeaturesParams']
});


/** Documents API **/
heap.api.media = {};
heap.api.setup({
  object: heap.api.media,
  api_class:'media',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search','addTags','removeTags', 'crop', 'setFrame', 'rotate', 'searchAndRender']
});

/** Reactions API **/
heap.api.reactions = {};
heap.api.setup({
  object: heap.api.reactions,
  api_class:'reactions',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search','moderate']
});

/** Redirects API **/
heap.api.redirects = {};
heap.api.setup({
  object: heap.api.redirects,
  api_class:'redirects',
  url: heap.urlmap.api_json,
  methods: ['load','create','erase','edit','search', 'setRating']
});


/** Tags API **/
heap.api.tags = {};
heap.api.setup({
  object: heap.api.tags,
  api_class:'tags',
  url: heap.urlmap.api_json,
  methods: ['load', 'create', 'erase', 'rename', 'merge', 'renameDictionary', 'eraseDictionary', 'search', 'searchAndRender']
});


/** Queue API **/
heap.api.queues = {};
heap.api.setup({
  object: heap.api.queues,
  api_class:'queues',
  url: heap.urlmap.api_json,
  methods: ['read', 'ls', 'count']
});




