// use window load, after all images are loaded, since #content-pages will not have correct height before that
$(window).load(
	function() {
	 	$("#content-pages").height($("#content-pages > div.page:first-child").height());		
	}
);

$(document).ready(function() {	
    var pageCnt = $("#content-pages > div.page").size();

    if (pageCnt > 1) {

            $('#content-pages').cycle({
        	    fx:                 'none',
        	    speed:              'fast',
        	    timeout:            0,
                //height:             'auto',
                pager:              '#pager',
                after:             function(currSlideElement, nextSlideElement, options, forwardFlag)
                {
                    $('#content-pages').height( $(nextSlideElement).height() );
                }
            });



    }


});
