/** dest. fonts **/
var ABS_URI = '';
var gotham = { src: ABS_URI+'js/fnt/johnstonitc-boldos.swf' };

var colors = { 
                '#ffffff':'#ffffff',
                '#33cc66':'#33cc66',
                '#99cc33':'#99cc33',
                '#0066ff':'#0066ff',
                '#9966ff':'#9966ff',
                '#ff0066':'#ff0066',
                '#ff0000':'#ff0000',
                '#ff9900':'#ff9900',
                'rgb(255, 255, 255)':'#ffffff',
                'rgb(51, 204, 102)':'#33cc66',
                'rgb(153, 204, 51)':'#99cc33',
                'rgb(0, 102, 255)':'#0066ff',
                'rgb(153, 102, 255)':'#9966ff',
                'rgb(255, 0, 102)':'#ff0066',
                'rgb(255, 0, 0)':'#ff0000',
                'rgb(255, 153, 0)':'#ff9900'
}

var offSetObj = {
    'H1' : 4,
    'STRONG' : 4,
    'SPAN' : 4
}

/** activate fonts **/
sIFR.activate(gotham);
var parseSelector = $;

/** size will be adjusted to size of movie **/
sIFR.fitExactly = true;

/** MENU **/
replaceMenu = function() {
    sIFR.replace(gotham, {
      selector: $('#main-navigation li:not([rev=#kaartverkoop])'),
      css:  {
                '.sIFR-root': { 
                    'font-size': '14px',
                    'color': '#FFFFFF',
                    'cursor':'pointer',
                    'z-index':'1',
                    'background-color':'#000000'
             }
      },

      wmode: 'transparent',
      offsetTop: 0,
      onRelease: function(obj) {
          if(typeof(obj.nodeName) !== 'LI') {
            moveWindow(obj);
          }
      }
    });

    sIFR.replace(gotham, {
      selector: $('#main-navigation li[rev=#kaartverkoop]'),
      css:  {
                '.sIFR-root': {
                    'font-size': '16px',
                    'color': '#ff0000',
                    'cursor':'pointer',
                    'z-index':'1',
                    'background-color':'#000000'
             }
      },

      wmode: 'transparent',
      offsetTop: 0,
      onRelease: function(obj) {
          if(typeof(obj.nodeName) !== 'LI') {
            moveWindow(obj);
          }
      }
    });
    
}

$(document).ready(function(){
    $('dd.first-child h1, dt span.last-child strong, span.header, #kids h2.list-header').each(function(){
        
        var singleLine = (this.nodeName=="STRONG")? false : true;
        sIFR.replace(gotham, {
          selector: $(this),
          css:  {
                    '.sIFR-root': { 'font-size': $(this).css('font-size'), 'color': colors[$(this).css('color')] }           
          },
          wmode: 'transparent',
          offsetTop: offSetObj[this.tagName],
          forceSingleLine: singleLine
        }); 
    }); 
});
