$(document).ready(function() {
        var z = 0; //for setting the initial z-index's
        var imgLoaded = 0; //for checking if all images are loaded
           $('#showcase').append('<div id="loader"></div>'); //append the loader div, it overlaps all pictures
           $('#showcase img').each(function() { 
               z++;
                   $(new Image()).attr('src', $(this).attr('src')).load(function() { //create new image object and have a callback when it's loaded
               imgLoaded++; //one more image is loaded
      
               if(imgLoaded == z) { //do we have all pictures loaded?
                   $('#loader').fadeOut('slow'); //if so fade out the loader div
					
               }
			 });
           });			 
		   $("#showcase").showcase({
				 css: {  },
                 animation: { type: "fade",
                   interval: 4500,
               	   stopOnHover: true,
                   speed: 600 },
                 images: [],
              navigator: {
                position: "bottom-left",
                css: { padding:"0 20px",
				
                margin: "0px 0px 1px 1px" },
                showNumber: true,
              item: {
                css: { color:"#ffffff",
				       height:"40px",
					   paddingTop:"24px",
                       "line-height":"16px",
                       width:"37px",
                       "-moz-border-radius": "0px",
                       "-webkit-border-radius": "0px",
					   backgroundPosition: "-80px 0px",
                       backgroundColor: "transparent",
                       borderColor:"transparent",
                       margin: "0px",
                       "text-align": "center",
                       "vertical-align": "bottom" },
                cssHover: {
				  backgroundPosition: "0px 0px",
                  backgroundColor: "transparent",
                  borderColor: "transparent" },
                cssSelected: {
				  backgroundPosition: "-40px 0px",
                  backgroundColor: "transparent",
                  borderColor: "transparent" }
              }
            },
            titleBar: { enabled: false }
         });
});
