
function showlink(el)
{
	var myelement = el.getAttribute("overhref");
	var mylink_text = document.getElementById(myelement);
	var project_link =  document.getElementById('projekt_link') ;
	var project_link_value =  document.getElementById('project_link_value') ;
	project_link.href = mylink_text;
	project_link_value.innerHTML= mylink_text;
}
function SimpleSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
     var gallery_img =  x[i].getAttribute("gallery_img");
	 x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
	x[i].onclick=new Function("crossFade(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
//window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();preloadImages();GallerySetup();}
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();GallerySetup();}

function GallerySetup()
{	
	visibleImage = "#bild1";
	hiddenImage = "#bild2";
}

function crossFade(el)
{

var tempimage = hiddenImage;

var index  =  el.getAttribute("gallery_img");
$(hiddenImage).attr("src", './gallery/' + image_list[index].src);
$(hiddenImage).fadeIn(fadeTime);
$(visibleImage).fadeOut(fadeTime);

hiddenImage = visibleImage;
visibleImage = tempimage;
$("#gallery_text").html(image_list[index].text);
}


function preloadImages()
{
	if (document.images)
	{
		for (var i=1;i<image_list.length;i++)
		{
			image_list[i].image = new Image();
			image_list[i].image.src= galleryPath + image_list[i];	
			//alert(image_list[i].text);
		}
	}
}

function GalleryImage()
{
this.src = "";
this.image = "";
this.text = "";
}

var hiddenImage;
var visibleImage;
var galleryPath = "./gallery/";
var fadeTime = 2000;

var image_list=[]; 
image_list[1]= new GalleryImage();
image_list[1].src = 'fuggerhaus_casanova.jpg';
image_list[1].text='Fuggerhaus - Casanova';

image_list[2]= new GalleryImage();
image_list[2].src = 'fuggerhaus_chantal.jpg';
image_list[2].text='Fuggerhaus - Chantal'; 

image_list[3]= new GalleryImage();
image_list[3].src = 'fuggerhaus_safari.jpg';
image_list[3].text='Fuggerhaus - Safari';

image_list[4]= new GalleryImage();
image_list[4].src = 'fuggerhaus_trip.jpg';
image_list[4].text='Fuggerhaus - Trip';

image_list[5]= new GalleryImage();
image_list[5].src = 'jab_anstoetz_cherbourg.jpg';
image_list[5].text='Jab Anstoetz - Cherbourg';

image_list[6]= new GalleryImage();
image_list[6].src = 'jab_anstoetz_cherbourg_5.jpg';
image_list[6].text='Jab Anstoetz - Cherbourg 5'; 

image_list[7]= new GalleryImage();
image_list[7].src = 'jab_anstoetz_daloa_pulcinella.jpg';
image_list[7].text='Jab Anstoetz - Daloa Pulcinella';

image_list[8]= new GalleryImage();
image_list[8].src = 'jab_anstoetz_dsc_0018.jpg';
image_list[8].text='Jab Anstoetz - DSC 0018'; 

image_list[9]= new GalleryImage();
image_list[9].src = 'jab_anstoetz_ganges_detail.jpg';
image_list[9].text='Jab Anstoetz - Ganges Detail'; 

image_list[10]= new GalleryImage();
image_list[10].src = 'jab_anstoetz_ganges_detail_1.jpg';
image_list[10].text='Jab Anstoetz - Ganges Detail 1';

image_list[11]= new GalleryImage();
image_list[11].src = 'jab_anstoetz_havanna_bed.jpg';
image_list[11].text='Jab Anstoetz - Havanna Bed';

image_list[12]= new GalleryImage();
image_list[12].src = 'jab_anstoetz_india.jpg';
image_list[12].text='Jab Anstoetz - India';

image_list[13]= new GalleryImage();
image_list[13].src = 'jab_anstoetz_kenia.jpg';
image_list[13].text='Jab Anstoetz - Kenia';

image_list[14]= new GalleryImage();
image_list[14].src = 'jab_anstoetz_kueche_5.jpg';
image_list[14].text='Jab Anstoetz - Kueche 5';

image_list[15]= new GalleryImage();
image_list[15].src = 'jab_anstoetz_kueche_b.jpg';
image_list[15].text='Jab Anstoetz - Kueche B';

image_list[16]= new GalleryImage();
image_list[16].src = 'jab_anstoetz_leather_babel.jpg';
image_list[16].text='Jab Anstoetz - Leather Babel';

image_list[17]= new GalleryImage();
image_list[17].src = 'jab_anstoetz_lias.jpg';
image_list[17].text='Jab Anstoetz - Lias';

image_list[18]= new GalleryImage();
image_list[18].src = 'jab_anstoetz_lomo.jpg';
image_list[18].text='Jab Anstoetz - Lomo';

image_list[19]= new GalleryImage();
image_list[19].src = 'jab_anstoetz_lotuskissen.jpg';
image_list[19].text='Jab Anstoetz - Lotuskissen';

image_list[20]= new GalleryImage();
image_list[20].src = 'jab_anstoetz_masterbedroom.jpg';
image_list[20].text='Jab Anstoetz - Master Bedroom';

image_list[21]= new GalleryImage();
image_list[21].src = 'jab_anstoetz_out_1.jpg';
image_list[21].text='Jab Anstoetz - Out 1';
 
image_list[22]= new GalleryImage();
image_list[22].src = 'jab_anstoetz_out_2.jpg';
image_list[22].text='Jab Anstoetz - Out 2';

image_list[23]= new GalleryImage();
image_list[23].src = 'jab_anstoetz_salon.jpg';
image_list[23].text='Jab Anstoetz - Salon';

image_list[24]= new GalleryImage();
image_list[24].src = 'jab_anstoetz_salon_milieu.jpg';
image_list[24].text='Jab Anstoetz Salon Milieu';

image_list[25]= new GalleryImage();
image_list[25].src = 'jab_anstoetz_score_mil.jpg';
image_list[25].text='Jab Anstoetz - Score Mil';

image_list[26]= new GalleryImage();
image_list[26].src = 'jab_anstoetz_showroom.jpg';
image_list[26].text='Jab Anstoetz - Showroom';

image_list[27]= new GalleryImage();
image_list[27].src = 'jab_anstoetz_villa_dest_trim.jpg';
image_list[27].text="Jab Anstoetz - Villa d'est trim";

image_list[28]= new GalleryImage();
image_list[28].src = 'jab_anstoetz_wohnen_a.jpg';
image_list[28].text='Jab Anstoetz - Wohnen';

image_list[29]= new GalleryImage();
image_list[29].src = 'jab_anstoetz_wohnen_c.jpg';
image_list[29].text='Jab Anstoetz - Wohnen C';

image_list[30]= new GalleryImage();
image_list[30].src = 'jab_anstoetz_yeras_kabuki.jpg';
image_list[30].text='Jab Anstoetz - Yeras Kabuki';

image_list[31]= new GalleryImage();
image_list[31].src = 'kinnesand_crash.jpg';
image_list[31].text='Jab Anstoetz - Crash';

image_list[32]= new GalleryImage();
image_list[32].src = 'kinnesand_filou.jpg';
image_list[32].text='Kinnesand - Filou';

image_list[33]= new GalleryImage();
image_list[33].src = 'kinnesand_flicflac.jpg';
image_list[33].text='Kinnesand - Flicflac';

image_list[34]= new GalleryImage();
image_list[34].src = 'kinnesand_flicflac_detail.jpg';
image_list[34].text='Kinnesand - Flicflac Detail';

image_list[35]= new GalleryImage();
image_list[35].src = 'kinnesand_lola.jpg';
image_list[35].text='Kinnesand - Flicflac Lola';

image_list[36]= new GalleryImage();
image_list[36].src = 'kinnesand_marla.jpg';
image_list[36].text='Kinnesand - Flicflac Marla';

image_list[37]= new GalleryImage();
image_list[37].src = 'kinnesand_moa.jpg';
image_list[37].text='Kinnesand - Flicflac Moa';

image_list[38]= new GalleryImage();
image_list[38].src = 'kinnesand_sinah.jpg';
image_list[38].text='Kinnesand - Flicflac Sinah';

image_list[39]= new GalleryImage();
image_list[39].src = '01.jpg';
image_list[39].text='';

image_list[40]= new GalleryImage();
image_list[40].src = '01.jpg';
image_list[40].text='';


 

