Clinton u Ljubljani : Bivši predsjednik SAD-a i predsjednik Slovenije razgovarali i o zapadnom Balkanu
function findImage(searchStr,arrPics) {
var returnArray = false;
for (i=0; i<arrPics.length; i++) {
if (arrPics[i]===searchStr) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
}
}
return returnArray;
}
var arrPics = new Array();
var arrTitles = new Array();
var arrAuthors = new Array();
var arrPreloadedImages = new Array ();
arrPics[0]='/assets/media/picture/20091031/sz5_clinton_druznik1.jpg';
arrTitles[0]='Bill Clinton';
arrAuthors[0]='Matej Družnik/Delo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_clinton_druznik1.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_clinton_druznik1.jpg"].src = "/assets/media/picture/20091031/sz5_clinton_druznik1.jpg"; }
arrPics[1]='/assets/media/picture/20091031/sz5_clinton_pahor_druznik.jpg';
arrTitles[1]='Bill Clinton in Borut Pahor';
arrAuthors[1]='Matej Družnik/Delo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_clinton_pahor_druznik.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_clinton_pahor_druznik.jpg"].src = "/assets/media/picture/20091031/sz5_clinton_pahor_druznik.jpg"; }
arrPics[2]='/assets/media/picture/20091031/sz5_clintonturkr.jpg';
arrTitles[2]='Bill Clinton in Danilo Türk';
arrAuthors[2]='Foto Bobo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_clintonturkr.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_clintonturkr.jpg"].src = "/assets/media/picture/20091031/sz5_clintonturkr.jpg"; }
arrPics[3]='/assets/media/picture/20091031/sz5_turkclinton.jpg';
arrTitles[3]='Danilo Türk in Bill Clinton';
arrAuthors[3]='Foto Bobo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_turkclinton.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_turkclinton.jpg"].src = "/assets/media/picture/20091031/sz5_turkclinton.jpg"; }
arrPics[4]='/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca2.jpg';
arrTitles[4]='Srečal se bo tudi s slovenskim premierom in predsednikom';
arrAuthors[4]='Matej Družnik/Delo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca2.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca2.jpg"].src = "/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca2.jpg"; }
arrPics[5]='/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca3.jpg';
arrTitles[5]='Bill Clinton se je že sprehodil po ljubljanskih ulicah';
arrAuthors[5]='Matej Družnik/Delo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca3.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca3.jpg"].src = "/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca3.jpg"; }
arrPics[6]='/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca1.jpg';
arrTitles[6]='Zvečer bo v Cankarjevem domu predaval na zaključku Poslovne konference Portorož';
arrAuthors[6]='Matej Družnik/Delo';
if (document.images) { arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca1.jpg"] = new Image(); arrPreloadedImages["/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca1.jpg"].src = "/assets/media/picture/20091031/sz5_bill_clinton_poslovna_konferenca1.jpg"; }
$(document).ready(function(){
// resize on load
$("#large").width($("#gpic img").width());
$("#large").height($("#gpic img").height());
// resize on image load
//$("#gpic img").load(function() {
// $("#large").width($("#gpic img").width());
// $("#large").height($("#gpic img").height());
//});
$("#thumbnail li a").click(function(){
var src = $(this).attr("href");
getIndex = findImage(src,arrPics);
var title = arrTitles[getIndex];
var author = arrAuthors[getIndex];
if ( ! title ) title = ' ';
if ( author ) author = 'foto: ' + author; else author = ' ';
$("#gpic img").hide().attr({"src": src, "title": title});
$("#NewsMediaSlideTitle").html(title);
$("#NewsMediaSlideAuthor").html(author);
$("#gol").show();
$("#gor").show();
return false;
});
$("#thumbnails li a").click(function(){
var src = $(this).attr("href");
getIndex = findImage(src,arrPics);
var title = arrTitles[getIndex];
var author = arrAuthors[getIndex];
if ( ! title ) title = ' ';
if ( author ) author = 'foto: ' + author; else author = ' ';
$("#gpic img").hide().attr({"src": src, "title": title});
$("#NewsMediaSlideTitle").html(title);
$("#NewsMediaSlideAuthor").html(author);
$("#gol").show();
$("#gor").show();
return false;
});
$("#gol a").click(function(){
getIndex = findImage($("#gpic img").attr("src"),arrPics);
if(getIndex != 0){
$("#gpic img").hide().attr({"src": arrPics[getIndex-1], "title": arrTitles[getIndex-1]});
$("#NewsMediaSlideTitle").html(arrTitles[getIndex-1]);
$("#NewsMediaSlideAuthor").html(arrAuthors[getIndex-1]);
$("#gor").show();
return false;
}else{
$("#gol").hide();
}
});
$("#gor a").click(function(){
getIndex = findImage($("#gpic img").attr("src"),arrPics);
getIndex++;
if(arrPics[getIndex]){
$("#gpic img").hide().attr({"src": arrPics[getIndex], "title": arrTitles[getIndex]});
$("#NewsMediaSlideTitle").html(arrTitles[getIndex]);
$("#NewsMediaSlideAuthor").html(arrAuthors[getIndex]);
$("#gol").show();
return false;
}else{
$("#gor").hide();
}
});
$("#gpic img").load(function(){
$("#large").width(arrPreloadedImages[$("#gpic img").attr("src")].width);
$("#large").height(arrPreloadedImages[$("#gpic img").attr("src")].height);
$("#gpic img:hidden").fadeIn("slow");
});
});
Komentari