try {
	var Buddy = Class.create( {
		counter : null,

		initialize : function() {
			this.counter = 0;
			if( 'undefined' == WickedConfig ) return;
			this._loadImages();
			this._replaceMediaPNGs();
		},

		_loadImages : function() {
			try {
				$$( 'img.fimg' ).each( function( item ) {
					this._addFlashContent( item );
				}, this );
			} catch( error ) { 
				//this._log( error ); 
			}
		},

		_addFlashContent : function( element ) {
			try {
				++this.counter;
				var src = element.src;
				var flash;
				var fwidth;
				var fheight;
				var flashclass;
				if( element.hasClassName( 'edge-1' ) ) {
					flash = WickedConfig.image2flash.edge1.flash;
					fwidth = WickedConfig.image2flash.edge1.fwidth;
					fheight = WickedConfig.image2flash.edge1.fheight;
					flashclass = WickedConfig.image2flash.edge1.flashclass;
				} else if( element.hasClassName( 'edge-2' ) ) {
					flash = WickedConfig.image2flash.edge2.flash;
					fwidth = WickedConfig.image2flash.edge2.fwidth;
					fheight = WickedConfig.image2flash.edge2.fheight;
					flashclass = WickedConfig.image2flash.edge2.flashclass;
				} else if( element.hasClassName( 'edge-3' ) ) {
					flash = WickedConfig.image2flash.edge3.flash;
					fwidth = WickedConfig.image2flash.edge3.fwidth;
					fheight = WickedConfig.image2flash.edge3.fheight;
					flashclass = WickedConfig.image2flash.edge3.flashclass;
				} else if( element.hasClassName( 'edge-4' ) ) {
					flash = WickedConfig.image2flash.edge4.flash;
					fwidth = WickedConfig.image2flash.edge4.fwidth;
					fheight = WickedConfig.image2flash.edge4.fheight;
					flashclass = WickedConfig.image2flash.edge4.flashclass;
				}  else {
					return;
				}

				var imgcontent;
				try {
					imgcontent = (	element.adjacent( 'div.image-content h3' ).size() > 0 ||
									element.adjacent( 'div.image-content p' ).size() > 0  ||
									element.adjacent( 'div.image-content div.link-box' ).size() > 0 ) ? "true" : "false";
				} catch( e ) {
					imgcontent = "false";
				}
				imgcontent = "false";
				var d = new Element( 'div', { title:element.alt } );
				var fd = new Element( 'div', { id:'fimg-' + this.counter } );

				d.appendChild( fd );
				element.insert( { before:d } );
				swfobject.embedSWF( flash, 'fimg-' + this.counter, fwidth, fheight, '9', null, { img:src,hascontent:imgcontent }, { wmode:'transparent' },{},function(e){if(e.success)$(e.ref).parentNode.adjacent('img.fimg').invoke('remove');} );
			} catch( error ) {  
				//this._log( error ); 
			}
		},

		_replaceMediaPNGs : function() {
			if( false == Prototype.Browser.IE ) return;
			/*@cc_on
			@if( @_jscript_version <= 5.6 ) {
				try {
					$$( 'ul.mediateaserlist-1 .icon-teaser .img-replace img, ul.shoplist .img-replace img').each( function( image ) {
						if( image.src.indexOf( '.png' ) == -1 ) $continue;
						var w = image.getWidth();
						var h = image.getHeight();
						var path = image.src;
						var filtercss = 'width:' + w + 'px;height:' + h + 'px;' +
						   				'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + path + ', sizingMethod=crop);';
						var d = new Element( 'div', { 'style':filtercss } );
						var c = document.createComment( 'replaced' );
						d.appendChild( c );
						image.parentNode.appendChild( d );
						image.remove();
					}, this );
				} catch( error ) {}
			}
			@end
			@*/

		},

		_log : function( w ) {
			if( true == Prototype.Browser.IE ) return;
			//console.log( w );
		}

	} );

	Event.observe( document, 'dom:loaded', function() {
		$$('h1.sifr-heading-1').each(function(element) {
			element.innerHTML = element.innerHTML.replace(/[A-Z]+/g, function(match){
				var result=match;
				if(!(match=="SPAN"||match=="BR"||match=="CENTER"||match=="TEXT"))
					result=("<span class=\"big\">"+match+"</span>");
				//alert (match+result);
				return result;
			});
		});
		$$('h2.sifr-heading-1').each(function(element) {
			element.innerHTML = element.innerHTML.replace(/[A-Z]+/g, function(match){
				var result=match;
				if(!(match=="SPAN"||match=="BR"||match=="CENTER"||match=="TEXT"))
					result=("<span class=\"big\">"+match+"</span>");
				//alert (match+result);
				return result;
			});
		});
		$$('div.presse dl.dl-list-2 dt').each(function(element) {
			element.innerHTML = element.innerHTML.replace(/[A-Z]+/g, function(match){
				var result=match;
				if(!(match=="SPAN"||match=="BR"||match=="CENTER"||match=="TEXT"))
					result=("<span class=\"big\">"+match+"</span>");
				//alert (match+result);
				return result;
			});
		});

				
		new Buddy();
	} );

} catch(e) { alert(e); }