/*
=============================================================
	Site: 		Quilo.co.uk
	Version:	1.0.0
	Author:		Warren Buckley
	Site:		http://ww.creativewebspecialist.co.uk
=============================================================	
*/


//Lets only start doing things when DOM has fully loaded
$(document).ready(function() {
	
	//Image caption slideup div
	$(".thumbRollover").each(function() {
		// For each item with CSS class thumbRollover
		
		//Setup this Variable for photoBorder
		var tH = $(this);
		
		//Lets get image caption and store in Variable
		var imgTitle = 	$(this).find("img").attr("title");
		
		//Create a new div after img to store this text in
		
        var strHTML = "<div class='imageCaption'>"
		strHTML = strHTML + "<p>"
        strHTML = strHTML + imgTitle
		strHTML = strHTML + "</p>"
       	strHTML = strHTML + "</div>"
                       
            
		//Lets add the new DIV after the image
        $(this).find("img").after(strHTML);
		
		//Lets hide the DIV
        //$(this).find("div").hide();
		
		
		//Rollover photoBorder div
		$(this).hover(
			function () {
				$(tH).find("div").slideDown();
			}, 
			function () {
				$(tH).find("div").slideUp();				
			}
		);	
		
		
	});

});						   
