/*
    SiteComponents version:
    6.6.4.1, tag SC_6_6_4_1, created Tue Oct 27 21:28:23 +0100 2009
    $Name:  $

    Disclaimer
    
    While we make every effort to ensure that this code is fit for its intended
    purpose, we make no guarantees as to its functionality. CoreTrek AS will
    accept no responsibility for the loss of data or any other damage or
    financial loss caused by use of this code.


    Copyright
    
    This programming code is copyright of CoreTrek AS. Permission to run this
    code is given to approved users of CoreTrek's publishing system CorePublish.
    
    This source code may not be copied, modified or otherwise repurposed for use
    by a third party without the written permission of CoreTrek AS.
    
    Contact webmaster@coretrek.com for information.
    
*/

/**
 * Configuration for site components javascript
 *
 * Configuration array structure:
 * {<component>: {<parameter>: value, <parameter>: value, ... }, ...}
 */
var siteComponentsConfig = {
    
    // Configuration for the keyword module.
    
    'keywords': {
        'elements': ['placeholder-content'],
        'skiptags': ['h1','h2','h3','h4','h5','h6'],
        'usetooltip': true
    }
    // Remember to add a comma above when enabling more options
    
    /*
    // Use this to move the collapsed debug position to the left, instead
    // of the default right.
    'debug': {
        'collapsedPageInfoPosition': 'left'
    }
    */
    
    /*
    // Use this to override the default position for tooltip.
    // Valid values is:
    //   mouse (default), tooltip follows mouse
    //   element, tooltip is attached to the title element
    
    'tooltip': {
        'positionby': 'mouse'
    }
    */
    
    /*
    // Use this to override the default fontsizes in the fontsize selector
    // (html/lib/fontsize.js)
    
    'fontsize': {
        'sizes': ["10pt", "15pt", "24pt"]
    }
    */


    
};

document.observe('dom:loaded', function(event) { 
    $$(".tag-offensive-video").each(function(element) {
        element.onclick = function() {
            if (!confirm('Er du sikker på at du vil merke denne videoen som upassende? Bare bruk denne knappen for å si ifra til Hovedkvarteret om videoen er upassende. Om du trykker Ok, vil en e-post med hvilken video det er, ditt brukernavn og hvem som har lagt ut videoen bli sendt til Hovedkvarteret.')) {
                return false;
            }
            var url = '/xmlhttprequest.php?service=article.tagOffensive&' + element.name;
            new Ajax.Request(url, {
                method: 'get',
                onSuccess: function(transport) {
                    alert('Videoen er rapportert som upassende.');
                }
            });
        }
    });
});
