//Param Init 
       var moVideoParam = new Array();
        moVideoParam['appFeedAlias'] = "main-player";
        moVideoParam['apiKey'] = "movideoNetwork10";
        //moVideoParam['mediaId'] = ""; 
        moVideoParam['token'] = ""; 
        moVideoParam['videoPageURL'] = "http://ten.com.au/video-player.htm";
        moVideoParam['feedSearchTag'] = "['catch%20up%20tv']";
        //Default playlist
        moVideoParam['playlist'] = "40338";
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//This function extract the video Tag information for movideo tag search
    function extractTag(tag, tagString){
          tag = tag.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
          var regexS = "[\\?&]"+tag+"=([^&#]*)";
          var regex = new RegExp(regexS);
          var results = regex.exec(tagString);
          if( results == null )
            return "";
          else
            return results[1];
    }
    function extractMovideoParam(urlParam, prefix){
        channel = getChannelFromRoo(urlParam);
        moVideoParam['playlistId'] = getPlaylistID("kit", channel);
        tagString = "clip:code="+getVideoTagFromRoo(urlParam, prefix);
        getMovideoIDByTag(tagString);
    }    
    //Return the Channel from Roo as Tag
    function getChannelFromRoo(clipID){
        //Determine if the clipID is part of URL string
        var rooChannel = "";
        if(clipID.indexOf("channel") > -1){
            rooChannel = extractTag("channel", clipID);
        } else if (clipID.indexOf("vxChannel") > -1){
            rooChannel = extractTag("vxChannel", clipID);
        } else{}
        return rooChannel;
    }
    //Return the Video ID from Roo as Tag - used in TEN
    function getVideoTagFromRoo(clipID, prefix){
        //Determine if the clipID is part of URL string
        var clipIDtemp;
        if(clipID.indexOf("vxClipId") > -1){
            clipIDtemp = extractTag("vxClipId", clipID);
        } else if (clipID.indexOf("clipid") > -1){
            clipIDtemp = extractTag("clipid", clipID);
        } else {
            clipIDtemp = clipID
        }
        return clipIDtemp.substring(5);
    }
    //Return the Video ID from Roo as Tag - used in The Circle
    function getVideoTagFromRooSansPrefix(clipID, prefix){
        //Determine if the clipID is part of URL string
        var clipIDtemp;
        if(clipID.indexOf("vxClipId") > -1){
            clipIDtemp = extractTag("vxClipId", clipID);
        } else if (clipID.indexOf("clipid") > -1){
            clipIDtemp = extractTag("clipid", clipID);
        } else {
            clipIDtemp = clipID
        }
        startpos = prefix.length;
        return clipIDtemp.substring(startpos);
    }
    //Return true if clip is roo content given an underscore in the clip id
    function rooVideo(clipID, prefix){
        if (clipID.indexOf('_') > -1){
            return true;
        } else {
            return false;
        }
    }
    //Return the true if clip is roo content given prefix
    function rooVideoURL(clipID, prefix){
        if ((clipID.indexOf("clipid") > -1) && (clipID.indexOf("channel") > -1)){
            return true;
        }else if ((clipID.indexOf("ClipId") > -1) && (clipID.indexOf("vxChannel") > -1)){
            return true;
        } else {
            return false;
        }
    }
    //Check if there is any parameter pass on the url
    function queryString(){
        fullURL = window.location.href;
        if(fullURL.indexOf('?')){
            return true;
        } else {
            return false;
        }
    }
    function urlTrim(rooUrl){
            rooUrl = rooUrl.replace(/\&amp;/g,'&');
            rooUrl = rooUrl.replace('%20' ,' ');
        return rooUrl;
    }
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //Appending the text to HTML
    //Taking in the DIV to draw object and the VideoAttributes
    function appendMedia(obj,videoAttributes)
    {
        videoDescription = truncateText(videoAttributes['description'], 82);
        videourl = moVideoParam['videoPageURL']+"?movideo_p="+videoAttributes['playlist']+"&movideo_m="+videoAttributes['id'];
        //videourl = moVideoParam['videoPageURL']+"?movideo_m="+videoAttributes['id'];
        var e = $('<div class="item"><div class="preview-image"><a title="' + videoAttributes['title'] + '" href="'+ videourl + '"><img alt="' + videoAttributes['title'] + ' image" width="128" height="72" src="' + videoAttributes['image'] + '"/></a></div><h4 width="20"><a title="' + videoAttributes['title'] + '" href="' + videourl + '">' + videoAttributes['title'] + '</a></h4><div class="text">' + videoDescription.substr(0,82) + '</div></div>');
        obj.before(e);
    }
    
    //////////////////////////////////////////////////////
    //Search the media in given playlist and draw
    function drawMoVideoPlaylistFeed(divID, numOfItem, playlist, appendFunction){
        if (!playlist.length > 0){
            playlist = moVideoParam['playlist'];
        }
        //Init Get Token
        getMoVideoToken();
        var searchParam = new Array();
        searchParam['includeMedia'] = 'true';
        searchParam['mediaLimit'] = numOfItem;
        searchParam['omitFields'] = 'ratio,creator,tagProfileId,mediaFileExists,syndicated,mediaSchedules,displayStatus,syndicatedPartners,encodingProfiles,client,filename,status,defaultImage';
        queryString = "?token="+moVideoParam['token'];
        for(i in searchParam){
            if(searchParam[i] != ""){
                queryString = queryString + "&" + i + "=" + searchParam[i];
            }
        }
        //If search
        url = "api/rest/playlist/"+playlist+queryString;
        $.ajax({
            type: "GET",
            url: url,
            dataType: "xml",
            async: false,
            //Success Return
            success: function(xml) {
                 $('#'+divID+" .temp").remove();
                 $(xml).find('mediaList').each(function(){
                    $(this).find('media').each(function(i){
                        var videoAttributes = new Array();
                            videoAttributes['playlist'] = playlist;
                            videoAttributes['title'] = $(this).find('title').text();
                            videoAttributes['image'] = $(this).find('imagePath').text()+'cropped/128x72.png';
                            videoAttributes['description'] = $(this).find('description').text();
                            videoAttributes['pubdate'] = $(this).find('lastModifiedDate').text();
                            videoAttributes['counter'] = i;
                            var id;
                            $(this).find('id').each(function(){
                               id = $(this).text();                    
                               if (id!== null) {
                                  return false;
                               }
                            });
                            videoAttributes['id'] = id;
                            window[appendFunction]($('#'+divID),videoAttributes);
                    });
                });
            }
            //End Success
        });
    }
    //////////////////////////////////////////////////////
    //Search the media api by given tagString
    function getMovideoIDByTag(tagString){
        //Init Get Token
        getMoVideoToken();
        var searchParam = new Array();
        //Param reference from http://support.movideo.com/entries/95326-api-media-search-media
        searchParam['pageSize'] = 1;
        searchParam['paged'] = 'false';
        searchParam['tags'] = '["' + tagString + '"]';
        queryString = "?token="+moVideoParam['token'];
        for(i in searchParam){
            if(searchParam[i] != ""){
                queryString = queryString + "&" + i + "=" + searchParam[i];
            }
        }
        //If search
        url = "api/rest/media/search"+queryString;
        //url = "http://localhost/search.php"+queryString;
        $.ajax({
            type: "GET",
            url: url,
            dataType: "xml",
            async: false,
            //Success Return
            success: function(xml) {
                moVideoParam['mediaId'] = $(xml).find('id:first').text();
            }
            //End Success
        });
    }
    //////////////////////////////////////////////////////
    function getMoVideoToken(){
        var scope= this;
        if(moVideoParam['token'] == ""){
            $.ajax({
                type: "GET",
                //url: "http://localhost/session.php",
                url: "/api/rest/session?key="+moVideoParam['apiKey']+"&applicationalias="+moVideoParam['appFeedAlias'],
                dataType: "xml",
                async: false,
                //Success Return
                success: function(xml) {
                    $(xml).find('session').each(function(){
                        moVideoParam['token'] = $(this).find('token').text();
                    });
                }
            });
        }
    }
    //////////////////////////////////////////////////
    //Callback for initialised 
    function updateFacebookInfo(media){
         $('#debug').append('Playing Now:' + media.id);
         $('#debug').append('Playing Now:' + media.title);
         $('#debug').append('Playing Now:' + media.imageFilename); 
    }
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //Return Eqivalent Movideo Playlist Name 
        function getPlaylistName(type, value){
            return $("input["+type+"="+value+"]").attr("mplaylist");    
        }
        //Return Eqivalent Movideo Playlist Code 
        function getPlaylistCode(type, value){
            return $("input["+type+"="+value+"]").attr("mplaylistcode");    
        }
        
        //Return Eqivalent Movideo Playlist Index 
        //Required for calling movideo playlist 
        function getPlaylistID(type, value){
            value = value.replaceAll('%20', '+');
            value = value.replaceAll(' ', '+');
            var playlistID = $("input["+type+"="+value+"]").attr("mplaylistId");
            //If no playlist return will default to default playlist
            if(playlistID == undefined){
                return "";
            } else {
                return playlistID;    
            }
        }
        //Return Eqivalent Kit Channel Name 
        //Required for returning video channel header
        function getKitChannel(type, value){
            return $("input["+type+"="+value+"]").attr("kit");    
        }
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Function String Trancate
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function truncateText(val, maxChars, wholeWords) {
                if (wholeWords == undefined)
                    wholeWords = true;
                if (val.length <= maxChars) {
                    return val;
                }
                else {
                    if (wholeWords) {
                        var lastSpace = val.indexOf(' ', maxChars);
                        if (lastSpace <= 0)
                            lastSpace = maxChars;
                        return val.substring(0, lastSpace) + '...';
                    }
                    else {
                        return val.substring(0, maxChars) + '...';
                    }
                }
            }
 
 
// Replaces all instances of the given substring.
String.prototype.replaceAll = function(
    strTarget, // The substring you want to replace
    strSubString // The string you want to replace in.
    ){
    var strText = this;
    var intIndexOfMatch = strText.indexOf( strTarget );
     
    // Keep looping while an instance of the target string
    // still exists in the string.
    while (intIndexOfMatch != -1){
    // Relace out the current instance.
    strText = strText.replace( strTarget, strSubString )
     
    // Get the index of any next matching substring.
    intIndexOfMatch = strText.indexOf( strTarget );
    }
     
    // Return the updated string with ALL the target strings
    // replaced out with the new substring.
    return( strText );
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ---------------------------------------------------------------------------------------- */
/* MO-VIDEO API SETTINGS
/* ---------------------------------------------------------------------------------------- */
/*
var moVideoSettings = new Array();
moVideoSettings['apiKey'] = moVideoParam['apiKey']; //"movideoNetwork10";
moVideoSettings['appName'] = moVideoParam['appFeedAlias']; //"main-player";
moVideoSettings['videoPageURL'] = moVideoParam['videoPageURL']; //"/ten-news-video.htm";
moVideoSettings['mediaParam'] = 'movideo_m';
moVideoSettings['playlistParam'] = 'movideo_p';
moVideoSettings['siteid'] = 4;
var imageSizes = [];
*/

/* ---------------------------------------------------------------------------------------- */
/* MO-VIDEO TOKEN
/* ---------------------------------------------------------------------------------------- */
/*
// set up mo-video token when the page loads
MOVIDEO.init({
    appAlias: moVideoSettings['appName'],
    apiKey: moVideoSettings['apiKey'],
    api: "/api/rest/"
});
*/
/* ---------------------------------------------------------------------------------------- */
/* TURN RESPONES INTO LIST OF MEDIA
/* ---------------------------------------------------------------------------------------- */
/*
function getMediaList(response, den, playlistid, imageSize) {
    if (den == undefined) {
        den = false;
    }
    var mediaList;
    if ((response == "") || (response == undefined)) {
        mediaList = [];
    }
    else {
        if (response.list != undefined) {
            if (response.list.media != undefined) {
                if (response.list.media.id != undefined) {
                    mediaList = [];
                    mediaList[0] = response.list.media;
                }
                else {
                    mediaList = response.list.media;
                }
            }
            else {
                mediaList = [];
            }
        }
        else if (response.id != undefined) { //media single item
            var mediaList = [];
            mediaList[0] = response;
        }
        else if (response.media.id != undefined) {
            var mediaList = [];
            mediaList[0] = response.media;
        }
        else {
            mediaList = response.media;
        }
    }
    for (i = 0; i < mediaList.length; i++) {
        if (mediaList[i].tags.tag != null) {
            
            // get duration
            for (x = 0; x < mediaList[i].tags.tag.length; x++) {
                if (mediaList[i].tags.tag[x].ns == 'duration') {
                    duration = mediaList[i].tags.tag[x].value;
                    var durArray = duration.split(':');
                    var durHours = parseInt(durArray[0]);
                    var durMin = parseInt(durArray[1]);
                    var durSeconds = durArray[2];
                    var formattedDuration = '';
                    if (durHours > 0) formattedDuration += durHours + ':';
                    formattedDuration += durMin + ':' + durSeconds;
                    mediaList[i].duration = formattedDuration;
                }
            }
        }
        // get creation date
        var dateArr = mediaList[i].creationDate.split('T')[0].split('-');
        var timeArr = mediaList[i].creationDate.split('T')[1].split(':');
        var d = new Date(dateArr[0], dateArr[1] - 1, dateArr[2], timeArr[0], timeArr[1]);
        // IMPORTANT: add 10 hours to date for GMT/Australian time conversion
        d.setHours(d.getHours() + 10);
        mediaList[i].date = dateFormat(d, "d/mm/yyyy");
        mediaList[i].longdate = dateFormat(d, "dS mmmm yyyy h:MM TT");
        var baseURL = (den) ? moVideoSettings['denVideoPageURL'] : moVideoSettings['videoPageURL'];
        mediaList[i].link = baseURL + "?" + moVideoSettings['mediaParam'] + "=" + mediaList[i].id;
        if (playlistid != null) {
            mediaList[i].link += "&" + moVideoSettings['playlistParam'] + "=" + playlistid;
        }
        // image size
        var actualImageSize = imageSize;
        for (x = 0; x < imageSizes.length; x++) {
            if (den && imageSizes[x].imageSize == imageSize) {
                actualImageSize = imageSizes[x].denImageSize;
            }
            if (!den && imageSizes[x].denImageSize == imageSize) {
                actualImageSize = imageSizes[x].imageSize;
            }
        }
        mediaList[i].imageurl = mediaList[i].imagePath + 'cropped/' + actualImageSize + '.png';
    }
    return mediaList;
}
function extractPlaylistId(query) {
    var playlistid = query.match("playlist/(.*?)/media");
    if (playlistid != null) {
        if (playlistid[1] != null) {
            if (!isNaN(playlistid[1])) {
                return playlistid[1];
            }
        }
    }
    return null;
}
*/
/* ---------------------------------------------------------------------------------------- */
/* VIDEO LIST
/* ---------------------------------------------------------------------------------------- */
/*
jQuery.fn.videos = function (options) {
    var content = this;
    content.append('<div class="loading"></div>');
    // default settings
    var defaults = {
        den: false,
        maxvideos: 0,
        showdate: false,
        showdescription: true,
        showrating: false,
        showduration: true,
        pagination: false,
        imageSize: '128x72',
        pagesize: 0,
        headerCharLimit: 0,
        descriptionCharLimit: 0,
        dontTruncateFirstItem: false
    }
    // get settings passed to the function
    var o = $.extend(defaults, options);
    var params = [];
    // omit unneccessary fields for performance
    params[params.length] = { name: 'omitFields', value: 'ratio,creator,tagProfileId,mediaFileExists,syndicated,mediaSchedules,displayStatus,syndicatedPartners,encodingProfiles,client,filename,status,defaultImage' };
    // limit videos
    if (o.maxvideos > 0) {
        if (o.query.indexOf('playlist') > -1) {
            params[params.length] = { name: 'mediaLimit', value: o.maxvideos };
        }
        if (o.query.indexOf('media/search') > -1) {
            params[params.length] = { name: 'paged', value: 'true' };
            params[params.length] = { name: 'page', value: '0' };
            params[params.length] = { name: 'pageSize', value: o.maxvideos };
        }
    }
    // call api to retrieve videos
    MOVIDEO.media.callAPI({
        endpoint: o.query,
        params: params,
        async: true,
        errorHandler: function () { alert('error'); },
        handler: function (response) {
            // start building list of videos
            var ul = $('<ul class="video-panel"></ul>');
            var mediaList = getMediaList(response, o.den, extractPlaylistId(o.query), o.imageSize);
            // loop through each media item in json
            for (i = 0; i < mediaList.length; i++) {
                // check if max videos has been reached (if maxvideos = 0, then no limit)
                if (o.maxvideos < 1 || o.maxvideos > i) {
                    // create list item
                    var li = $(
                        '<li class="item">' +
                            '<a class="image">' +
                                '<img border="0" width="145" height="81" />' +
                                '<div class="play-icon"></div>' +
                            '</a>' +
                            '<div class="text">' +
                                '<div class="header"><a></a></div>' +
                                '<p></p>' +
                                '<div class="details"></div>' +
                            '<div>' +
                        '</li>');
                    // append data to list item
                    li.addClass('item' + i);
                    li.find('a').attr('href', mediaList[i].link);
                    li.find('a').attr('title', mediaList[i].title);
                    li.find('.header a').append(mediaList[i].title);
                    li.find('img').attr('src', mediaList[i].imageurl);
                    if (o.showdate) {
                        if (mediaList[i].date != undefined) {
                            li.find('.details').append('Added: ' + mediaList[i].date);
                        }
                    }
                    if (o.showduration) {
                        if (mediaList[i].duration != undefined) {
                            li.find('.details').append('(' + mediaList[i].duration + ')');
                        }
                    }
                    if (o.showdescription) {
                        if (mediaList[i].description != undefined) {
                            li.find('p').append(mediaList[i].description);
                        }
                    }
                    // append star ratings
                    if (o.showrating) {
                        // TO-DO: star ratings
                    }
                    // append item to list
                    ul.append(li);
                }
            }
            // append list to container
            content.html(ul);
            // initialise elements (text limits)
            if (o.headerCharLimit > 0) {
                var items = (o.dontTruncateFirstItem) ? content.find('.item .header a').not(content.find('.item:first .header a')) : content.find('.item .header a');
                items.limitCharacters(o.headerCharLimit);
            }
            if (o.descriptionCharLimit > 0) {
                var items = (o.dontTruncateFirstItem) ? content.find('.item p').not(content.find('.item:first p')) : content.find('.item p');
                items.limitCharacters(o.descriptionCharLimit);
            }
            // do onload function if one is specified
            if (o.onload != undefined)
                o.onload();
            if (o.pagination) {
                var items = content.find('.item');
                var items_per_page = o.pagesize;
                applyVideoPagination(items, items_per_page, o.pagination_container);
            }
            return false;
        }
    });
};
*/

/* ---------------------------------------------------------------------------------------- */
/* MCM-L3
/* ---------------------------------------------------------------------------------------- */
jQuery.fn.recentVideoPanel = function (options) {
    var content = this;
    var defaults = {
        playlistid: ''
    }
    var o = $.extend(defaults, options);
    content.videos({
        den: false,
        maxvideos: 1,
        imageSize: '280x158',
        showduration: false,
        showdate: true,
        showdescription: true,
        query: 'playlist/' + o.playlistid + '/media'
    });
};


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
*/
var dateFormat = function () {
    var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
        timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
        timezoneClip = /[^-+\dA-Z]/g,
        pad = function (val, len) {
            val = String(val);
            len = len || 2;
            while (val.length < len) val = "0" + val;
            return val;
        };
    // Regexes and supporting functions are cached through closure
    return function (date, mask, utc) {
        var dF = dateFormat;
        // You can't provide utc if you skip other args (use the "UTC:" mask prefix)
        if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
            mask = date;
            date = undefined;
        }
        // Passing date through Date applies Date.parse, if necessary
        date = date ? new Date(date) : new Date;
        if (isNaN(date)) throw SyntaxError("invalid date");
        mask = String(dF.masks[mask] || mask || dF.masks["default"]);
        // Allow setting the utc argument via the mask
        if (mask.slice(0, 4) == "UTC:") {
            mask = mask.slice(4);
            utc = true;
        }
        var _ = utc ? "getUTC" : "get",
            d = date[_ + "Date"](),
            D = date[_ + "Day"](),
            m = date[_ + "Month"](),
            y = date[_ + "FullYear"](),
            H = date[_ + "Hours"](),
            M = date[_ + "Minutes"](),
            s = date[_ + "Seconds"](),
            L = date[_ + "Milliseconds"](),
            o = utc ? 0 : date.getTimezoneOffset(),
            flags = {
                d: d,
                dd: pad(d),
                ddd: dF.i18n.dayNames[D],
                dddd: dF.i18n.dayNames[D + 7],
                m: m + 1,
                mm: pad(m + 1),
                mmm: dF.i18n.monthNames[m],
                mmmm: dF.i18n.monthNames[m + 12],
                yy: String(y).slice(2),
                yyyy: y,
                h: H % 12 || 12,
                hh: pad(H % 12 || 12),
                H: H,
                HH: pad(H),
                M: M,
                MM: pad(M),
                s: s,
                ss: pad(s),
                l: pad(L, 3),
                L: pad(L > 99 ? Math.round(L / 10) : L),
                t: H < 12 ? "a" : "p",
                tt: H < 12 ? "am" : "pm",
                T: H < 12 ? "A" : "P",
                TT: H < 12 ? "AM" : "PM",
                Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
                o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
                S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
            };
        return mask.replace(token, function ($0) {
            return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
        });
    };
} ();
// Some common format strings
dateFormat.masks = {
    "default": "ddd mmm dd yyyy HH:MM:ss",
    shortDate: "m/d/yy",
    mediumDate: "mmm d, yyyy",
    longDate: "mmmm d, yyyy",
    fullDate: "dddd, mmmm d, yyyy",
    shortTime: "h:MM TT",
    mediumTime: "h:MM:ss TT",
    longTime: "h:MM:ss TT Z",
    isoDate: "yyyy-mm-dd",
    isoTime: "HH:MM:ss",
    isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
    isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
// Internationalization strings
dateFormat.i18n = {
    dayNames: [
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
        "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
    ],
    monthNames: [
        "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
        "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
    ]
};
// For convenience...
Date.prototype.format = function (mask, utc) {
    return dateFormat(this, mask, utc);
};
