 var blank = new Image();
 blank.src = 'img/blank.gif';
 
 function fixPng(png) {
   // get src
   var src = png.src;
   // set width and height
   if (!png.style.width) { png.style.width = $(png).width(); }
   if (!png.style.height) { png.style.height = $(png).height(); }
   // replace by blank image
   png.onload = function() { };
   png.src = blank.src;
   // set filter (display original image)
   png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
 }

 
// JavaScript Document
$(document).ready(function(){
				   var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
				   if (badBrowser) {
				     // get all pngs on page
				     $('img[src$=.png]').each(function() {
				       if (!this.complete) {
					 this.onload = function() { fixPng(this) };
				       } else {
					 fixPng(this);
				       }
				     });
				   }
				   
				$('h2.boxtitle').flash(
					{ 
						src: 'sifr/myria.swf', 
						width:180, 
						height:30,
						wmode: 'transparent', 
						flashvars: { 
							css: [
								'a { color: #ff6600; text-decoration: none;fontSize:22px;fontWeight:bold}',
								'a:hover {color: #333333; text-decoration: none; }',
							].join(' ')
						}
					},
					{ version: 7 },
					function(htmlOptions) {
						htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
						var $alt = $(this.firstChild);

						$alt.addClass('alt');
						$(this)
							.addClass('flash-replaced')
							.prepend($.fn.flash.transform(htmlOptions));						
					}
				);
				
				$('#mm li:not(.selected)').flash(
									{ 
										src: 'sifr/myria.swf',  
										wmode: 'transparent', 
										height:36,
										flashvars: { 
											css: [
											'a { color: #333333; text-decoration: none;fontSize:22px; }',
											'a:hover {color: #ff6600; text-decoration: none; }'
											].join(' ')
										}
									},
									{ version: 7 },
									function(htmlOptions) {
										htmlOptions.flashvars.txt = this.innerHTML;
										this.innerHTML = '<span>'+this.innerHTML+'</span>';
										var $alt = $(this.firstChild);
										
										htmlOptions.width = $alt.width();
										$alt.addClass('alt');
										$(this)
											.addClass('flash-replaced')
											.prepend($.fn.flash.transform(htmlOptions));						
									}
								);
				$('#sm li:not(.selected)').flash(
									{ 
										src: 'sifr/myria.swf',  
										wmode: 'transparent', 
										height:24,
										flashvars: { 
											css: [
												'a { color: #333333; text-decoration: none;fontSize:18px;  }',
												'a:hover {color: #ff6600; text-decoration: none; }'
											].join(' ')
										}
									},
									{ version: 7 },
									function(htmlOptions) {
										htmlOptions.flashvars.txt = this.innerHTML;
										this.innerHTML = '<span>'+this.innerHTML+'</span>';
										var $alt = $(this.firstChild);
										
										htmlOptions.width = $alt.width();
										$alt.addClass('alt');
										$(this)
											.addClass('flash-replaced')
											.prepend($.fn.flash.transform(htmlOptions));						
									}
								);
				$('#mm li.selected').flash(
									{ 
										src: 'sifr/myria.swf',  
										wmode: 'transparent', 
										height:36,
										flashvars: { 
											css: [
											'a { color: #ff6600; text-decoration: none;fontSize:22px; }',
											'a:hover {color: #ff6600; text-decoration: none; }'
											].join(' ')
										}
									},
									{ version: 7 },
									function(htmlOptions) {
										htmlOptions.flashvars.txt = this.innerHTML;
										this.innerHTML = '<span>'+this.innerHTML+'</span>';
										var $alt = $(this.firstChild);
										
										htmlOptions.width = $alt.width();
										$alt.addClass('alt');
										$(this)
											.addClass('flash-replaced')
											.prepend($.fn.flash.transform(htmlOptions));						
									}
								);
				$('#sm li.selected').flash(
									{ 
										src: 'sifr/myria.swf',  
										wmode: 'transparent', 
										height:24,
										flashvars: { 
											css: [
												'a { color: #ff6600; text-decoration: none;fontSize:18px;  }',
												'a:hover {color: #ff6600; text-decoration: none; }'
											].join(' ')
										}
									},
									{ version: 7 },
									function(htmlOptions) {
										htmlOptions.flashvars.txt = this.innerHTML;
										this.innerHTML = '<span>'+this.innerHTML+'</span>';
										var $alt = $(this.firstChild);
										
										htmlOptions.width = $alt.width();
										$alt.addClass('alt');
										$(this)
											.addClass('flash-replaced')
											.prepend($.fn.flash.transform(htmlOptions));						
									}
								);
			$('h2.box2title').flash(
					{ 
						src: 'sifr/myp.swf', 
						width:90, 
						height:30,
						wmode: 'transparent', 
						flashvars: { 
							css: [
								'* { color: #0000; text-decoration: none;fontSize:20px;fontWeight:bold}',
							].join(' ')
						}
					},
					{ version: 7 },
					function(htmlOptions) {
						htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
						var $alt = $(this.firstChild);

						$alt.addClass('alt');
						$(this)
							.addClass('flash-replaced')
							.prepend($.fn.flash.transform(htmlOptions));						
					}
				);
				
			$('h3.promo').flash(
					{ 
						src: 'sifr/jfr.swf', 
						width:290, 
						height:67,
						wmode: 'transparent', 
						flashvars: { 
							css: [
								'* { color: #FF0000; text-decoration: none;fontSize:24px;fontWeight:bold}',
							].join(' ')
						}
					},
					{ version: 7 },
					function(htmlOptions) {
						htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
						var $alt = $(this.firstChild);

						$alt.addClass('alt');
						$(this)
							.addClass('flash-replaced')
							.prepend($.fn.flash.transform(htmlOptions));						
					}
					

			);
			
			$('h3.promo-it').flash(
					{ 
						src: 'sifr/jfr.swf', 
						width:280, 
						height:26,
						wmode: 'transparent', 
						flashvars: { 
							css: [
								'* { color: #FF0000; text-decoration: none;fontSize:18px;fontWeight:bold;fontStyle:italic}',
							].join(' ')
						}
					},
					{ version: 7 },
					function(htmlOptions) {
						htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
						var $alt = $(this.firstChild);

						$alt.addClass('alt');
						$(this)
							.addClass('flash-replaced')
							.prepend($.fn.flash.transform(htmlOptions));						
					}		
			);
			
			$('div.promo-plain').flash(
					{ 
						src: 'sifr/jfr.swf', 
					
						height:114,
						wmode: 'transparent', 
						flashvars: { 
							css: [
								'* { color: #FF0000;fontSize:24px;lineHeight:20px;}',
							].join(' ')
						}
					},
					{ version: 7 },
					function(htmlOptions) {
						htmlOptions.flashvars.txt = this.innerHTML;
						this.innerHTML = '<span>'+this.innerHTML+'</span>';
						var $alt = $(this.firstChild);

						$alt.addClass('alt');
						$(this)
							.addClass('flash-replaced')
							.prepend($.fn.flash.transform(htmlOptions));						
					}		
			);
					
$('.boxtitle, #mm li, #sm li').css("visibility", "visible")
			});
