// when the DOM is ready...
jQuery(document).ready(function () {

	jQuery.post(
		'/wp-content/themes/flt/gallery.inc.php',
		{type: "shop"},
		function(data) {
			// Fade out loading
			jQuery('#sploading').fadeOut('slow');
			
			displaySlider(data.output);
		},
		"json"
	);
	
	
	jQuery.post(
		'/wp-content/themes/flt/gallery.inc.php',
		{type: "recent", qty: '12'},
		function(data) {
			// Fade out loading
			jQuery('#rtloading').fadeOut('slow');
			
			jQuery('#rtpics').html(data.output);
			
		},
		"json"
	);
	



});


function displaySlider(html) {
	
	// Write html to slider div
	jQuery('#spics').html(html);
	
	// Show slider Div
	jQuery('#spics').fadeIn('slow');
	
	//Slider
	jQuery('#spics').easySlider({
		auto: true,
		continuous: true,
		controlsShow: false,
		pause: 5000
	});

}