﻿/// <reference path="jquery-1.3.2-vsdoc.js" />

function main() {
    $("#featuredimage").attr("src", $("#featuredEvents li a:first").attr("rel"));
    $("#featuredEvents li a:first").addClass("mouseOver");
}

function swapImage(obj, imagePath) {
    $("#featuredEvents li a").each(function (i) {
        $(this).removeClass("mouseOver");
    });

    $(obj).addClass("mouseOver");
    $("#featuredimage").attr("src", imagePath);
}

function initialiseEditor() {
    tinyMCE.init({
        editor_selector: "mceEditor",
        editor_deselector: "mceNoEditor",
        mode: "textareas",
        readonly: false,
        theme: "advanced",
        theme_advanced_buttons1: "bold, italic, underline, formatselect, cut, copy, paste, pastetext, pasteword, link, unlink, justifyleft, justifycenter, justifyright, justifyfull, bullist, numlist,code",
        theme_advanced_buttons2: "",
        theme_advanced_buttons3: "",
        theme_advanced_buttons4: "",
        theme_advanced_toolbar_align: "left",
        theme_advanced_toolbar_location: "top",
        theme_advanced_resizing: false
    });
}

function initialiseSimpleEditor() {
    tinyMCE.init({
        editor_selector: "mceEditor",
        editor_deselector: "mceNoEditor",
        mode: "textareas",
        readonly: false,
        theme: "advanced",
        theme_advanced_buttons1: "",
        theme_advanced_buttons2: "",
        theme_advanced_buttons3: "",
        theme_advanced_buttons4: "",
        theme_advanced_toolbar_align: "",
        theme_advanced_toolbar_location: "",
        theme_advanced_resizing: false,
        valid_elements: "p,br"
    });
}

function initialiseMap(lat, long, name, zoom) {
    $("#map").gMap({ markers: [{ latitude: lat, longitude: long, html: name, popup: true }], zoom: zoom });
}
