(function () { var to_flashvars = { img : 'http://static.mansion100.jp/blogparts/l/160.png', smallImage : 'http://static.mansion100.jp/blogparts/s/160.png', largeImage : 'http://static.mansion100.jp/blogparts/l/160.png', bg : '1', name : '私の部屋', swfWidth : '420', swfHeight : '300', swfPath : 'http://mansion100.jp/swf/bp/madori_L.swf', type : 'l', domain : 'http://mansion100.jp/' }; document.write(''); var domain = to_flashvars.domain; var lib = loadLib(), $ = lib.$, jQuery = lib.jQuery, swfobject = lib.swfobject; var $script = $('script[src^="'+domain+'"]:last'); to_flashvars = $.extend({ 'loc' : encodeURIComponent(location.href), 'ref' : encodeURIComponent(document.referrer) }, to_flashvars); $(function ($) { var options = (function () { var param = {}; $.each($script.attr('src').split('#').pop().split('&'), function () { var kv = (this + '').split('='); param[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1]); } ); return $.extend({ }, param); })(); var settings = (function () { var swf_uri = domain + 'swf/bp/'; var name_space = 'mansion100_madorizu_maker'; return { '$script' : $script, 'name_space' : name_space, 'main_swf_path' : to_flashvars.swfPath, 'jack_swf_path' : swf_uri + 'madori_J.swf', 'main_swf_id' : name_space + '_main_external', 'jack_swf_id' : name_space + '_jack_external', 'main_wrap_id' : name_space + '_main_wrap', 'jack_wrap_id' : name_space + '_jack_wrap', 'parts_width' : to_flashvars.swfWidth, 'parts_height' : to_flashvars.swfHeight }; })(); settings.$script.after('
'); (function () { var attr = { 'id' : settings.main_swf_id, 'data' : settings.main_swf_path, 'width' : settings.parts_width, 'height' : settings.parts_height }; var flashvars = $.param($.extend(to_flashvars, { 'name_space' : settings.name_space })); var param = { 'wmode' : 'transparent', 'allowScriptAccess' : 'always', 'scale' : 'noScale', 'flashvars' : flashvars }; swfobject.createSWF(attr, param, settings.main_wrap_id); })(); if (to_flashvars.tyle == 'l') return; window[settings.name_space] = { '$current_word' : undefined, '$hidden_elements' : undefined, 'swf_cache' : {}, 'settings' : settings, 'getScrollTop' : function () { return Math.max(document.body.scrollTop || document.documentElement.scrollTop || 0); }, 'getScrollLeft' : function () { return Math.max(document.body.scrollLeft || document.documentElement.scrollLeft || 0); }, 'hide_elements' : function () { if(!$.browser.msie || ($.browser.msie && $.browser.version >= 7)) return; var main = swfobject.getObjectById(this.settings.main_swf_id); var tags = 'object, embed, iframe, select'; this.$hidden_elements = $(tags) .not(':hidden') .not(main) .css('visibility', 'hidden') ; }, 'visible_elements' : function () { if (!$.browser.msie || !this.$hidden_elements) return; this.$hidden_elements.css('visibility', ''); }, 'get_swf' : function (swf_id, method, callback) { if (this.swf_cache[swf_id]) callback.call(this, this.swf_cache[swf_id]); var max_retry = 30; var self = this; (function () { if (!max_retry--) return; var swf = swfobject.getObjectById(swf_id); if (!swf || !swf[method]) return setTimeout(arguments.callee, 50); self.swf_cache[swf_id] = swf; callback.call(self, swf); })(); }, 'set_window_resize' : function (jack_swf) { var self = this; var resize = 'resize.' + this.settings.name_space; $(window).bind(resize, function () { var swf_id = self.settings.jack_swf_id; self.get_swf(swf_id, 'window_resize', function (ex) { var width = Math.floor($(window).width()); var height = Math.floor($(window).height()); ex.window_resize(width, height); }); }); }, 'jack_swf' : function () { this.hide_elements(); $(document.body).append('
'); var self = this; (function () { var attr = { 'id' : settings.jack_swf_id, 'data' : settings.jack_swf_path, 'width' : '100%', 'height' : '100%', 'style' : 'position:fixed;bottom:0;left:0;margin:0;' }; var flashvars = $.param($.extend(to_flashvars, { 'img' : to_flashvars.largeImage, 'window_width' : $(window).width(), 'window_height' : $(window).height(), 'name_space' : settings.name_space })); var param = { 'wmode' : 'transparent', 'allowScriptAccess' : 'always', 'scale' : 'noScale', 'flashvars' : flashvars }; swfobject.createSWF(attr, param, settings.jack_wrap_id); self.get_swf(settings.jack_swf_id, 'window_resize', self.set_window_resize); var swf = swfobject.getObjectById(settings.jack_swf_id); if (!swf.style.setExpression) return; $(swf).css({'position' : 'absolute', 'bottom' : '' }); swf.style.setExpression('behavior', 'style.top = (document.body.scrollTop || document.documentElement.scrollTop) + "px"'); })(); }, 'clear_swf' : function () { var self = this; var resize = 'resize.' + this.settings.name_space; var id_set = '#'+self.settings.jack_swf_id + ', #'+self.settings.jack_wrap_id; var clear_func = function () { self.visible_elements(); $(id_set).remove(); $(window).unbind(resize); }; ($.browser.msie && $.browser.version <= 6) ? clear_func() : setTimeout(clear_func, 0); } }; }); function loadLib() { /* SWFObject v2.1 Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis This software is released under the MIT License */ var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("