/*** All Javascript for UX and fancy stuff ***/
/*** Open/Close Divs (default) ***/
    $(document).ready(function(){
	$('#LDM-work-poker').hide();
	$('a.click').click(function(){
	$('#LDM-work-poker').show('slow')
	$('#LDM-workcontent,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-poker').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (partypoker) ***/
    $(document).ready(function(){
	$('#LDM-work-poker').hide();
	$('a.clickpoker').click(function(){
	$('#LDM-work-poker').show('slow')
	$('#LDM-workcontent,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-poker').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (BandH) ***/
    $(document).ready(function(){
	$('#LDM-work-bandh').hide();
	$('a.clickbandh').click(function(){
	$('#LDM-work-bandh').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-bandh').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (Cazadores) ***/
    $(document).ready(function(){
	$('#LDM-work-cazadores').hide();
	$('a.clickcazadores').click(function(){
	$('#LDM-work-cazadores').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-cazadores').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (Ed) ***/
    $(document).ready(function(){
	$('#LDM-work-ed').hide();
	$('a.clicked').click(function(){
	$('#LDM-work-ed').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-ed').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (maxus) ***/
    $(document).ready(function(){
	$('#LDM-work-maxus').hide();
	$('a.clickmaxus').click(function(){
	$('#LDM-work-maxus').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-maxus').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (Nobo) ***/
    $(document).ready(function(){
	$('#LDM-work-nobo').hide();
	$('a.clicknobo').click(function(){
	$('#LDM-work-nobo').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-fiat,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-nobo').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (Fiat) ***/
    $(document).ready(function(){
	$('#LDM-work-fiat').hide();
	$('a.clickfiat').click(function(){
	$('#LDM-work-fiat').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-sthree,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-fiat').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (Sthree) ***/
    $(document).ready(function(){
	$('#LDM-work-sthree').hide();
	$('a.clicksthree').click(function(){
	$('#LDM-work-sthree').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-thegate').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-sthree').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});
/*** Open/Close Divs (thegate) ***/
    $(document).ready(function(){
	$('#LDM-work-thegate').hide();
	$('a.clickthegate').click(function(){
	$('#LDM-work-thegate').show('slow')
	$('#LDM-workcontent,#LDM-work-poker,#LDM-work-bandh,#LDM-work-cazadores,#LDM-work-ed,#LDM-work-maxus,#LDM-work-nobo,#LDM-work-fiat,#LDM-work-sthree').hide('fast');
	});
	$('a.close').click(function(){
	$('#LDM-work-thegate').hide('slow')
	$('#LDM-workcontent').show('fast');
	})
	});

/*** Hover colour thumbnails ***/
$(document).ready(function() {

	$("ul.gallery li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});

});

