jQuery(document).ready(function() {
SetLinkObjects();
});
var SetLinkObjects = function(preview)
{
var LinkObjectID = "";
var LinkObjectValue = "";
var AryLinkObjectValue = [];
var LinkObjectText;
var numLinkObjects = 0;
jQuery.each( jQuery('[class^="LinkObject"]'), function(){
AryLinkObjectValue.push(jQuery(this).attr('id').replace("LinkObject",""));
numLinkObjects++;
});
LinkObjectValue = AryLinkObjectValue.join(',');
var objLipu = new LIPUHandler();
objLipu.Plugin = 'WSCache';
objLipu.SetParam('ws_state', 'GetObjectLink');
objLipu.SetParam('ws_action', 'GetObjectLink');
objLipu.SetParam('LinkObjectValue',LinkObjectValue);
objLipu.SetParam('token','105983672@MaigRicRgPibNbhOa');
objLipu.SetParam('articleid','65939');
var oncompleteFunc = function(lipuObj)
{
if (lipuObj.ErrorCode == "100")
{
jQuery('body').append('');
jQuery('#hiddenSpan').html(lipuObj.HtmlParam);
//If preview only, make that the links are disabled;
if(preview == true)
{
jQuery('#hiddenSpan').find('*[href]').attr('href', 'javascript:void();');
}
jQuery.each( jQuery('[class^="LinkObject"]'), function(){
var htmlContent = jQuery('#hiddenSpan').find('[linkobject='+jQuery(this).attr('id').replace("LinkObject","")+']').html();
jQuery(this).html(htmlContent);
jQuery(this).show();
});
jQuery('#hiddenSpan').remove();
}
// else
// {
// jQuery(".LinkObject").html("
");
// jQuery('.LinkObject').show();
// }
jQuery.unblockUI();
};
if(numLinkObjects > 0)
{
jQuery.blockUI({ message: '