$(document).ready(function(){
   $('.hover').mouseover(function(){
        $(this).attr('src',$(this).attr('imgOver'));
    }).mouseout(function(){
        $(this).attr('src',$(this).attr('imgOut'));
    })

    ///Newsletter
   var  dialofNews=$('<div id="newsletter-dialog" title="Newsletter Status"></div>');
    dialofNews.dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        draggable: false,
        buttons: {
            "OK": function() {
                $( this ).dialog( "close" );
            }
        },
        minHeight: 150
    });

    var options = {
        beforeSubmit: function(formData, jqForm, options) {
            dialofNews.html('Sending Email...').show();
            dialofNews.dialog( "open" );
        },
        success:    function(responseText, statusText, xhr, $form)  {
            var result='';
            dialofNews.dialog( "open" );

            if(responseText=='OK'){
                result='Thank you for joining our E-Mail Exclusives mailing list.';
            }
            else{
                result=responseText;
            }
            dialofNews.html(result);

            $('#banner-newsletter form').clearForm();
        }
    };
    // pass options to ajaxForm
    $('#banner-newsletter form').ajaxForm(options);
});




