
////////////Photo Gallery////////////////START
jQuery(document).ready(function() {

	 jQuery.ajax({
                type: "GET",
                url: "http://www.rajewski.ca/galleries/kay-cross-county/PhotoGallery.xml", // location of your gallery's xml file
                dataType: "xml",
                success: function(xml) {


                    jQuery(xml).find('img').each(function() {

                       var location = '/galleries/kay-cross-county/'; // relative path to the directory that holds your images
                       var url = $(this).attr('src');
                        var alt = $(this).attr('alt');

                        jQuery('<li></li>').html('<a href="../kay-cross-county/'+location+''+url+'" rel="prettyPhoto[gallery]"><img class="thumb" src="../kay-cross-county/'+location+''+url+'" alt="'+alt+'" title="'+alt+'" /></a>').appendTo('#gallery-ul');

                    });     
					jQuery("a[rel^='prettyPhoto']").prettyPhoto();        
                }
				
            });
		
});
////////////Photo Gallery////////////////END

////////////Pedigree/////////////////////START
jQuery(document).ready(function(){
	jQuery.ajax({
		type: "GET",
		url: "http://www.rajewski.ca/Reference Sires/kay-cross-county/pedigree.xml",
		dataType: "xml",
		success: function(xml) {
			jQuery(xml).find('horse').each(function(){
				var lineage = jQuery(this).attr('lineage');
				var position = jQuery(this).attr('position');
				var name = jQuery(this).find('name').text();
				var registration = jQuery(this).find('registration').text();
				var color = jQuery(this).find('color').text();
				var points = jQuery(this).find('points').text();
				var earned = jQuery(this).find('earned').text();
				var summary = jQuery(this).find('summary').text();
				jQuery('#'+lineage+'-'+position+'-name').append(name);
				jQuery('#'+lineage+'-'+position+'-registration').append(registration);
				jQuery('#'+lineage+'-'+position+'-color').append(color);
				jQuery('#'+lineage+'-'+position+'-points').append(points);
				jQuery('#'+lineage+'-'+position+'-earned').append(earned);
				jQuery('#'+lineage+'-'+position+'-summary').append(summary);
			});
		}
	});
});
////////////Pedigree/////////////////////END
