$(document).ready(function() {
	//menu
	
	$("#menuTrigger").toggle(function(){
		$("#menuContent").slideDown("slow");
	},function(){
		$("#menuContent").slideUp("slow");		
	}


	);
	

	
	
	//table
	$("#galleryTable").tableSorter({
		sortColumn: 'name',
		sortClassAsc: 'headerSortUp', 	
		sortClassDesc: 'headerSortDown',
		headerClass: 'header', 				
		stripingRowClass: ['even','odd'],	
		stripRowsOnStartUp: true
	});
	
	//image  thnag til frontpage
	$('div#showcase a').click(function() { // find all "a" tags in the document and attach onlick handler
		$('#placeholder').hide().attr('src', this.getAttribute ('href'));//hide the placeholder for images, change its src attribute to load new image 
		$('#description').html(this.getAttribute("title")||""); //replace the contents of h1 to the title of the thumbnail if it exists or empty if it doesn't
		return false; // prevent following links 
	});
	$('#placeholder').load(function(){$(this).fadeIn('slow');}); // when new image loads fade it in	



});


/*------
og her har vi så scriptet der kan hjælpe til et eller andet jeg er røv ligeglade med ...
wanker script der er let at omgås men som pladebranchen tror  at de får beskyttes deres kunsneret ... idioter ... så kan man vist ikke højreklikke eller noget ...
/morten.dk
-------*/

var clickmessage=" \u00a9 Jacob Dinesen"

function disableclick(e) {
 if (document.all) {
 if (event.button==2||event.button==3) {
 if (event.srcElement.tagName=="IMG"){
 alert(clickmessage);
 return false;
 }
 }
 }
 else if (document.layers) {
 if (e.which == 3) {
 alert(clickmessage);
 return false;
 }
 }
 else if (document.getElementById){
 if (e.which==3&&e.target.tagName=="IMG"){
 alert(clickmessage)
 return false
 }
 }
 }


function associateimages(){
 for(i=0;i<document.images.length;i++)
 document.images[i].onmousedown=disableclick;
 }


if (document.all)
 document.onmousedown=disableclick
 else if (document.getElementById)
 document.onmouseup=disableclick
 else if (document.layers)
 associateimages()