$(document).ready(function() {

    var fancybox_defaults = {
        overlayShow: true, 
        overlayOpacity: 0.2,
        frameWidth: 600, frameHeight: 400,
        zoomSpeedIn: 0, zoomSpeedOut: 0
    };

    // set up fancyboxen - top of group page, big pic, small pics, video, all invoked as one...
	$("#item-media a").fancybox(fancybox_defaults);
	//$("#product-image a").fancybox({'overlayShow': true });
    //$("#alternate-image-box a").fancybox({'overlayShow': true });
    // $("#alternate-image-box-option a")
    //$('NOTUSEDfancy-video')

    // must invoke these separately so it doesn't conjoin them
    var reviewbox = {
        overlayShow: true,
        overlayOpacity: 0.2,
        zoomSpeedIn: 0, zoomSpeedOut: 0,
        frameWidth: 720,
        frameHeight: 540
    };

    $('a#fancybox-reviews').fancybox(reviewbox);
    $('a#fancybox-reviews2').fancybox(reviewbox);


//    $('#fancybox-reviews2').fancybox(fbreviews);

    // The table of individual products after selecting vehicle.
    $("a.product-image-link").fancybox({'overlayShow': true });
	
    // set up group text tabs    
    var itabs=new ddajaxtabs("infotablist", "group-tabs");
    itabs.setpersist(false);
    itabs.setselectedClassTarget("link"); //"link" or "linkparent"
    itabs.init();

    // set up groupPage object (defined in aagarage.js)
    var groupPage = new GroupPage();    
});
/*
   $('#vehicle-not-listed').each(function() {
    $(this).qtip({
                 content: {
                    // Set the text to an image HTML string with the correct src URL to the loading image you want to use
                    text: '<img class="throbber" src="/img/design/ajax/load-default.gif" alt="Loading..." />',
                    url: $(this).attr('href'), // Use the rel attribute of each element for the url to load
                    title: {
                       text: 'Vehicle Not Listed?', // Give the tooltip a title using each elements text
                       button: 'Close' // Show a close link in the title
                    }
                 },
                 position: {
                    corner: {
                       target: 'bottomRight', // Position the tooltip above the link
                       tooltip: 'topLeft'
                    },
                    adjust: {
                       screen: true // Keep the tooltip on-screen at all times
                    }
                 },
                 show: { 
                    when: 'mouseover', 
                    solo: true // Only show one tooltip at a time
                 },
                 hide: { fixed: true, delay: 1000 },
                 style: {
                    tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
                    border: {
                       width: 0,
                       radius: 4
                    },
                    name: 'light', // Use the default light style
                    width: 270 // Set the tooltip width
                 }
              })
    });
*/            
