function afterFlashReplace(htmlOptions, target){
	//$(target).css('font-size', ((parseInt($(target).css('font-size'))+2)+'px')); 
	 var temp = target.innerHTML;
            htmlOptions.flashvars.txt = target.innerHTML;
            try{target.innerHTML = '<div>'+temp+'</div>';}catch(e){};
            var alt = (target.firstChild);
     			htmlOptions.height = $(alt).height();

            htmlOptions.width = $(alt).width();
            $(alt).addClass('alt');
            $(target).addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));	
					
					
}
	
	
	
$(document).ready(function(){
		
		$(".round").corner("round 1px").parent().css('padding', '1px 1px 2px 1px').corner("round 3px");
		$(".roundbottom").corner("round bottom 1px").parent().css('padding', '0px 1px 2px 1px').corner("round bottom 3px");


	$('h2.flash, h3.flash, h4.flash, div.productservices div.odd div.text h2').flash(
        { 
            src: '/mmi/inc/jfr.swf', 
			wmode: 'Transparent',
            flashvars: { 
                css: [
                    '* { color: #285786; text-align:left;}',
                    'a { color: #285786; text-decoration: none; }',
                    'a:hover { text-decoration: none; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {afterFlashReplace(htmlOptions, this); }
    );
	
	
	$('div.productservices div.even div.text h2').flash(
        { 
            src: '/mmi/inc/jfr.swf', 
			wmode: 'Transparent',
            flashvars: { 
                css: [
                    '* { color: #285786; text-align:right;}',
                    'a { color: #285786; text-decoration: none; }',
                    'a:hover { text-decoration: none; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {afterFlashReplace(htmlOptions, this); }
    );
	
	
	$('div#topmenu').flash(
        { 
            src: '/inc/header.swf', 
						wmode: 'Transparent',
						width: 898,
						height:38,
            flashvars: { 
                label1: "HOME",
								label2: "ABOUT US",
								label3: "GALLERY",
								label4: "PRODUCTS & SERVICES",
								label5: "BEFORE AND AFTER",
								label6: "CONTACT US",
                link1: "/",
								link2: "/about-us",
								link3: "/gallery",
								link4: "/products-services",
								link5: "/beforeafter",
								link6: "/contact-us"
            }
        },
        { version: 7 }
    );
	
	$('div#homeFeature').flash(
        { 
            src: '/inc/imageCycler.swf', 
						wmode: 'Transparent',
						width: 623,
						height:316,
            flashvars: { 
               
            }
        },
        { version: 7 }
    );
		
});


