$(document).ready(function(){
	$.getScript('http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js',
		function(){
			
			var flashvars = false;
			var params = {
			  menu: "false",
			  wmode: "transparent",
			  flashvars: "site=http://www.anypet.com/&page=dogs&bordercolor=660033&txtcolor=BF6000"
			};
			var attributes = {
			  id: "dog_gallery",
			  name: "dog_gallery"
			};
			
			swfobject.embedSWF("http://www.anypet.com/slideshow_sm.swf", "doggallery", "81", "81", "9.0.0","images/expressInstall.swf", flashvars, params, attributes);
			

			var params = {
			  menu: "false",
			  wmode: "transparent",
			  flashvars: "site=http://www.anypet.com/&page=cats&bordercolor=660033&txtcolor=BF6000"
			};
			var attributes = {
			  id: "cat_gallery",
			  name: "cat_gallery"
			};
			
			swfobject.embedSWF("http://www.anypet.com/slideshow_sm.swf", "catgallery", "81", "81", "9.0.0","images/expressInstall.swf", flashvars, params, attributes);
			
		});
	$.getScript('http://www.pets4you.com/js/home_gallery_conf.js',
		function(){
			HomeGallery.init();
		});
});
var hss = '';
var ihss = '';
var totalFiles = 0;
var currentFile = 0;
var HomeGallery = {
	init:function(){
		$('#galimage').click(
			function(){
				window.open('http://www.pets4you.com/gallery/', '_self');	
			});
		totalFiles = gallery.length;
		this.load();
	},
	load:function(){
		if(currentFile == totalFiles){
			currentFile = 0;
		}
		var d = gallery[currentFile];
		$('#galimage div').fadeOut(
			function(){
				$('#petgallcaption').html(d.title);
				$('#galimage div').html('<img src="'+d.source+'" width="'+d.height+'" height="'+d.width+'" alt="'+d.title+'" />');
				ihss = setTimeout("$('#galimage div').fadeIn();",500);
			});
		
		hss = setTimeout("HomeGallery.load();",5000);
		currentFile += 1;
	}
}
