var Katoenenzo = {
	options: {
		webroot: '/shop/',
		phpThumbUrl: '/library/phpThumb/phpThumb.php',
		requireFlash: true,
		requiredFlashVersion: {
			major: 9,
			minor: 0,
			revision: 0
		}
	}
};

Katoenenzo.hasReqestedFlashVersion = (function() {
  var r = Katoenenzo.options.requiredFlashVersion;
  
  return DetectFlashVer(r.major, r.minor, r.revision);
})();


Object.extend(Katoenenzo, {
  capture: function(func) {
    if (Prototype.Browser.IE) return func;
    func = func.wrap(function(proceed, event) {
      var element = Object.isElement(this) ? this : this.element,
		  parent = event.relatedTarget;
      
      while (parent && parent != element) {
        try { parent = parent.parentNode; }
        catch(e) { parent = element; }
      }
      if (parent == element) return;
      proceed(event);
    });
    return func;
 },
 useEvent: (function(IE) { return {
	    'mouseover': (IE ? 'mouseenter' : 'mouseover'),
	    'mouseout': (IE ? 'mouseleave' : 'mouseout'),
	    'mouseenter': (IE ? 'mouseenter' : 'mouseover'),
	    'mouseleave': (IE ? 'mouseleave' : 'mouseout')
 };})(Prototype.Browser.IE)
});

//Plugin detectie
//
document.observe('dom:loaded', function() {
	if (!Katoenenzo.hasReqestedFlashVersion && window.Katoenenzo.options.requireFlash) {
		window.location.href = Katoenenzo.options.webroot + 'getflash'
	}
});

/*
 * sIFR
 */
/*
 * Kledinglijnen menu
 */
sIFR.replace(eurofurence, Object.extend({
	  selector: '#menuClothinglines',
	  css: '.sIFR-root { text-align: center; text-transform: uppercase; color: #96b33c; font-size: 21px;} .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
	  wmode: 'transparent',
	  preserveSingleWhitespace: true,
	  tuneWidth: 2,
	  onRelease: function(event) { window.location.href = Katoenenzo.options.webroot + 'clothinglines'; }
}, Prototype.Browser.IE ? {} : {
	onRollOver: function(event) { ClothinglinesMenu.show(event) },
	onRollOut: function(event) { ClothinglinesMenu.hide(event) }
}));

//submenu daarvan
sIFR.replace(eurofurence, {
	selector: '#clothinglinesBox .clothingline',
	css: '.sIFR-root { text-transform: uppercase; color: #96b33c; font-size: 21px;} .sIFR-root a { outline-style: none; color: #96b33c; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: underline; }',
	preventWrap: true,
	forceSingeLine: true,
	wmode: 'transparent',
	onRollOver: function() { ClothinglinesMenu.show() }
});



// MENU H1
sIFR.replace(eurofurence, {
  selector: '#menu .menuitem h1',
  css: '.sIFR-root { text-transform: uppercase; color: #96b33c; font-size: 21px; } .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
  preventWrap: true,
  forceClear: true,
  preserveSingleWhitespace: true,
  wmode: 'transparent',
  tuneWidth: 2
});


//SUBMENU H1
sIFR.replace(eurofurence, {
  selector: '#submenu .menuitem h1',
  css: '.sIFR-root { text-transform: uppercase; color: #96b33c; font-size: 21px;  } .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
  wmode: 'transparent',
  preventWrap: true,
  forceSingeLine: true,
  tuneWidth: 2
});

// HEADER TITLE
sIFR.replace(eurofurence, {
	  selector: 'div.headerImage h1',
	  css: '.sIFR-root { text-transform: uppercase; color: #96b33c; font-size: 42px;}',
	  wmode: 'transparent'
});
//HEADER SubTITLE
sIFR.replace(gazette, {
	  selector: 'div.headerImage h3',
	  css: '.sIFR-root { color: #98906f; font-size: 15px; font-style: italic;} .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
	  wmode: 'transparent',
	  preventWrap: true,
	  forceSingeLine: true
});

sIFR.replace(eurofurence, {
	  selector: 'h1.sIFR',
	  css: '.sIFR-root { text-transform: uppercase; color: #98906f; font-size: 19px;}',
	  wmode: 'transparent'
});

sIFR.replace(gazette, {
	  selector: 'h1.gazette',
	  css: '.sIFR-root { color: #333333; font-size: 21px; font-style: italic; } .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
	  wmode: 'transparent',
	  preventWrap: true,
	  forceSingeLine: true,
	  tuneWidth: 5
});

sIFR.replace(gazette, {
	  selector: 'h2.gazette',
	  css: '.sIFR-root { color: #333333; font-size: 19px; font-style: italic; } .sIFR-root a { outline-style: none; color: #98906f; text-decoration: none; } .sIFR-root a:hover { color: #96b33c; text-decoration: none; }',
	  wmode: 'transparent',
	  fixWrap: true,
	  tuneWidth: 5
});