
(function(){var global=this;global.NUI={};})();(function(){var global=this;global.NUI.Cycler=function(){var store={cycle_counter:0,cycle_time:15000,cycle_slide_speed:"slow",item_total:0,items_displayed:null,selector_item_holder:"",selector_item:""};var init=function(selector_item_holder,selector_item,items_displayed){if($(selector_item_holder).length===0){return;}
store.selector_item_holder=selector_item_holder;store.selector_item=selector_item;store.items_displayed=items_displayed;store.item_total=$(store.selector_item_holder+" "+store.selector_item).length;if(store.items_displayed>=2){store.items_displayed=2;}else{store.items_displayed=1;}
if(store.items_displayed==1){$(store.selector_item_holder+" "+store.selector_item).eq(1).hide();}
if(store.item_total>store.items_displayed){window.setInterval(function(){run.cycle();},store.cycle_time);}};var run={cycle:function(){if(store.cycle_counter>(store.item_total-store.items_displayed)-1){run.cycle_reset();}else{var item,item_inner;$(store.selector_item_holder+" "+store.selector_item).eq(store.cycle_counter).slideUp(store.cycle_slide_speed);$(store.selector_item_holder+" "+store.selector_item).eq(store.cycle_counter+store.items_displayed).slideDown(store.cycle_slide_speed);store.cycle_counter++;}},cycle_reset:function(){$(store.selector_item_holder+" "+store.selector_item).eq(store.item_total-1).slideUp(store.cycle_slide_speed);if(store.item_total>3&&store.items_displayed>1){$(store.selector_item_holder+" "+store.selector_item).eq(store.item_total-2).slideUp(store.cycle_slide_speed);}
store.cycle_counter=0;$(store.selector_item_holder+" "+store.selector_item).eq(0).slideDown(store.cycle_slide_speed);if(store.item_total>3&&store.items_displayed>1){$(store.selector_item_holder+" "+store.selector_item).eq(1).slideDown(store.cycle_slide_speed);}}};return{init:init};}();})();(function(){var global=this;global.NUI.Fader=function(){var store={selector_fadeitems:".tableStyle-sslmatrix",selector_faderbutton:".fader-button",fade_time:"fast"};var init=function(selector_fadeitems,selector_faderbutton){store.selector_fadeitems=selector_fadeitems;store.selector_faderbutton=selector_faderbutton;$(store.selector_fadeitems).hide();$(store.selector_fadeitems).eq(0).show();$(store.selector_faderbutton).click(function(){run.fadeIn($(this).attr("rel"));return false;});};var run={fadeIn:function(element){$(store.selector_fadeitems+":visible").fadeOut(store.fade_time,function(){$("#"+element).fadeIn(store.fade_time);});}};return{init:init};}();})();(function(){var global=this;global.NUI.FeedReader=function(){var store={feed_type:"",feed_url:"",feed_display_max:"",feed_display_counter:0,selector_blog:"",selector_container:"",selector_template:"",entry_template:"",status:"init",timeout:20000};var init=function(options){store.feed_type=options.feed_type;store.feed_url=options.feed_url;store.feed_display_max=options.feed_display_max;store.selector_blog=options.blog_css;store.selector_container=options.container_css;store.selector_template=options.template_css;store.entry_template=$(store.selector_container+" "+store.selector_template).clone();$(store.selector_container+" "+store.selector_template).remove();var loading_img_tag='<img src="'+options.img_loader+'" style="'+options.img_loader_styles+'" alt="Loading blog feed" />';$(store.selector_blog+" "+store.selector_container).append(loading_img_tag);$(store.selector_blog).fadeIn("fast");run.getRss();window.setTimeout(function(){if(store.status!="loaded"){$(store.selector_blog).fadeOut("slow");}},store.timeout);};var utils={stripCdataTags:function(text){text=text.replace("<![CDATA[","");text=text.replace("]]>","");return text;}}
var run={getRss:function(){if(store.feed_type.match(/^rss/)){feed_type="rss";}else{feed_type=store.feed_type;}
$.ajax({type:"GET",url:store.feed_url+"?feed="+feed_type,success:function(data){run.displayEntries(data)}});},displayEntries:function(feed){if(store.status!="timeout"){store.status="loaded";$(store.selector_blog+" "+store.selector_container+" img").hide();var entries=run.parseFeed(feed);$.each(entries,function(){var entry=$(store.entry_template).clone();$(entry).removeClass("blank").addClass("hidden");if(this.author){$(".author small",entry).text(this.author+", "+this.pub_date);}else if(this.pub_date){$(".author small",entry).text(this.pub_date);}else{$(".author small",entry).text("");}
$(".title a",entry).text(this.title);$(".title a",entry).attr("href",this.href);$(store.selector_blog+" "+store.selector_container).append(entry);store.feed_display_counter++;if(store.feed_display_counter>=store.feed_display_max){return false;}});$(store.selector_blog+" "+store.selector_container+" .entry").fadeIn("normal").removeClass("hidden");}},parseFeed:function(feed){entries=[];if(store.feed_type=="rss_0_92"){$.each($("item",feed),function(){var pub_date=($("pubDate",this).text()).split(" ");var title=utils.stripCdataTags($("title",this).text());var href=$("link",this).text();entry={author:null,title:title,href:href};entries.push(entry);});}else if(store.feed_type=="atom"){$.each($("entry",feed),function(){var author=$("name",this).text();var pub_date=$("published",this).text();var year=pub_date.substr(0,4);var month=pub_date.substr(5,2);var day=pub_date.substr(8,2);var title=utils.stripCdataTags($("title",this).text());var href=$("link",this).attr("href");entry={author:author,pub_date:day+"/"+month+"/"+year,title:title,href:href};entries.push(entry);});}
return entries;}};return{init:init};}();})();(function(){var global=this;global.NUI.SlideMenu=function(){var store={};var init=function(){$("#navigation a").attr("title","");$("#navigation > li:has(ul)").bind("mouseenter",function(){$("#navigation li ul:animated").stop().attr("style","");var menu_id=$(this).find("a:first-child").attr("rel");$("#"+menu_id).slideDown(250);});$("#navigation > li:has(ul)").bind("mouseleave",function(){$("#navigation li ul:animated").stop().attr("style","");var menu_id=$(this).find("a:first-child").attr("rel");$("#"+menu_id).hide();});};return{init:init};}();})();(function(){var global=this;global.NUI.SlidingPanel=function(){var store={init_args:null,location_hash:"",slide_duration:500,slide_panel_container:"#pane-container",slide_button_container:"#toolbar",pattern_pane_id:/-pane$/};var init=function(init_args){if(init_args){store.init_args=init_args;}
if(store.init_args){if(store.init_args.on_button){$("#slidingpanels #toolbar "+store.init_args.on_button).addClass("on");}}
store.location_hash=document.location.hash;if(store.location_hash.match(store.pattern_pane_id)){first_pane_id=$(store.slide_panel_container+" > div").eq(0).attr("id");document.location="#"+first_pane_id;}
$(store.slide_panel_container).css({"position":"relative"});utils.activate_buttons();if(store.location_hash.match(store.pattern_pane_id)){utils.scroll_to_pane(store.location_hash);}};var utils={activate_buttons:function(){$(store.slide_button_container+" a").click(function(){$('#toolbar a').removeClass("on");$(this).addClass("on");var pane=$("#"+this.href.substr(this.href.lastIndexOf("#")+1));var edge_slider_left=utils.get_left_offset($(store.slide_panel_container));var edge_panel_left=utils.get_left_offset(pane);var new_left_offset=edge_slider_left-edge_panel_left;$(store.slide_panel_container).animate({"left":new_left_offset},store.slide_duration);return false;});},get_left_offset:function(element_ref){return $(element_ref).offset().left;},scroll_to_pane:function(pane_id){if(pane_id.match(store.pattern_pane_id)){var toolbar_button_id=pane_id.replace("-pane","-tab");$(toolbar_button_id+" a").click();}}};return{init:init};}();})();(function(){var global=this;global.NUI.TabContainer=function(){var init=function(){var tabContainers=$('.tabcontainer .tabcontainer-tabdata');tabContainers.hide().filter(':first').show();$('.tabcontainer .tabcontainer-tabs a').hover(function(){var hoverclass=$(this).attr('id');$(this).parents("ul:nth(0)").addClass(hoverclass);},function(){$(this).parents("ul:nth(0)").removeClass('vhover , thover , ghover');});$('.tabcontainer .tabcontainer-tabs a').click(function(){var selectedclass=$(this).attr('class');tabContainers.fadeOut("slow");tabContainers.filter(this.hash).fadeIn("slow");$(this).parents("ul:nth(0)").removeClass();$(this).parents("ul:nth(0)").addClass(selectedclass);return false;}).filter(':first');};var utils={};return{init:init};}();})();(function(){var global=this;global.NUI.ToolTip=function(){var store={tooltip_class:".tooltip",tooltip_popup_class:".tooltip_popup",ani_duration:50};var init=function(){utils.activate_tooltips();};var utils={activate_tooltips:function(){$(store.tooltip_class).mouseover(function(){$(store.tooltip_popup_class).hide();var tooltip_content_id=$(this).attr("rel");$("#"+tooltip_content_id).fadeIn(store.ani_duration);$(this).mousemove(function(e){$("#"+tooltip_content_id).css("top",e.pageY+10+"px");$("#"+tooltip_content_id).css("left",e.pageX+20+"px");});});$(store.tooltip_class).mouseout(function(){$(store.tooltip_popup_class).hide();});}};return{init:init};}();})();$(document).ready(function(){$('#extra-features').hide();$('#hosting-2010 .info').hide();$('.hf-view').click(function(){$('#extra-features').slideToggle(1);$('.hf-view').text($(this).text()=='View All Features'?'Hide General Features':'View All Features');return false;});$('a.feat-info').click(function(){var buttonid=$(this).attr('rel');$(this).parent().parent().parent().find("#"+buttonid).slideToggle(0);$(this).parent().parent().toggleClass("bord-bot");return false;});$('dl.webapps dd').hide();$('#view-list , dl.webapps dt').click(function(){$('dl.webapps dd').slideToggle(500);$('#view-list').text($('#view-list').text()=='View entire list of FREE scripts and Installs'?'Hide List':'View entire list of FREE scripts and Installs');return false;});});