/*
	Project: www.amberpeaks.com
	Section: Homepage javascript lib
	Date: 2009-06-05
	Author: David Roessli (david.roessli@cybmed.com)
	Version: 1
	Revision: 0
	Language: en
	
	History:

		200703121337: genesis - happy birthday Mathias!

    Notes:
    
    - language is hardcoded for the time being
*/
$(document).ready(function(){
	
	$("#langnav").css("display","none");
	$("div#lang p a").click(function(event) {
     	event.preventDefault();
		$("#langnav").toggle("slow");
	});

	// $("div.flickr_badge_image a").click(function(event) {
	//     event.preventDefault();
	// 	var imglink = $(this).attr("href");
	// 	// var imgsrc  = '<a href="' + imglink + '" title="View this photo on Flickr">' + $(this).html().replace("_s","").replace('height="75"',' ').replace('width="75"',' ') + '</a>';
	// 	var imgsrc  = '<a href="' + imglink + '" title="View this photo on Flickr">' + $(this).html().replace("_s","").replace("width","longdesc").replace("height","longdesc") + '</a>';
	// 	$("div#mainframe").hide(); $("div#mainframe").html(imgsrc); $("div#mainframe").fadeIn("slow");
	// });

	// $("div.tmbox a").click(function(event) {
	//     event.preventDefault();
	// 	var imglink = $(this).attr("href");
	// 	// var imgsrc  = '<a href="' + imglink + '" title="View this photo">' + $(this).html().replace("_s","_m") + '</a>';
	// 	var imgsrc  = '<a href="/" title="View this photo">' + $(this).html().replace("_s","_m") + '</a>';
	// 	$("div#mainframe").hide(); $("div#mainframe").html(imgsrc); $("div#mainframe").fadeIn("slow");
	// });

	$("div.tmbox a").click(function(event) {
	    event.preventDefault();
		var imglink = $(this).attr("href");
		var imgsrc  = $(this).html().replace("_s","_m");
		$("#mainlink").hide(); $("#mainlink").html(imgsrc); $("#mainlink").fadeIn("slow");
	});
 });

