$(document).ready(function(){
            //define config object
            var dialogOpts = {
                    modal: true,
                    autoOpen: false,
                    height: 500,
                    width: 500
                    };
            $("#jui_dialog_page_location").dialog(dialogOpts);    //end dialog


            $('#contact-form').click(
                function (){
                    $('#jui_dialog_page_location').data('title.dialog', 'ASK DICK');
                    $("#modalIframeId").attr("src","index_ask_dick_form.php");
                    $("#jui_dialog_page_location").dialog("open");
                    return false;
                }
            );

            $('#contact_us').click(
                function (){
                    $('#jui_dialog_page_location').data('title.dialog', 'CONTACT US');
                    $("#modalIframeId").attr("src","contact_form.php");
                    $("#jui_dialog_page_location").dialog("open");
                    return false;
                }
            );

            $('#contact_adv').click(
                function (){
                    $('#jui_dialog_page_location').data('title.dialog', 'SEND ME ADVERTISING INFORMATION');
                    $("#modalIframeId").attr("src","contact_form_custom.php?msg_src=adv");
                    $("#jui_dialog_page_location").dialog("open");
                    return false;
                }
            );
              
            var cea_dialogOpts = {
                    modal: true,
                    autoOpen: false,
                    height: 800,
                    width: 800
                    };
            $("#cea_dialog_page_location").dialog(cea_dialogOpts);    //end dialog   
              
              
              
           $('#cea_links').click(
                function (){
                    $("#cea_href").trigger('click');
                });  
              
              
              
            $('#reload_cache').click(
                        function() {
                                    location.reload();
                        }
            )
});
