// onverse javascript compiled Tue Feb 23 19:17:05 2010 GMT



// source: ../www.onverse.com/Website/web/html/widget/myonverse/blogWidgets.js


//-------------------------------------------------------------------
var BlogWidget = IListWidget.extend({
	title: 'Journal',
	links: '<a href="javascript:nil()" onclick="BlogWidget.manage()">manage journal</a>',
	renderItem: function(jq, obj, id) {
	    var sb = new StringBuilder();
	    sb.appendFormat('<h2>');
	    sb.appendFormat('   {0}', obj.Title);
	    sb.appendFormat('   <a href="javascript:nil()" onclick="BlogWidget.view(this, \'{0}\')">read</a>', id);
	    sb.appendFormat('</h2>');
        sb.appendFormat('<br/>');
	    jq.append(sb.build());
	},
	renderEmpty: function(jq) {
		jq.append('<span>You have never posted a journal entry.</span><br/><br/>');
	}
});

BlogWidget.init = function(jq) {
	OnverseApp.AsyncData.myProfile(function(res) {
	   if (res && res.success) {
			BlogWidget._init(jq, res.value.blogs);
		}
	});
};

BlogWidget._init = function(jq, list) {
    var sb = new StringBuilder();
    for (var id in list) {
	    var obj = list[id];
	    sb.appendFormat('<h2>');
	    sb.appendFormat('   {0}', obj.Title);
	    sb.appendFormat('   <a href="javascript:nil()" onclick="BlogWidget.view(this, \'{0}\')">read</a>', id);
	    sb.appendFormat('</h2>');
	    sb.appendFormat('<br/>');
    }
    jq.append(sb.build());
};

// display the blog text
BlogWidget.view = function(caller, id) {
	var blog = BlogWidget.getItemByID(id);  
	if (blog == null) alert('Cannot find journal entry ' + id);  
    var jq = $(caller);
    if (jq.html() == 'read') {
        jq.html('hide');
        var sb = new StringBuilder();
        sb.appendFormat('<div class="blog" id="blog_{0}">', id);
        sb.appendFormat(blog.Body);
        sb.appendFormat('</div>');
        jq.parent().append(sb.build());
        $('#blog_' + id).hide().slideDown();
    }
    else {            
        jq.html('read');          
        var jqb = $('#blog_' + id);
        jqb.slideUp('slow', function() { jqb.remove(); });
    }
}

// open blog manager
BlogWidget.manage = function() {
	var args = { title: 'Journal', width: '650' };
	app.openWindow('/web/html/window/profileBlog.htm', args, function() {
        BlogWidget.build(app.userProfile.blogs);	        
	});	
};
// builds the blog list
BlogWidget.build = function(blogs) {
    ajaxWidget('Loading journal list widget', '/web/html/widget/myonverse/blogs/blogList.htm',
        function(html) {
            $('#blogTableContainer').html(html);
	        var sb = new StringBuilder();
	        for (var i in blogs) {
	            var blog = blogs[i];
		        sb.appendFormat('<tr onclick="BlogWidget.editBlog(this, \'{0}\')">', blog.ID);
		        sb.appendFormat('<td>{0}</td><td>{1}</td>', blog.DatePosted, blog.Title);
		        sb.appendFormat('</tr>')
	        }		            
	        $('#blogList').html(sb.build());
        	$('#blogTable').flexigrid({ height: 150,  singleSelect: true } );
        }
    );
};
// closes any open edit panels
BlogWidget.cancel = function(caller) {
	PhotoAlbumsWidget.editItem = null;
	var wnd = $(caller).parents('.containerPlus'); 
	wnd.find('#blog-edit').slideUp();
	wnd.find('#blog-new').slideUp();
};
BlogWidget.refresh = function(caller) {
	ajax('Refreshing journal entry list', 'blog', 'List', {u: app.username},
	    function(res) {
	        if (res.success) {
                BlogWidget.build(res.value);                
            }
            BlogWidget.cancel(caller);  
            app.reloadProfile(); 
	    }
	);
};

BlogWidget.getItemByID = function(id) {
	for (var i in app.userProfile.blogs) {
	    if (i == id) {
	        return app.userProfile.blogs[i];
	    }
	}
	for (var i in app.profile.blogs) {
	    if (i == id) {
	        return app.profile.blogs[i];
	    }
	}
	return null;
}

// opens the edit blog panel
BlogWidget.editBlog = function(caller, id) {
	BlogWidget.editItem = id;	
	var blog = BlogWidget.getItemByID(id);
	$(caller).parents('.containerPlus')
	    .find('#blog-new').slideUp().end()	
	    .find('#blog-edit').slideDown()
		    .find('#id').val(id).end()
		    .find('#title').val(blog.Title).focus().end()
		    .find('#body').val(blog.Body).end()
		    .end()
		;
};
// saves changes to a blog
BlogWidget.save = function(caller, id) {
    var wnd = $(caller).parents('.containerPlus');
	var form = wnd.find('#blog-edit');	
    var args = {
		id: form.find('#id').val(),
		t: form.find('#title').val(),
		m: form.find('#body').val()
    };        
    ajax('Saving journal entry changes', 'blog', 'Post', args,
        function(res) {        
            BlogWidget.refresh(caller);
        }
    );
};
// opens the edit blog panel
BlogWidget.newBlog = function(caller) {
	BlogWidget.editItem = null;
	var blog = { title: 'Testing Edit' };    
	var wnd = $(caller).parents('.containerPlus'); 
	wnd.find('#blog-edit').slideUp();	
	wnd.find('#blog-new').slideDown()
		.find('#title').val(blog.Title).focus().end()
		;
};// creates a new blog
BlogWidget.saveNewBlog = function(caller) {
    var wnd = $(caller).parents('.containerPlus');
	var form = wnd.find('#blog-new');	
    var args = {
		t: form.find('#title').val(),
		m: form.find('#body').val()
    };        
    ajax('Creating new journal entry', 'blog', 'Post', args,
        function(res) {
            BlogWidget.refresh(caller);
        }
    );
};
// deletes a blog
BlogWidget.deleteSelected = function(caller) {
	if (!BlogWidget.editItem) {
		alert('Please select a journal entry to delete first');
	}
	else {
		if (confirm('Are you sure you want to delete journal entry ' + BlogWidget.editItem + '?')) {
		    var args = { id: BlogWidget.editItem }; 
		    ajax('Deleting journal entry', 'blog', 'Remove', args, function() {
					BlogWidget.refresh(caller);		    		    
		    });
		}
	}
}


// source: ../www.onverse.com/Website/web/html/widget/home/blog.htm.js


// list of news articles
var newsArchives = [
    { text: 'Patch Notes Beta 0.5', date: 'September 18, 2009', link: '20090918' },
    { text: 'Patch Notes Beta 0.4', date: 'August 5, 2009', link: '20090805' },
    { text: 'Patch Notes Beta 0.3', date: 'July 3, 2009', link: '20090703' },
    { text: 'Patch Notes Beta 0.2', date: 'June 25, 2009', link: '20090625' },
    { text: 'Beta Launch', date: 'June 15, 2009', link: '20090615' },
    { text: 'Beta Launch Date Announced', date: 'May 21, 2009', link: '20090521' },
    { text: 'Media Update', date: 'April 10, 2009', link: '20090406' },
    { text: 'New Social Network', date: 'March 20, 2009', link: '20090320' }
];

function getNewsData(link) {
    for (var i = 0; i < newsArchives.length; i++) {
        if (newsArchives[i].link == link) {
            return newsArchives[i];
        }
    }
    return null;    
}

function getNewsUrl() {
    var url = '' + location.href.toString();
    url = url.replace(/index\.html/i, '');
    var index = url.lastIndexOf('/');
    if (index > -1) {
        url = url.substring(index + 1);
        if (url == 'News') url = '';
    }
    else {
        url = '';
    }
    
    if (url == '') {
        url = newsArchives[0].link;
    }
    return url;
}


//-------------------------------------------------------------------
var OnverseBlogWidget = IObjectWidget.extend({
    title: 'News',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
		OnverseBlogWidget.load(null, jq);
    }
});

OnverseBlogWidget.load = function(url, jq) {
    url = url ? url : getNewsUrl();
    OnverseBlogWidget.lasturl = url;
    ajaxWidget(
		'News', 
		'web/html/widget/home/news-archives/' + url + '.htm',
        function(html) { $('#main').html(removeSEO(html)); }
    	);
};

OnverseBlogWidget.go = function(url) {
    $.history.load('/Home/News/' + url);
};

var OnverseNewsArchiveWidget = IObjectWidget.extend({
	title: 'Archives',
	renderItem: function(jq, obj, id) {	    
	    var sb = new StringBuilder();
	    for (var i in newsArchives) {
	        var item = newsArchives[i];
            sb.appendFormat('<h2><a href="#/Home/News/{0}" onclick="OnverseBlogWidget.go(\'{1}\');">{2}</a><br/><small>{3}</small></h2>', item.link, item.link, item.text, item.date);
        }
        jq.append(sb.build());
	}		
});






// source: ../www.onverse.com/Website/web/html/widget/home/competition-list.htm.js


//-------------------------------------------------------------------
var CompetitionListWidget = IObjectWidget.extend({
    title: '',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        CompetitionListWidget.jq = jq;
        ajaxWidget('Loading Competition List', 'web/html/widget/home/competition-list.htm',
            function(html) {
                jq.html(html);
                CompetitionListWidget.showSubmissions();
            }
        );
    }
});

CompetitionListWidget.showSubmissions = function() {
    ajax('Loading Submissions', 'blog', 'YouTubeList', {}, function(res) {
        var sb = new StringBuilder();
		var id = 0;
        for (var i in res.value) {
			id++;
            var item = res.value[i];
            var code = item.Url;
            var imglink = 'http://img.youtube.com/vi/' + code + '/1.jpg';
            var playlink = 'http://www.youtube.com/watch?v=' + code;            
            sb.appendFormat(
                '<div style="width: 145px; overflow: hidden;">' +
                '<table>' +
                '<td width="65" style="cursor:pointer">' +
                '   <a href="{3}" target="youtube"><img src="{0}" id="img' + id + '" width="65" border="0" /></a>' +
                '</td>' +
                '<td>' +
                '   <b>{1}</b><br />{2}' +
                '</td>' +
                '</table>' +
                '</div>',
                imglink, item.Username, getDatePart(item.DatePosted), playlink
                );
        }
        CompetitionListWidget.jq.find('#links').html(sb.build());
        CompetitionListWidget.animate();
    });
}

CompetitionListWidget.submit = function(ref) {
    if (app.username == null) {
        alert('You must be logged in to submit videos.');
        return;
    }

    var jq = $(ref).parents('div');
    var url = jq.find('#url').val();
    var youtube = parseYouTubeLink(url);
    if (youtube == null) {
        alert('Link must be from YouTube.com');
    }
    else {
        ajax('Saving Submission', 'blog', 'YouTubePost', { url: youtube }, function(res) {
            alert('Video recieved.  Thanks for your participation!');
            jq.find('#url').val('');
            CompetitionListWidget.showSubmissions();
        });
    }
};

CompetitionListWidget.animate = function() {
	
	// create image container if needed
	if (!CompetitionListWidget.imageset) {
		CompetitionListWidget.imageset = {};
	}
	
	// set next frame
    if (!CompetitionListWidget.animFrame) {
		CompetitionListWidget.animFrame = 1;
	}
	else if (CompetitionListWidget.animFrame >= 3) {
        CompetitionListWidget.animFrame = 1;
    }
    else {
        CompetitionListWidget.animFrame++;
    }

	// update images
    var count = 0;
    CompetitionListWidget.jq.find('#links').find('img').each(function() {
        count++;

		// load images on demand
		if (CompetitionListWidget.imageset[this.id] == null) {
			var images = new Array();			
			for (var i = 1; i <= 3; i++) {
				images[i] = new Image();
		        var baseurl = this.src.substring(0, this.src.lastIndexOf('/') + 1);
				images[i].src = baseurl + i + '.jpg';
			}
			CompetitionListWidget.imageset[this.id] = images;
		}

        this.src = CompetitionListWidget.imageset[this.id][CompetitionListWidget.animFrame].src;
    });
    if (count > 0) {
        setTimeout(CompetitionListWidget.animate, 1000);
    }
};




// source: ../www.onverse.com/Website/web/html/widget/home/competition.htm.js


//-------------------------------------------------------------------
var CompetitionWidget = IObjectWidget.extend({
    title: '',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading Competition', 'web/html/widget/home/competition.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );
    }
});







// source: ../www.onverse.com/Website/web/html/widget/home/crew.htm.js



//-------------------------------------------------------------------
var CrewWidget = IObjectWidget.extend({
    title: 'The Crew',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading Crew', 'web/html/widget/home/crew.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );        
    }
});


// source: ../www.onverse.com/Website/web/html/widget/home/download.htm.js


//-------------------------------------------------------------------
var DownloadWidget = IListWidget.extend({
    title: 'Download Onverse',
    style: WidgetStyles.plain,	
	renderItem: function(jq, obj, id) {
	    ajaxWidget('Loading Download Onverse', 'web/html/widget/home/download.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );
	}		
});


// source: ../www.onverse.com/Website/web/html/widget/home/guides.htm.js


//-------------------------------------------------------------------
var GuidesWidget = IListWidget.extend({
    title: 'Onverse Guide Program',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading Guides', 'web/html/widget/home/guides.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );
    }
});


// source: ../www.onverse.com/Website/web/html/widget/home/icefall.htm.js

﻿
//-------------------------------------------------------------------
var IceFallWidget = IListWidget.extend({
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading IceFall', 'web/html/widget/home/icefall.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );
    }
});


// source: ../www.onverse.com/Website/web/html/widget/home/learn-3d-world.htm.js

﻿
//-------------------------------------------------------------------
var Learn3DWorldWidget = IListWidget.extend({
    title: '3D World',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading Learn 3D World', 'web/html/widget/home/learn-3d-world.htm',
            function(html) {
                jq.html(removeSEO(html));
                PhotoAlbumsWidget.buildGallery(jQuery('.cyclePics'));
            }
        );
    }
});



    

// source: ../www.onverse.com/Website/web/html/widget/home/learn-social-network.htm.js

﻿
//-------------------------------------------------------------------
var LearnSocialNetworkWidget = IListWidget.extend({
	title: '',
    style: WidgetStyles.plain,
	renderItem: function(jq, obj, id) {
	    jq.load('web/html/widget/home/learn-social-network.htm', function() {
	        jq.find('.cyclePics2 img').click(function() {
	            openImage($(this).attr('src'));	        
	        });
	    });
	}		
});

// source: ../www.onverse.com/Website/web/html/widget/home/learn-your-avatar.htm.js

﻿
//-------------------------------------------------------------------
var LearnYourAvatarWidget = IListWidget.extend({
	title: '',
    style: WidgetStyles.plain,
	renderItem: function(jq, obj, id) {
	    jq.load('web/html/widget/home/learn-your-avatar.htm', function() {
    	    PhotoAlbumsWidget.buildGallery(jQuery('.cyclePics'));
	    });
	}		
});

// source: ../www.onverse.com/Website/web/html/widget/home/learn-your-home.htm.js

﻿
//-------------------------------------------------------------------
var LearnYourHomeWidget = IListWidget.extend({
	title: '',
    style: WidgetStyles.plain,
	renderItem: function(jq, obj, id) {
	    jq.load('web/html/widget/home/learn-your-home.htm', function() {
    	    PhotoAlbumsWidget.buildGallery(jQuery('.cyclePics'));
	    });
	}		
});

// source: ../www.onverse.com/Website/web/html/widget/home/news.htm.js



//-------------------------------------------------------------------
var OnverseNewsWidget = IListWidget.extend({
    title: 'Onverse News',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
//        $('#default').show();
        //jq.load('web/html/widget/home/news.htm');
    }
});


// source: ../www.onverse.com/Website/web/html/widget/home/pets.htm.js

﻿
//-------------------------------------------------------------------
var PetsWidget = IListWidget.extend({
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        ajaxWidget('Loading Pets', 'web/html/widget/home/pets.htm',
            function(html) {
                jq.html(removeSEO(html));
            }
        );
    }
});


// source: ../www.onverse.com/Website/web/html/widget/home/signup.htm.js


//-------------------------------------------------------------------
var CreateAvatarWidget = IListWidget.extend({
	title: 'Create Avatar',
	renderItem: function(jq, obj, id) {
        var sb = new StringBuilder();
		sb.appendFormat('<div id="avatarWrapper">');
	    sb.appendFormat('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="250" height="600" id="character designer m" align="middle">');
	    sb.appendFormat('<param name="allowScriptAccess" value="sameDomain" />');
	    sb.appendFormat('<param name="allowFullScreen" value="false" />');
	    sb.appendFormat('<param name="movie" value="web/swf/character designer m.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#6a93ed" />	<embed src="web/swf/character designer m.swf" quality="high" nobgcolor="#0099ff" width="250" height="600" name="character designer m" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />');
	    sb.appendFormat('</object>');
	    sb.appendFormat('</div>');
	    jq.append(sb.build());
		jq.find('#avatarWrapper').hide().slideDown();
	}		
});

//-------------------------------------------------------------------
var CreateAccountWidget = IListWidget.extend({
	title: 'Signup',
	renderItem: function(jq, obj, id) {
	    jq.load('web/html/widget/home/signup.htm');
	}		
});



// source: ../www.onverse.com/Website/web/html/widget/help/game.htm.js

﻿
// list of news articles
var tips = [
    { text: 'Player Movement', link: 'playerMovement' },
    { text: 'Camera Controls', link: 'cameraControls' },
    { text: 'Shopping', link: 'shopping' },
    { text: 'Player Points', link: 'playerPoints' },
    { text: 'Cash Coins', link: 'cashCoins' },
    { text: 'Tools', link: 'tools' },
    { text: 'Look Mode and Equip Mode', link: 'lookMode' },
    { text: 'Equip Bar', link: 'equipBar' },
    { text: 'Using the Travel Map', link: 'travelMap' },
    { text: 'Communities', link: 'communities' },
    { text: 'Getting an Apartment', link: 'apartments' },
    { text: 'Homepoints', link: 'homePoints' },
    { text: 'Furniture Placement', link: 'furniture' },
    { text: 'Key Mappings', link: 'keyMappings' },
    { text: 'Inventory Window', link: 'inventory' },
    { text: 'Avatar Customization', link: 'avatar' },
    { text: 'Dancing and Emotes', link: 'dancing' },
    { text: 'Chat', link: 'chat' },
    { text: 'Screenshots', link: 'screenshots' },
    { text: 'Friends Windows', link: 'friends' },
    { text: 'Options', link: 'options' }
];

function getGameTipsUrl() {
    var url = '' + location.href.toString(); //document.URL.toString();
    url = url.replace(/index\.html/i, '');
    var index = url.lastIndexOf('/');
    if (index > -1) {
        url = url.substring(index + 1);
        if (url == 'Game') url = '';
    }
    else {
        url = '';
    }

    if (url == '') {
        url = tips[0].link;
    }
    return url;
}


var lastlog = 0
function logcall(s) {
    var t = new Date().getTime();
    if (t - lastlog > 1000) $('body').append('<font color=black>----------------------<br/>');
    lastlog = t;
    t = t % 10000;
    var html = '<font color=black>' + t + ':' + s + '<br/>';
    $('body').append(html);
}

//-------------------------------------------------------------------
var GameTipsWidget = IObjectWidget.extend({
    title: 'Game Tips',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
        // if last url has never been set, load the default page now
        if (GameTipsWidget.lasturl == null) {
            GameTipsWidget.load(null, jq);
        }
        else {
            // give browser a moment to update its location bar
            setTimeout(function() { GameTipsWidget.load(null, jq); }, 50);
        }
    }
});
GameTipsWidget.load = function(url, jq) {
    url = url ? url : getGameTipsUrl();
    GameTipsWidget.lasturl = url;
    ajaxWidget('Game Tips', 'web/html/widget/help/game/' + url + '.htm',
        function(html) {
            $('#main').html(removeSEO(html));
            $('#main').css({ minHeight: '650px' });
            GameTipsListWidget.updateGallery();
        }
    );
};
GameTipsWidget.go = function(url) {
    $.history.load('/Help/Game/' + url);
};

//-------------------------------------------------------------------
var GameTipsListWidget = IObjectWidget.extend({
    title: 'Help Topics',
    renderItem: function(jq, obj, id) {
        var sb = new StringBuilder();
        for (var i in tips) {
            var item = tips[i];
            sb.append('<div style="margin-bottom: 10px">');
            sb.appendFormat('<a href="javascript:nil()" style="color: white;" onclick="GameTipsWidget.go(\'{0}\');">{1}</a><br/>', item.link, item.text);
            sb.append('</div>');
        }
        jq.append(sb.build());
    }
});
GameTipsListWidget.updateGallery = function() {
    PhotoAlbumsWidget.buildGallery($('#wrapper'), {
        width: '1100',
        style: 'top:0px;left:0px;display:none;',
        align: 'none'           
    });
};





// source: ../www.onverse.com/Website/web/html/widget/help/website.htm.js

﻿
// list of news articles
var webtips = [
    { text: 'My Onverse', link: 'myonverse' },
    { text: 'Friends', link: 'friends' },
    { text: 'Mailbox', link: 'mailbox' },
    { text: 'Account Settings', link: 'settings' },
    { text: 'Home', link: 'home' },
    { text: 'Using the Search Function', link: 'search' }
];

function getWebTipsUrl() {
    //var url = '' + document.URL.toString();
    var url = '' + location.hash.toString();
    url = url.replace(/index\.html/i, '');
    var index = url.lastIndexOf('/');
    if (index > -1) {
        url = url.substring(index + 1);
        if (url == 'Website') url = '';
    }
    else {
        url = '';
    }

    if (url == '') {
        url = webtips[0].link;
    }
    return url;
}


//-------------------------------------------------------------------
var WebsiteTipsWidget = IObjectWidget.extend({
    title: 'Website Tips',
    style: WidgetStyles.plain,
    renderItem: function(jq, obj, id) {
    WebsiteTipsWidget.load(null, jq);
        // if last url has never been set, load the default page now
        if (WebsiteTipsWidget.lasturl == null) {
            WebsiteTipsWidget.load(null, jq);
        }
        else {
            // give browser a moment to update its location bar
            setTimeout(function() { WebsiteTipsWidget.load(null, jq); }, 50);
        }            
    }
});
WebsiteTipsWidget.load = function(url, jq) {
    url = url ? url : getWebTipsUrl();
    WebsiteTipsWidget.lasturl = url;
    ajaxWidget('Website Tips', 'web/html/widget/help/website/' + url + '.htm',
        function(html) {
            $('#main').html(removeSEO(html));
            $('#main').css({ minHeight: '650px' });
        }
    );
};
WebsiteTipsWidget.go = function(url) {
    $.history.load('/Help/Website/' + url);
};

var WebsiteTipsListWidget = IObjectWidget.extend({
    title: 'Help Topics',
    renderItem: function(jq, obj, id) {
        var sb = new StringBuilder();
        for (var i in webtips) {
            var item = webtips[i];
            sb.append('<div style="margin-bottom: 10px">');
            sb.appendFormat('<a href="javascript:nil()" style="color: white;" onclick="WebsiteTipsWidget.go(\'{0}\');">{1}</a><br/>', item.link, item.text);
            sb.append('</div>');
        }
        jq.append(sb.build());
    }
});




