function get_ictvinformer(informer, type, callback)
{
if(typeof type == "undefined")
type = "iframe";
if(type == "iframe")
{
if(informer == 'fakty')
document.write('');
if (informer == 'segodnay')
document.write('');
if (informer == 'fakty_main')
document.write('');
if (informer == 'fakty_video')
document.write('');
if (informer == 'fakty_avtonews')
document.write('');
if(informer == 'fakty_avto_horizontal')
document.write('');
}
else if(type == "json")
{
if(typeof jQuery == "undefined")
{
console.log("[ICTV/Fakty Informer] To load informer wia JSONP your site should contain a JQuery library");
return false;
}
if(informer == 'fakty_avto')
{
var m = this;
jQuery.ajax({
url: "http://fakty.ictv.ua/widgets/informer_news/avtoria.php?type=jsonp",
dataType: "jsonp",
jsonp: false,
jsonpCallback: "onJSONPLoad",
crossDomain: true
})
.done(function(response) {
if(jQuery.isFunction(callback))
callback.apply(m, [response]);
})
.fail(function() {
console.log("[ICTV/Fakty Informer] An error equired while processing your reauest");
return false;
});
}
}
}