$(function() {
    //Copy the paragraph of text after the image into the img link title attribute, attach lightbox	
    $('.items a').each( function() {
       var parent = $(this).parent();
       var imageDescription = $("p", parent).html();
       
       //Store image desciption so it can be used in the lightbox
       //Customised lightbox looks for title at $(element).data('lightBoxTitle') ?
       $(this).data("lightBoxTitle", imageDescription);
       $(this).attr("rel", imageDescription);
    });

    var tooltipOptions = {
        content : "Click for large image and price",
        offset	: [0, 0],
        showEffect : "none",
        hideEffect  : "none",
        fixed	: false 
    };
    
    $('.items a:not([class="no-price"])').simpletip( tooltipOptions );
    
    tooltipOptions.content = "Click for large image";
	$('.items a[class="no-price"]').simpletip( tooltipOptions );
    
    $('.items a').simpletip( {
			content : "Click for large image and price",
			offset	: [0, 0],
            showEffect : "none",
            hideEffect  : "none",
			fixed	: false 
    });
    
    $(".items a").lightBox();
        

});
