Cufon.replace('.cufon');

jQuery(document).ready(function(jQuery) {




    /*

    if (jQuery("#slideshow").length > 0) {
        jQuery('#slideshow').cycle({
            fx: 'fade',
            timeout: 4000,
            speed: 3000
        });
    }
*/


    jQuery('.add-to-cart').live("click", function() {
        
        //if ($("form.validate").validate().form()) {
            jQuery.ajax({
                type: "POST",
                url: "/wordpress/wp-content/themes/playlight/includes/add-to-cart.php",
                data: jQuery(this).closest('form').serialize(),
                success: function(response){
                    jQuery("#summary").html(response)
                }
            })
        //}
        return false;
    });

    
/*




    jQuery(function() {
        jQuery(".draggable").draggable({
            containment: 'document',
            opacity: 0.6,
            revert: 'invalid',
            helper: 'clone',
            zIndex: 100,
            cursor: 'move',
            delay: 200
        });
           })

        jQuery("#drop-zone").droppable({
            hoverClass: 'ui-state-active',
            drop: function(event, ui) {
                //jQuery(this).addClass('ui-state-highlight').find('p').html('Dropped!');
                //var param = jQuery(ui.draggable).find('input[name=id]').val();
                //alert(param);
                jQuery.ajax({
                    type: "POST",
                    url: "/add-to-cart.php",
                    data: jQuery(this).closest('form').serialize(),
                    success: function(response){
                        jQuery("#drop-zone").html(response)
                    }
                })
            }
        });

*/

jQuery("a.colorbox").colorbox({innerWidth:600,innerHeight:500});

/*
        jQuery("a.fancybox").fancybox({
            'speedIn': 600,
            'speedOut': 200,
            'overlayOpacity': 0.7,
            'autoDimensions': false,
            'hideOnContentClick': false,
            'width': 800,
            'height': 600//,
            //'titlePosition': 'inside'
        });

        /*


        if (jQuery("form.validate").length > 0) {
            jQuery("form.validate").validate({
                submitHandler: function(form) {
                    jQuery("input.submit").attr('disabled', 'disabled');
                    form.submit();
                }
            });
        }


*/

});
