
$(document).ready(function() {
    flippingBook = new FlippingBook();
    var myPageArray = [];
    for (i = 1; i <= 52; i++) {
        myPageArray.push("pages/families/small/families_" + pad(i, 2) + ".jpg?scaleContent=false ");
    }

    flippingBook.pages = myPageArray;
    flippingBook.name = "Families";
    flippingBook.contents = [
	    {
	        label: "Editor's Note", imageUrl: "img/families_sum2012_editorsnote.gif", width: "210px", page: 2, highlight: false,
	        sub: []
	    },
	    {
	        label: "Health & Fitness", imageUrl: "img/families_sum2012_healthfitness.gif",
            page: 4,
	        sub: [
	            { label: "New year, new you", page: 4, highlight: false }, 
	            { label: "Are you trying to lose weight?", page: 6, highlight: false },
	            { label: "Zumba", page: 8, highlight: false },
	            { label: "Exercise for your decade", page: 10, highlight: false }
	        ]
	    },
        {
            label: "Wellbeing", imageUrl: "img/families_sum2012_wellbeing.gif",
            page: 13,
        	sub: [
	            { label: "Hormones and your health", page: 13, highlight: false },
	            { label: "Green tea for healthy gums", page: 16, highlight: false },
	            { label: "Protect your eyes on the sun", page: 17, highlight: false },
                { label: "Motherhood from an athelete", page: 18, highlight: false }
	        ]
        },
        {
            label: "Get Connected", imageUrl: "img/families_sum2012_getconnected.gif",
            page: 20,
            sub: [
	            { label: "A new leader for a new era", page: 20, highlight: false },
	            { label: "Managing your membership online", page: 22, highlight: false },
                { label: "Looking for the best hospital and extras cover?", page: 24, highlight: false },
                { label: "Active in parks", page: 26, highlight: false },
                { label: "Imagine having your own health coach", page: 28, highlight: false },
                { label: "Make your health a priority when you're sick", page: 30, highlight: false }
	        ]
        },
        {
            label: "Nutrition", imageUrl: "img/families_sum2012_nutrition.gif",
            page: 32,
        	sub: [
	            { label: "Eating for energy", page: 32, highlight: false },
                { label: "Scrumptious summer recipes", page: 35, highlight: false }
	        ]
        },
	    {
	        label: "Kid's health", imageUrl: "img/families_sum2012_kidshealth.gif",
	        page: 38,
	        sub: [
	            { label: "Australian children missing out on calcium", page: 38, highlight: false },
	            { label: "Top nutrition tips for summer holidays", page: 39, highlight: false },
	            { label: "Plan a wiggle party", page: 40, highlight: false },
	            { label: "Wiggle into health party recipes", page: 42, highlight: false }
	        ]
	    },
        {
            label: "Travel", imageUrl: "img/families_sum2012_travel.gif",
            page: 44,
	        sub: [
	                { label: "Travel doctor", page: 44, highlight: false },
	                { label: "The family that travels together", page: 45, highlight: false },
	            ]
	    },
        {
            label: "Pet", imageUrl: "img/families_sum2012_pet.gif",
            page: 46,
	        sub: [
	            { label: "Dr Chris partners up with Medibank", page: 46, highlight: false },
                { label: "Your best mate deserves the best care", page: 49, highlight: false }
	        ]
	    },
	    {
	        label: "Life", imageUrl: "img/families_sum2012_life.gif",
	        page: 50,
	        sub: [
	            { label: "Protect your lifestyle", page: 50, highlight: false },
	            { label: "Outstanding value life insurance", page: 51, highlight: false }
                
	        ]
	    }//,
        //{
        //    label: "life", imageUrl: "img/families_spring2011_life.gif",
        //    page: 51,
        //    sub: [
	    //        { label: "The luckiest generation", page: 51, highlight: false }
	    //    ]
        //}
//        {
//            label: "life", imageUrl: "img/families_life.gif",
//	        sub: [
//	            { label: "Protecting my family is important", page: 51, highlight: false }
//	        ]
//	    },

    ];

    flippingBook.competitions = [];

    // define custom book settings here
    flippingBook.settings.bookWidth = 654;
    flippingBook.settings.bookHeight = 464;
    flippingBook.settings.pageBackgroundColor = 0xffffff;
    flippingBook.settings.backgroundColor = 0xffffff;
    flippingBook.settings.zoomUIColor = 0x919d6c;

    //flippingBook.settings.backgroundImage = "";
    flippingBook.settings.backgroundImagePlacement = "fit"; // "top left", "center", "fit"
    flippingBook.settings.smoothPages = true;
    flippingBook.settings.useCustomCursors = false;
    flippingBook.settings.dropShadowEnabled = true,
    flippingBook.settings.dropShadowHideWhenFlipping = true,
    flippingBook.settings.zoomImageWidth = 660;
    flippingBook.settings.zoomImageHeight = 937;
	flippingBook.settings.zoomOnClick = true;
    flippingBook.settings.downloadURL = "pdf/families_web.pdf";
    flippingBook.settings.downloadSize = "Size: 3.1 Mb";
    flippingBook.settings.hardcover = false;
    flippingBook.settings.hardcoverThickness = 8;
    //flippingBook.settings.navigationFlipOffset = 30;
    //flippingBook.settings.rigidPages = true;
    flippingBook.settings.preloaderType = "Gradient Wheel"; // "Progress Bar", "Round", "Thin", "Dots", "Gradient Wheel", "Gear Wheel", "Line", "Animated Book", "None"
    flippingBook.settings.loadOnDemand = true;
    flippingBook.settings.darkPages = false;
    flippingBook.settings.centerBook = true;
    flippingBook.settings.flipSound = "sounds/02.mp3";
    flippingBook.settings.flipOnClick = true;
    flippingBook.settings.moveSpeed = 3;
    flippingBook.settings.gotoSpeed = 1;
    flippingBook.settings.flipCornerStyle = "first page only"; // or "manually"
    flippingBook.settings.FrameAlpha = 100;
    flippingBook.settings.zoomHint = "Double click to zoom";
    flippingBook.settings.zoomHintEnabled = false;
    // default settings can be found in the flippingbook.js file
    flippingBook.create();
});




