var popupCloseLabels = new Array();

popupCloseLabels['pl'] = 'zamknij';
popupCloseLabels['en'] = 'close';
popupCloseLabels['de'] = 'schließen';

var certificates = new Array();

certificates['Gazele_Biznesu_PL'] = new Array();
certificates['Gazele_Biznesu_PL']['imageName'] = 'budagros-certificate-Gazele_Biznesu-PL-large.jpg';
certificates['Gazele_Biznesu_PL']['imageWidth'] = 384;
certificates['Gazele_Biznesu_PL']['imageHeight'] = 497;

certificates['Ruukki_PL'] = new Array();
certificates['Ruukki_PL']['imageName'] = 'budagros-certificate-Ruukki-PL-large.jpg';
certificates['Ruukki_PL']['imageWidth'] = 384;
certificates['Ruukki_PL']['imageHeight'] = 561;

certificates['Armak_PL'] = new Array();
certificates['Armak_PL']['imageName'] = 'budagros-certificate-Armak-PL-large.jpg';
certificates['Armak_PL']['imageWidth'] = 384;
certificates['Armak_PL']['imageHeight'] = 553;

certificates['LFP_Dealer_PL'] = new Array();
certificates['LFP_Dealer_PL']['imageName'] = 'budagros-certificate-LFP_Leszno_dealer-PL-large.jpg';
certificates['LFP_Dealer_PL']['imageWidth'] = 384;
certificates['LFP_Dealer_PL']['imageHeight'] = 543;

certificates['LFP_Serwis_PL'] = new Array();
certificates['LFP_Serwis_PL']['imageName'] = 'budagros-certificate-LFP_Leszno_serwis-PL-large.jpg';
certificates['LFP_Serwis_PL']['imageWidth'] = 384;
certificates['LFP_Serwis_PL']['imageHeight'] = 528;

certificates['AB_PL'] = new Array();
certificates['AB_PL']['imageName'] = 'almet-certificate-AB-PL-large.jpg';
certificates['AB_PL']['imageWidth'] = 384;
certificates['AB_PL']['imageHeight'] = 547;

certificates['TUV_Rheinland_PL'] = new Array();
certificates['TUV_Rheinland_PL']['imageName'] = 'almet-certificate-TUV_Rheinland-PL-large.jpg';
certificates['TUV_Rheinland_PL']['imageWidth'] = 384;
certificates['TUV_Rheinland_PL']['imageHeight'] = 586;

certificates['TUV_Rheinland_EN'] = new Array();
certificates['TUV_Rheinland_EN']['imageName'] = 'almet-certificate-TUV_Rheinland-EN-large.jpg';
certificates['TUV_Rheinland_EN']['imageWidth'] = 384;
certificates['TUV_Rheinland_EN']['imageHeight'] = 586;

certificates['TUV_Rheinland_DE'] = new Array();
certificates['TUV_Rheinland_DE']['imageName'] = 'almet-certificate-TUV_Rheinland-DE-large.jpg';
certificates['TUV_Rheinland_DE']['imageWidth'] = 384;
certificates['TUV_Rheinland_DE']['imageHeight'] = 586;

certificates['GSI_SLV_DE'] = new Array();
certificates['GSI_SLV_DE']['imageName'] = 'almet-certificate-GSI_SLV_steel_constructions-DE-large.jpg';
certificates['GSI_SLV_DE']['imageWidth'] = 384;
certificates['GSI_SLV_DE']['imageHeight'] = 579;

function openCertificatePopup(id, language) {
	var certificate = certificates[id];

    var documentElement = document.documentElement;

	$('#canvas').css('height', $(document).height());
	$('#canvas').css('opacity', 0.5).fadeIn('slow');
	$('#certificate_popup').fadeIn('slow');
	$('#certificate_popup').css('width', certificate['imageWidth'] + 16);
	$('#certificate_popup').css('height', certificate['imageHeight'] + 40);
	$('#certificate_popup').html('<a href="javascript:closeCertificatePopup()"><img id="certificate_popup_image" src="img/certificate/large/' + certificate['imageName'] + '" alt="" width="' + certificate['imageWidth'] + '" height="' + certificate['imageHeight'] + '"/></a><div class="document_close"><a href="javascript:closeCertificatePopup()"><span>' + popupCloseLabels[language] + '</span><img src="img/budagros-icon-close.png" alt="" width="17" height="17"/></a></div>');
	$('#certificate_popup').css('top', documentElement.scrollTop);
    $('#certificate_popup').css('left', documentElement.clientWidth / 2 - $('#certificate_popup').width() / 2);
} // function

function closeCertificatePopup() {
	$('#canvas').fadeOut('slow');
	$('#certificate_popup').fadeOut('slow');
} // function

$(document).ready(function() {
    $("#rightbox").css("height", $("#contentbox").height() + "px");
}); // function

