// JavaScript Document


/* var numMain = "false";
 var toggle = "false"*/
 var numBig;
 var path = '/files/images/presentations/experts/big/';
 var lnkPath = '/excellence-club/experts/?vidId=';
 var ext = '.jpg';
/* var dblock = {'display' : 'block'};
 var dnone = {'display' : 'none'};*/

  $(document).ready(function(){
  
  $('#expertsTekst').html(exText('b1'));
  });

  $(function() {
$(".image").click(function() {

	numBig = $(this).attr("rel");

var image = bigImage(numBig);
$('#imageBig').hide();
$('#imageBig').fadeIn('slow');
$('#imageBig').attr({src: bigImage(numBig)});
/*var smlFalse = '#' + 'im' + numBig;


 if(toggle == "true" )
{
	var smlTrue = '#' + 'im' + numMain;
 	$(smlFalse).html(dnone);
	$(smlTrue).fadeIn('slow');
	$(smlTrue).html('<img src="' + smallImage(numMain) + '" border="0"/>');
}
else 
{	
	numMain = '1';
	$("#im1").html(dblock);
	$("#im1").fadeIn('slow');
	$("#im1").html('<img src="' + smallImage(numMain) + '" border="0"/>');
	$(smlFalse).hide();
}
*/
	var linkBig = lnkExperts(numBig);
	$("#expLnk").attr({href: linkBig});
var br = numBig;
var txt = exText(br);
$('#expertsTekst').html(txt);
/*numMain = numBig;
toggle = "true";
$('#vr3').html(bigImage(numBig));
$('#vr4').html(smallImage(numMain));
 */
return false;
	});
});
 
 function bigImage(n)
{
	var bI = path + n + ext;
	return bI;
}
/*
 function smallImage(n)
{
	var sI = path + 'm' + n + ext;
	return sI;
}*/

  function lnkExperts(n)
{
	var lI = lnkPath + n;
	return lI;
}
 
 
  function exText(n)
{
var tekst
	switch(n)
	{
	case 'b1':
	   tekst = '<a href="/excellence-club/experts/?vidId=b1" class="video-lnk"><h3>OLIVER P. KUHRT,</h3><p style="padding-bottom:5px;">Executive Vice President<br><strong>Koelnmesse GmbH</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'b2':
	   tekst = '<a href="/excellence-club/experts/?vidId=b2" class="video-lnk"><h3>ANGELA SPIZIG</h3><p style="padding-bottom:5px;"><strong>Deputy Major of the city of Cologne</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'b3':
	   tekst = '<a href="/excellence-club/experts/?vidId=b3" class="video-lnk"><h3>UDO G&Ouml;&szlig;WALD,</h3><p style="padding-bottom:5px;"><strong>Chairman of ICOM Europe</strong><br /><br />22 video interviews</p></a>';
	  break;
	 case 'b4':
	   tekst = '<a href="/excellence-club/experts/?vidId=b4" class="video-lnk"><h3>GERHARD WINTER,</h3><p style="padding-bottom:5px;"><strong>Board member of ICOM Deutschland</strong><br /><br />22 video interviews</p></a>';
	  break;
	  case 'b5':
	   tekst = '<a href="/excellence-club/experts/?vidId=b5" class="video-lnk"><h3>LILA DE CHAVES,</h3><p style="padding-bottom:5px;">Secretary General of <strong>WFFM</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'b6':
	   tekst = '<a href="/excellence-club/experts/?vidId=b6" class="video-lnk"><h3>ANJA SCHALUSCHKE,</h3><p style="padding-bottom:5px;">Executive Director<br /><strong>German Museum Association</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'b7':
	   tekst = '<a href="/excellence-club/experts/?vidId=b7" class="video-lnk"><h3>Prof. TOMISLAV SOLA,</h3><p style="padding-bottom:5px;"><strong>The Best in Heritage and Excellence Club</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'b8':
	   tekst = '<a href="/excellence-club/experts/?vidId=b8" class="video-lnk"><h3>Dr. HOLGER RESCHE,</h3><p style="padding-bottom:5px;"><strong>EU prize for cultural heritage / Europa Nostra awards</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '01':
	   tekst = '<a href="/excellence-club/experts/?vidId=01" class="video-lnk"><h3>UDO G&Ouml;&szlig;WALD,</h3><p style="padding-bottom:5px;"><strong>Chairman of ICOM Europe</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '02':
	   tekst = '<a href="/excellence-club/experts/?vidId=02" class="video-lnk"><h3>HERN&Aacute;N CRESPO,</h3><p style="padding-bottom:5px;">area of Science and Environment<br><strong>CosmoCaixa Fundaci&oacute; "la Caixa"</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '03':
	   tekst = '<a href="/excellence-club/experts/?vidId=03" class="video-lnk"><h3>MARGR&Eacute;T HALLGR&Iacute;MSD&Oacute;TTIR,</h3><p style="padding-bottom:5px;">general Director<br /><strong>The National Museum of Iceland</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '04':
	   tekst = '<a href="/excellence-club/experts/?vidId=04" class="video-lnk"><h3>MOLLER, BENTE GURO,</h3><p style="padding-bottom:5px;">Senior Advisor,<br /><strong>Intercultural museum / Oslo museum</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '05':
	   tekst = '<a href="/excellence-club/experts/?vidId=05" class="video-lnk"><h3>TINA MARKUN,<br />TEA LUKAN KLAVZER,</h3><p style="padding-bottom:5px;"><br /><br />22 video interviews</p></a>';
	  break;
	case '06':
	   tekst = '<a href="/excellence-club/experts/?vidId=06" class="video-lnk"><h3>ALEXANDER V. GORBUNOV,</h3><p style="padding-bottom:5px;">deputy director,<br /><strong>State Borodino War and History Museum</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '07':
	   tekst = '<a href="/excellence-club/experts/?vidId=07" class="video-lnk"><h3>KATHERINE WEBSTER,</h3><p style="padding-bottom:5px;">Director,<br><strong>Cliffs of Moher Visitor Experience</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '08':
	   tekst = '<a href="/excellence-club/experts/?vidId=08" class="video-lnk"><h3>AISLINN MERZ,</h3><p style="padding-bottom:5px;">marketing,<br><strong>German immigration center</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '10':
	   tekst = '<a href="/excellence-club/experts/?vidId=10" class="video-lnk"><h3>HRVOJE MANENICA,</h3><p style="padding-bottom:5px;">director,<br /><strong>Archeological Museum Narona</strong><br /><br />22 video interviews</p></a>';
	  break;
	case '12':
	   tekst = '<a href="/excellence-club/experts/?vidId=12" class="video-lnk"><h3>WILLEM DE VOS,</h3><p style="padding-bottom:5px;">science communicator,<br /><strong>Brussels Museum of Natural Sciences</strong><br /><br />22 video interviews</p></a>';
	  break;
	case 'a1':
	   tekst = '<a href="/excellence-club/experts/?vidId=a1" class="video-lnk"><h3>MONIKA HAGEDORN-SAUPE,</h3><p style="padding-bottom:5px;">Deputy Director,<br /><strong>Institute for Museum Research</strong><br /><br />22 video interviews</p></a>';
	  break;
	  case 'a2':
	   tekst = '<a href="/excellence-club/experts/?vidId=a2" class="video-lnk"><h3>DAVID VUILLAUME,</h3><p style="padding-bottom:5px;">Swiss Museums Associations,<br /><strong>ICOM Switzerland</strong><br /><br />22 video interviews</p></a>';
	  break;
	   case 'a3':
	   tekst = '<a href="/excellence-club/experts/?vidId=a3" class="video-lnk"><h3>CLAUS-PETER ECHTER,</h3><p style="padding-bottom:5px;">heritage consultant<br /><br />22 video interviews</p></a>';
	  break;
	   case 'a4':
	   tekst = '<a href="/excellence-club/experts/?vidId=a4" class="video-lnk"><h3>ANKE SCHWARZWAELDER,</h3><p style="padding-bottom:5px;">leisure industry consultant<br /><br />22 video interviews</p></a>';
	  break;
	   case 'a6':
	   tekst = '<a href="/excellence-club/experts/?vidId=a6" class="video-lnk"><h3>Dr. CHRISTIAN M&Uuml;LLER,</h3><p style="padding-bottom:5px;">Straten<br /><br />22 video interviews</p></a>';
	  break;
	   case 'a7':
	   tekst = '<a href="/excellence-club/experts/?vidId=a7" class="video-lnk"><h3>BRIGITTE PRAGER,</h3><p style="padding-bottom:5px;">Koelnmesse<br /><br />22 video interviews</p></a>';
	  break;
	  default:
	}
return tekst;
}
 




// Accessible news slider 1.4
jQuery.fn.accessNews = function( settings ) {
	settings = jQuery.extend({
        headline : "Top Stories",
        speed : "normal",
		slideBy : 2
    }, settings);
    return this.each(function() {
		jQuery.fn.accessNews.run( jQuery( this ), settings );
    });
};
jQuery.fn.accessNews.run = function( $this, settings ) {
	jQuery( ".javascript_css", $this ).css( "display", "none" );
	var linkovi = 17;
	var ul = jQuery( "ul:eq(0)", $this );
	var li = ul.children();
	if ( li.length > settings.slideBy ) {
		var $next = jQuery( ".next > a", $this );
		var $back = jQuery( ".back > a", $this );
		var liWidth = jQuery( li[0] ).width();
		var animating = false;
		ul.css( "width", ( li.length * liWidth ) );
		$next.click(function() {
			if ( !animating ) {
				animating = true;
				offsetLeft = parseInt( ul.css( "left" ) ) - ( liWidth * settings.slideBy );
				 
				if ( offsetLeft + ul.width() > 0 ) {
					//$back.css( "display", "block" );
					ul.animate({
						left: offsetLeft
						
					}, settings.speed, function() {
						if ( parseInt( ul.css( "left" ) ) + ul.width() <= liWidth * settings.slideBy ) {
							//$next.css( "display", "none" );
						}
						animating = false;
					});
				} else {
					animating = false;
				}
			}
			return false;
		});
		$back.click(function() {
			if ( !animating ) {
				animating = true;
				offsetRight = parseInt( ul.css( "left" ) ) + ( liWidth * settings.slideBy );
				if ( offsetRight + ul.width() <= ul.width() ) {
					//$next.css( "display", "block" );
					ul.animate({
						left: offsetRight
					}, settings.speed, function() {
						if ( parseInt( ul.css( "left" ) ) == 0 ) {
							//$back.css( "display", "none" );
						}
						animating = false;
					});
				} else {
					animating = false;
				}
			}
			return false;
		});
		$next.css( "display", "block" )
	/*		.parent().after( [ "<p class=\"view_all\">", settings.headline, " - ", li.length, " total ( <a href=\"#\">view all</a> )</p>" ].join( "" ) );
		jQuery( ".view_all > a, .skip_to_news > a", $this ).click(function() {
			var skip_to_news = ( jQuery( this ).html() == "Skip to News" );
			if ( jQuery( this ).html() == "view all" || skip_to_news ) {
				ul.css( "width", "auto" ).css( "left", "0" );
				$next.css( "display", "none" );
				$back.css( "display", "none" );
				if ( !skip_to_news ) {
					jQuery( this ).html( "view less" );
				}
			} else {
				if ( !skip_to_news ) {
					jQuery( this ).html( "view all" );
				}
				ul.css( "width", ( li.length * liWidth ) );
				$next.css( "display", "block" );
			}
			return false;
		}); */
	}
};