var t;
var is_image_loaded = function(img) { 
    // IE 
    if(!img.complete) { 
        return false; 
    } 
    // Others 
    if(typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) { 
        return false; 
    } 
    return true; 
} 

//	$(".slideshow .slideshowslides").css({"display":'none'});

	function checkLoadedSlideshow(){
	var totalcount=0;
	var loadedcount=0;	

	$('.slideelement').each(function(){ totalcount+=1; });

	var slideshows=($('.slideelement').get());

	$('.slideelement').each(function(){ if(is_image_loaded($(this).get(0))) loadedcount+=1; });

	if(loadedcount==totalcount) {
		$(".slideshow .slideshowslides").css({"display":'block'});
		$(".slideshow .slideshowloader").css({"display":'none'});
	 	clearInterval(t);
		    $('.slideshowslides').cycle({
			fx: 'fade' 
		});
	}

	}

	function slideshowInit(){
	t=setInterval("checkLoadedSlideshow()",3000);
	}


