
            $(document).ready(function(){
            	if ( $.browser.msie ){
					$('#boxes .window').css('background', 'url(images/en/modal_bg.gif) no-repeat top left');
					$('#boxes .window  p').css('background-color', '#ffffff');
					$('#boxes .window  ul').css('background-color', '#ffffff');
					$('#boxes .window  ul li').css('background-color', '#ffffff');
				}
                //if close button is clicked
                $('#modal_close').click(function(e){
                    e.preventDefault();
                    closeModal();
                });
                
                //if mask is clicked
                $('#mask').click(function(){
                    closeModal();
                });
                $('#overlay').click(function(){
                    closeModal();
                });
            });
            
            function openModal(val){
                var id = $(val);
                
                //Get the screen height and width
                var maskHeight = $('#container').height();
                var maskWidth = $('#container').width();
                
                //Set height and width to mask to fill up the whole screen
                $('#overlay').css({
                    'width': $('#container').width(),
                    'height': $('#container').height(),
                    'left': '0px'
                });
                
                $('#mask').css({
                    'width': $(window).width(),
                    'height': $(document).height()
                });
                
                //transition effect		
                $('#mask').css('opacity', '.05');
                $('#mask').fadeTo("slow", 0.1);
                $('#overlay').css('opacity', '0');
                $('#overlay').fadeTo("slow", 0.8);
                
                //Get the window height and width
                var winH = $('#container').height();
                var winW = $('#container').width();
                
                //Set the popup window to center
                $(id).css('top', (winH / 2 - $(id).height() / 2) - 100);
                $(id).css('left', (winW / 2 - $(id).width() / 2));
                
                //transition effect
                $(id).fadeIn(2000);
                
            }
            
            function closeModal(){
                $('#overlay').hide();
                $('#mask').hide();
                $('#dialog_container').hide();
            }

            var params = {
                allowScriptAccess: "always",
                scale: "noScale",
                wmode: "opaque", 
                allowFullScreen: "true"
            };
            var atts = {
                id: "penny_wall"
            };
            var flashvars = {
                html: "true"
            }
            swfobject.embedSWF("swf/PennyWallIntro.swf", "penny_wall", "100%", "100%", "9", null, flashvars, params);
