";
MP3Body += '
'
if ($.browser.msie && (parseInt($.browser.version, 10) == 8 || parseInt($.browser.version, 10) == 7)) {
var fullvpath = "http://" + getHost(document.URL) + "/file/GetVideo/" + audio + ".mp3";
var fullimgpath = "/file/GetImageCustom/" + image + "/390/293";
MP3Body = "
";
var FLVBody = "
| | ";
if ($.browser.msie && (parseInt($.browser.version, 10) == 8 || parseInt($.browser.version, 10) == 7)) {
var fullvpath = "http://" + getHost(document.URL) + "/file/GetVideo/" + video + ".mp4";
var fullimgpath = "/file/GetImageCustom/" + image + "/390/293";
FLVBody = FLVBody + '';
}
else {
FLVBody = FLVBody + ''
}
FLVBody = FLVBody + " | | | |
|
| |
| |
|
|
";
if (video != "") {
/////////////brightcove///////////////
if (video.length != 36 && SwapBrightCove == "true") { //Guid
player = "
| | ";
player += drawBrightcoveVideo('390', '293', video, 'AQ~~,AAAAmtUu5YE~,Qj5tZQq6gc-AZBkkKRzL7UHytrBB7_CF', 'myExperience1079165395002');
player += " | | | |
|
| |
| |
|
|
";
}
////////////end brightcove//////////////
else {
player = FLVBody;
}
} else {
player = MP3Body;
}
var ModalHTML = "
| | |
" + player + " |
|
";
if (video != "") {
if (video.length == 36 || SwapBrightCove == "true") {
drawflashplayer();
if (_V_.flash.version()[0] < 11 && navigator.userAgent.match(/iPad/i) == null) {
var newMsg = "
| | " + flashmsg + " | | | |
|
| |
| |
|
|
";
ModalHTML = "
| | |
" + newMsg + " |
|
";
}
}
}
else {
drawAudioFlashPlayer();
if (_V_.flash.version()[0] < 11 && navigator.userAgent.match(/iPad/i) == null) {
var newMsg = "
| | " + flashmsg + " | | | |
|
| |
| |
|
|
";
ModalHTML = "
| | |
" + newMsg + " |
|
";
}
}
$.modal(ModalHTML, { close: true });
if (video.length != 36 && SwapBrightCove == "true") {
try {
if (brightcove) {
brightcove.createExperiences();
}
}
catch (e) {
}
}
return false;
}
var FillCountryNews = function (Distination, json) {
//debugger;
var Jobj = jQuery.parseJSON(json);
var index = 0;
var SectionHTML = "";
if (Jobj != null) {
SectionHTML = "
";
while (Jobj[index] != null) {
if (Jobj[index].mainImage_ImageFile == "") {
SectionHTML = SectionHTML + "|
|
";
index++;
} else {
SectionHTML = SectionHTML + " |
|
";
index++;
}
}
SectionHTML = SectionHTML + "
";
$("." + Distination).html(SectionHTML);
}
}
function aneesa() {
var randomnumberstream = Math.floor(Math.random() * 11);
var URLIncreaseCountStream = "/Services/IncreaseMostViewReports?ReportID=" + $(objvalue).attr("ObjectId") + "&ReportDate=" + $(objvalue).attr("dateattr");
$.ajax({
type: "GET",
url: URLIncreaseCountStream,
datatype: "html",
complete: function (data) {
}
});
}
function ReplaceAll(Source, stringToFind, stringToReplace) {
var temp = Source;
var index = temp.indexOf(stringToFind);
while (index != -1) {
temp = temp.replace(stringToFind, stringToReplace);
index = temp.indexOf(stringToFind);
}
return temp;
}
//talk show box function
function RenderTalkShowsBox() {
//var randTalkShows = Math.floor(Math.random() * 11);
var URLTalkShows = "/ks3services/talkshows";
$.get(URLTalkShows, '', function (result, status, respones) {
if (status == 'success') {
if (result != "") {
$('#TalkShowsDiv').html(result);
showHidePrograms(1, $(".ReportsHPItem").length)
$("#ReportsHPItems").css("width", 85 * $(".ReportsHPItem").length);
if ($(".ReportsHPItem").length > 8) {
var speed = 1, scrolling;
var maxScroll = $("#ReportsHPItems").position().left;
$('#ReportsHPscroll-left').mouseenter(function () {
// Scroll the element up
scrolling = window.setInterval(function () {
//debugger;
if ($("#ReportsHPItems").position().left != 0) {
$("#ReportsHPItems").css('left', $("#ReportsHPItems").position().left + 1);
}
}, speed);
});
$('#ReportsHPscroll-right').mouseenter(function () {
// Scroll the element down
scrolling = window.setInterval(function () {
if ($("#ReportsHPItems").position().left != maxScroll) {
$("#ReportsHPItems").css('left', $("#ReportsHPItems").position().left - 1);
}
}, speed);
});
$('#ReportsHPscroll-left, #ReportsHPscroll-right').bind({
click: function (e) {
// Prevent the default click action
e.preventDefault();
},
mouseleave: function () {
if (scrolling) {
window.clearInterval(scrolling);
scrolling = false;
}
}
});
}
}
}
});
}
function showHidePrograms(x, imagesCount) {
$("#arrowDiv").css("margin-right", ((x - 1) * 84) + 36);
for (i = 1; i <= imagesCount; i++) {
$("#tableinfo" + i).not($("#tableinfo" + x)).hide();
}
$("#tableinfo" + x).show();
}
//end talk shows programs
//Most Read/Sent/Commented Articles
function renderMostReadSentCommentedArticles()
{
var MostSentArticlesURL = "/ks3services/MostArticle/221";
var MostReadArticlesURL = "/ks3services/MostArticle/222";
var MostCommentedArticlesURL = "/ks3services/MostCommentArticle";
var jsonMostSent;
var indexMostSent = 0;
var SectionHTMLMostSent = "";
var jsonMostRead;
var indexMostRead = 0;
var SectionHTMLMostRead = "";
var jsonMostCommented;
var indexMostCommented = 0;
var SectionHTMLMostCommented = "";
$.getJSON(MostReadArticlesURL, null, function (json) {
jsonMostRead = jQuery.parseJSON(json);
if (jsonMostRead != null) {
if (jsonMostRead[indexMostRead] != null) {
SectionHTMLMostRead += "
";
}
}
$.getJSON(MostCommentedArticlesURL, null, function (json) {
jsonMostCommented = jQuery.parseJSON(json);
if (jsonMostCommented != null) {
if (jsonMostCommented[indexMostCommented] != null) {
SectionHTMLMostCommented += "
";
}
}
$.getJSON(MostSentArticlesURL, null, function (json) {
jsonMostSent = jQuery.parseJSON(json);
if (jsonMostSent != null) {
if (jsonMostSent[indexMostSent] != null) {
SectionHTMLMostSent = "
";
}
}
if (SectionHTMLMostRead != "") {
$("#divMostArticle").html(SectionHTMLMostRead);
}
else {
if (SectionHTMLMostRead != "") {
$("#divMostArticle").css("display", "none");
$("#divMostArticle").html(SectionHTMLMostRead);
}
else {
if (SectionHTMLMostCommented != "") {
$("#divMostArticle").css("display", "none");
$("#divMostArticle").html(SectionHTMLMostCommented);
}
else {
$("#divMostArticle").css("display", "none");
$("#MostArticlesContainer").css("display", "none");
}
}
}
$("#divMostSent").click(function () {
$("#divMostArticle").html("");
document.getElementById("divMostSent").className = "clickableregion_selected";
document.getElementById("divMostread").className = "clickableregion_normal";
document.getElementById("divMostComment").className = "clickableregion_normal";
if (SectionHTMLMostSent != "") {
$("#divMostArticle").html(SectionHTMLMostSent);
$("#divMostArticle").css("display", "");
}
});
$("#divMostread").click(function () {
$("#divMostArticle").html("");
document.getElementById("divMostSent").className = "clickableregion_normal";
document.getElementById("divMostread").className = "clickableregion_selected";
document.getElementById("divMostComment").className = "clickableregion_normal";
if (SectionHTMLMostRead != "") {
$("#divMostArticle").html(SectionHTMLMostRead);
$("#divMostArticle").css("display", "");
}
});
$("#divMostComment").click(function () {
$("#divMostArticle").html("");
document.getElementById("divMostSent").className = "clickableregion_normal";
document.getElementById("divMostread").className = "clickableregion_normal";
document.getElementById("divMostComment").className = "clickableregion_selected";
if (SectionHTMLMostCommented != "") {
$("#divMostArticle").html(SectionHTMLMostCommented);
$("#divMostArticle").css("display", "");
}
});
$(function () {
var ele = $('#divMostArticle');
var speed = 100, scroll = 5, scrolling;
$('#scroll-down').mouseenter(function () {
// Scroll the element up
scrolling = window.setInterval(function () {
ele.scrollTop(ele.scrollTop() - scroll);
}, speed);
});
$('#scroll-up').mouseenter(function () {
// Scroll the element down
scrolling = window.setInterval(function () {
ele.scrollTop(ele.scrollTop() + scroll);
}, speed);
});
$('#scroll-up, #scroll-down').bind({
click: function (e) {
// Prevent the default click action
e.preventDefault();
},
mouseleave: function () {
if (scrolling) {
window.clearInterval(scrolling);
scrolling = false;
}
}
});
});
});
});
});
}