/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2010 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 254 2010-07-23 05:14:44Z emartin24 $
 */

function myOpen(dialog){
	dialog.overlay.fadeIn('slow', function () {
		dialog.container.slideDown('slow', function () {
			dialog.data.fadeIn('slow');
		});
	});
}
function myClose(dialog){
	dialog.data.fadeOut('slow', function () {
		dialog.container.slideUp('slow', function () {
			dialog.overlay.fadeOut('slow', function () {
				$.modal.close(); // must call this!
			});
		});
	});
}

jQuery(function ($) {
	// Load dialog on page load
	//$('#basic-modal-content').modal();

	// Load dialog on click 
	$('#abex-rack').click(function (e) {
		$('#abex-modal').modal({ onOpen: myOpen, onClose: myClose, 
			containerCss:{
				backgroundColor:"#fff",
				borderColor:"#000",
				height:300,
				padding:0,
				width:400
			}
		});
		return false;
    });
    $('#champion-rack').click(function (e) {
        $('#champion-modal').modal({ onOpen: myOpen, onClose: myClose,
            containerCss: {
                backgroundColor: "#fff",
                borderColor: "#000",
                height: 300,
                padding: 0,
                width: 400
            }
        });
        return false;
    });
    $('#fpdiesel-rack').click(function (e) {
        $('#fpdiesel-modal').modal({ onOpen: myOpen, onClose: myClose,
            containerCss: {
                backgroundColor: "#fff",
                borderColor: "#000",
                height: 550,
                padding: 0,
                width: 800
            }
        });
        return false;
    });
    $('#moog-rack').click(function (e) {
        $('#moog-modal').modal({ onOpen: myOpen, onClose: myClose,
            containerCss: {
                backgroundColor: "#fff",
                borderColor: "#000",
                height: 300,
                padding: 0,
                width: 400
            }
        });
        return false;
    });
    $('#national-rack').click(function (e) {
        $('#national-modal').modal({ onOpen: myOpen, onClose: myClose,
            containerCss: {
                backgroundColor: "#fff",
                borderColor: "#000",
                height: 300,
                padding: 0,
                width: 400
            }
        });
        return false;
    });
    $('#wagner-rack').click(function (e) {
        $('#wagner-modal').modal({ onOpen: myOpen, onClose: myClose,
            containerCss: {
                backgroundColor: "#fff",
                borderColor: "#000",
                height: 300,
                padding: 0,
                width: 400
            }
        });
        return false;
    });
});
