(function(d){var c=function c(){try{window.console.log.apply(window.console,arguments)}catch(f){}};var a={};d.addflash={id:"addflash",version:"1.0.2",copyright:"Copyright (c) 2010 Ron Valstar",defaults:{debug:!false,id:"addswf"+Math.ceil(Math.random()*999999),file:"style/flash.swf",params:{menu:"false",allowFullScreen:"true",scale:"noscale",salign:"tl",bgcolor:"#FFFFFF",quality:"autolow"},flashvars:{},attributes:{},width:"100%",height:"100%",minWidth:0,maxWidth:9999,minHeight:0,maxHeight:9999,flashVersion:9,getFlashInsert:'<p><a href="http://get.adobe.com/flashplayer/">Get Adobe Flashplayer</a></p>',fnSucces:undefined,fnFail:undefined,fnResize:undefined}};d.fn.extend({addflash:function(h){a=d.extend({},d.addflash.defaults,h);var g=String(location).match(/\?(.*)#*/);if(g){var k=g.pop().split("&");for(var f=0;f<k.length;f++){var j=k[f].split("=");a.flashvars[j[0]]=j.length==2?j[1]:true}}if(location.href.indexOf("flash=false")==-1){if(swfobject.getFlashPlayerVersion().major<a.flashVersion){if(a.getFlashInsert){d("body").prepend(a.getFlashInsert)}if(a.fnFail!==undefined){a.fnFail()}}else{c("addswf: "+a.id);if(d("#"+a.id).length==0){d("body>*").remove();d("body").prepend('<div id="'+a.id+'"></div>')}a.attributes.id=a.id;swfobject.embedSWF(a.file,a.id,a.width,a.height,"9.0.0","expressInstall.swf",a.flashvars,a.params,a.attributes,function(){b();if(a.fnSucces!==undefined){a.fnSucces()}})}var e=false;d.each(["minWidth","maxWidth","minHeight","maxHeight"],function(m,l){if(!e&&a[l]!=d.addflash.defaults[l]){e=true}});if(e){d(window).resize(b)}}return d("#"+a.id)}});function b(j){c("resizeSwf: "+j);var m=d(window).width();var k=d(window).height();var h=Math.min(Math.max(m,a.minWidth),a.maxWidth);var n=Math.min(Math.max(k,a.minHeight),a.maxHeight);var g=Math.max(0.5*(m-h),0);var f=Math.max(0.5*(k-n),0);var i=h<a.maxWidth;var l=n<a.maxHeight;c("iWinW:",m);c("iWinH:",k);c("iNewW:",h);c("iNewH:",n);c("iNewX:",g);c("iNewY:",f);d("#"+a.id).css({width:h,height:n,left:g,top:f});if(!jQuery.browser.mozilla){if(i&&l){d("body").css({overflow:"auto"})}else{if(!i&&!l){d("body").css({overflow:"hidden"})}}}if(a.fnResize!==undefined){a.fnResize(g,f,h,n)}}})(jQuery);
