function writeFlashElement(d,c,e,f){var b='" height="',a=document;a.write('<span onmousedown="window.location.href=&#39;'+f+'&#39;">');a.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+d.toString()+b+c.toString()+'">');a.write('<param name="movie" value="'+e+'">');a.write('<param name="quality" value="high">');a.write('<param name="wmode" value="transparent">');a.write('<embed src="'+e+'" WMODE="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+d.toString()+b+c.toString()+'"></embed></object>');a.write("</span>")}jQuery.fn.center=function(){var a=this,b=$(window);a.css("position","absolute");a.css("top",(b.height()-a.height())/2+b.scrollTop()+"px");a.css("left",(b.width()-a.width())/2+b.scrollLeft()+"px");a.css("opacity",".7");return a};function pageBackSwitch(b){var a="background-image";if(b=="")$("body").css(a,"url('/App_Themes/Glossy09/PageBack.png')");else $("body").css(a,"url('/App_Themes/Glossy09/PageBack"+b+".png')")}function refreshGrids(){$(".gp3-data-grid  div:even").addClass("gp3-data-grid-row-even")}var hoveringTestimonials=false,hoveringSpotlights=false,SEL_SPOTLIGHT_RIBBON_CONTAINER="#gp-spotlight-ribbon-container",viewingAllT=false,MAX_AJAX_REQ=4,CurrentAjaxReq=0;function getSpotlightContainer(){var a="#gp-spotlight-ribbon-container";if($(a)!=null)return $(a)}function loadTestimonial(){var b="loadTestimonial()",a="#testimonial";if(!hoveringTestimonials&&!viewingAllT){$(a).hide();$.get("/Services/Testimonial.aspx",function(c){$(a).html(c);$(a).fadeIn(1e3);CurrentAjaxReq=CurrentAjaxReq+1;CurrentAjaxReq<MAX_AJAX_REQ&&setTimeout(b,15000)})}else CurrentAjaxReq<MAX_AJAX_REQ&&setTimeout(b,15000)}function loadAllTestimonials(){var a="#testimonial";if($(a)!=null){$(a).html("");$(a).hide();var b="";viewingAllT=true;$.ajax({type:"GET",url:"PubPageControls/Testimonials.xml",dataType:"xml",success:function(c){$("Testimonial",c).each(function(){var c=$(this).find("Body").text(),a=$(this).find("ByLine").text();b+="<div style='padding: 2px;'>"+c+"<div style='padding-top: 2px; text-align: right;'>- "+a+"</div></div>"});$(a).html(b);CurrentAjaxReq=CurrentAjaxReq+1}});$(a).fadeIn(1e3)}}function fadeSpotlights(){$(SEL_SPOTLIGHT_RIBBON_CONTAINER+" div.gp3-spotlight-item").each(function(){$(this).fadeOut(1e3)})}function loadSpotlights(){var c="loadSpotlights()",b="fadeSpotlights()";if($(SEL_SPOTLIGHT_RIBBON_CONTAINER)!=null&&$(SEL_SPOTLIGHT_RIBBON_CONTAINER).html()!=null&&$(SEL_SPOTLIGHT_RIBBON_CONTAINER)!=undefined)if(!hoveringSpotlights){var d=500,a=-1e3,e="";getSpotlightContainer().html("");$.get("/Services/Spotlight.aspx",{ret:"4"},function(b){getSpotlightContainer().html(getSpotlightContainer().html()+b);$(SEL_SPOTLIGHT_RIBBON_CONTAINER+" div.gp3-spotlight-item").each(function(){$(this).hide();a=a+d;$(this).fadeIn(a);CurrentAjaxReq=CurrentAjaxReq+1})});if(CurrentAjaxReq<MAX_AJAX_REQ){setTimeout(b,58000);setTimeout(c,6e4)}}else if(CurrentAjaxReq<MAX_AJAX_REQ){setTimeout(b,32500);setTimeout(c,33500)}}jQuery(document).ready(function(){var q="#testimonial",h="gp3-shadow-boxer",g="gp-search-box-focused",f="gp-search-box",c=".gp-search-box",e="gp-toolbar-button-hover",p="#gp-why-body",o="#gp-why-header",b="gp-toolbar-button-active",a="gp-toolbar-button",n="#gp-create-now-button",m="#gp-toolbar-button-faq",l="#gp-toolbar-button-pricing",k="#gp-toolbar-button-support",j="#gp-toolbar-button-features",d="/NewGuild.aspx",i="#gp-toolbar-button-new-group",r="#gp-toolbar-button-home";$(r).click(function(){window.location="/Default.aspx"});$(i).click(function(){window.location=d});$(j).click(function(){window.location="/Features.aspx"});$(k).click(function(){window.location="/Support.aspx"});$(l).click(function(){window.location="/Pricing.aspx"});$(m).click(function(){window.location="/FAQ.aspx"});$("#gp-toolbar-button-guilds").click(function(){window.location="/Search.aspx"});$(n).click(function(){window.location=d});switch(pageIdent){case "Home":$(r).removeClass(a).addClass(b);break;case "New Guild":$(i).removeClass(a).addClass(b);break;case "Guild Hosting Features":$(j).removeClass(a).addClass(b);break;case "GuildPortal Support":$(k).removeClass(a).addClass(b);break;case "Guild Hosting Pricing":$(l).removeClass(a).addClass(b);break;case "Frequently Asked Questions":$(m).removeClass(a).addClass(b)}jQuery(o).hide();jQuery(p).hide();jQuery(".gp-toolbar-button").hover(function(){jQuery(this).removeClass(a).addClass(e)},function(){jQuery(this).removeClass(e).addClass(a)});jQuery(c).focus(function(){jQuery(this).removeClass(f).addClass(g)});jQuery(c).blur(function(){jQuery(this).removeClass(g).addClass(f)});$(c).val()==""&&$(c).val("Search Guilds...");jQuery(n).hover(function(){jQuery(this).attr("src","/App_Themes/Glossy09/GpCreateNowHover.png")},function(){jQuery(this).attr("src","/App_Themes/Glossy09/GpCreateNow.png")});jQuery(o).fadeIn(1e3);jQuery(p).fadeIn(3500);$(c).bind("keypress",function(a){var b=a.charCode||a.keyCode;if(b==13){window.location="/Search.aspx?SearchText="+$(this).val();return false}else return true});$(c).watermark();$(".gp-input-text").watermark();$("input[type=text],input[type=password]").focus(function(){$(this).addClass(h)}).blur(function(){$(this).removeClass(h)});if(pageIdent=="Home")if($(q)!=null){$(q).hover(function(){hoveringTestimonials=true},function(){hoveringTestimonials=false});loadTestimonial()}if($(SEL_SPOTLIGHT_RIBBON_CONTAINER)!=null){getSpotlightContainer().hover(function(){hoveringSpotlights=true},function(){hoveringSpotlights=false});loadSpotlights()}});(function(a){var i="facebox_overlayBG",c="#facebox_overlay",d=false,h="close.facebox",k="keydown.facebox",f="#facebox",j="#facebox .body",e="#facebox .content",g="#facebox .loading",b=true;a.facebox=function(b,c){a.facebox.loading();if(b.ajax)m(b.ajax);else if(b.image)l(b.image);else if(b.div)n(b.div);else if(a.isFunction(b))b.call(a);else a.facebox.reveal(b,c)};a.extend(a.facebox,{settings:{opacity:0,overlay:b,loadingImage:"Cms/addins/facebox/loading.gif",closeImage:"Cms/addins/facebox/closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content">                 </div>                 <div class="footer">                   <a href="#" class="close">                     <img src="Cms/addins/facebox/closelabel.gif" title="close" class="close_image" />                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},loading:function(){p();if(a(g).length==1)return b;u();a(e).empty();a(j).children().hide().end().append('<div class="loading"><img src="'+a.facebox.settings.loadingImage+'"/></div>');a(f).css({top:s()[1]+r()/10+50,left:385.5}).show();a(document).bind(k,function(c){c.keyCode==27&&a.facebox.close();return b});a(document).trigger("loading.facebox")},reveal:function(c,b){a(document).trigger("beforeReveal.facebox");b&&a(e).addClass(b);a(e).append(c);a(g).remove();a(j).children().fadeIn("normal");a(f).css("left",a(window).width()/2-a("#facebox table").width()/2);a(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){a(document).trigger(h);return d}});a.fn.facebox=function(e){p(e);function c(){a.facebox.loading(b);var c=this.rel.match(/facebox\[?\.(\w+)\]?/);if(c)c=c[1];n(this.href,c);return d}return this.click(c)};function p(d){if(a.facebox.settings.inited)return b;else a.facebox.settings.inited=b;a(document).trigger("init.facebox");q();var e=a.facebox.settings.imageTypes.join("|");a.facebox.settings.imageTypesRegexp=new RegExp("."+e+"$","i");d&&a.extend(a.facebox.settings,d);a("body").append(a.facebox.settings.faceboxHtml);var c=[new Image,new Image];c[0].src=a.facebox.settings.closeImage;c[1].src=a.facebox.settings.loadingImage;a(f).find(".b:first, .bl, .br, .tl, .tr").each(function(){c.push(new Image);c.slice(-1).src=a(this).css("background-image").replace(/url\((.+)\)/,"$1")});a("#facebox .close").click(a.facebox.close);a("#facebox .close_image").attr("src",a.facebox.settings.closeImage)}function s(){var a,b;if(self.pageYOffset){b=self.pageYOffset;a=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}else if(document.body){b=document.body.scrollTop;a=document.body.scrollLeft}return [a,b]}function r(){var a;if(self.innerHeight)a=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body)a=document.body.clientHeight;return a}function q(){var b=a.facebox.settings;b.loadingImage=b.loading_image||b.loadingImage;b.closeImage=b.close_image||b.closeImage;b.imageTypes=b.image_types||b.imageTypes;b.faceboxHtml=b.facebox_html||b.faceboxHtml}function n(b,c){if(b.match(/#/)){var e=window.location.href.split("#")[0],d=b.replace(e,"");a.facebox.reveal(a(d).clone().show(),c)}else if(b.match(a.facebox.settings.imageTypesRegexp))l(b,c);else m(b,c)}function l(d,c){var b=new Image;b.onload=function(){a.facebox.reveal('<div class="image"><img src="'+b.src+'" /></div>',c)};b.src=d}function m(c,b){a.get(c,function(c){a.facebox.reveal(c,b)})}function o(){return a.facebox.settings.overlay==d||a.facebox.settings.opacity===null}function u(){if(o())return;a("facebox_overlay").length==0&&a("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');a(c).hide().addClass(i).css("opacity",a.facebox.settings.opacity).click(function(){a(document).trigger(h)}).fadeIn(200);return d}function t(){if(o())return;a(c).fadeOut(200,function(){a(c).removeClass(i);a(c).addClass("facebox_hide");a(c).remove()});return d}a(document).bind(h,function(){a(document).unbind(k);a(f).fadeOut(function(){a(e).removeClass().addClass("content");t();a(g).remove()})})})(jQuery);(function(a){a.fn.watermark=function(c){var b="password",d={color:"#999",psw:b},c=a.extend(d,c);return this.each(function(){var d="isWatermark",f="color",h="baseColor",e="base",g=a(this),i=g.parents("form");i.length!=0&&i.bind("submit",function(){g.val()==g.attr(e)&&g.val("")});g.attr(h,g.css(f));g.attr("type")==b&&g.val(c.psw);!g.attr(e)&&g.attr(e,g.val());g.attr(d,1);g.css(f,c.color);g.bind("focus",function(){var b=a(this);b.val()!=b.attr(e)&&b.val()!=""&&b.attr(d,0);if(b.attr(d)==1){b.val("");b.attr(d,0);b.css(f,b.attr(h))}}).bind("blur",function(){var b=a(this);b.val()!=b.attr(e)&&b.val()!=""&&b.attr(d,1);if(b.attr(d)==0){b.css(f,c.color);if(b.val()==""){b.attr(d,1);b.val(b.attr(e))}}})})}})(jQuery);
