﻿(function($) {
    $.fn.customFadeIn = function(speed, callback) {
        $(this).fadeIn(speed, function() {
            if (jQuery.browser.msie)
                $(this).get(0).style.removeAttribute('filter');
            if (callback != undefined)
                callback();
        });
    };
    $.fn.customFadeOut = function(speed, callback) {
        $(this).fadeOut(speed, function() {
            if (jQuery.browser.msie)
                $(this).get(0).style.removeAttribute('filter');
            if (callback != undefined)
                callback();
        });
    };
})(jQuery);


$().ready(function() {
    $('#dialog').jqm({ modal: true, onShow: function(h) {
        h.w.customFadeIn(888, function() {
            //no more fiddling with attributes here
        }); 
    }, onHide: function(h) {
        h.o.remove(); h.w.customFadeOut(888, function() {
            //no more fiddling with attributes here
       });
        
        
    }
   });
   $('#dialog2').jqm({ modal: true, trigger: 'a#feedbacktrigger', onShow: function(h) {
   	h.w.customFadeIn(888, function() {
   		//no more fiddling with attributes here
   	});
   }, onHide: function(h) {
   	h.o.remove(); h.w.customFadeOut(888, function() {
   		//no more fiddling with attributes here
   	});


   }
   });

   $('#dialog3').jqm({ modal: true, trigger: 'a#jobadtrigger', onShow: function(h) {
       h.w.customFadeIn(888, function() {
           //no more fiddling with attributes here
       });
   }, onHide: function(h) {
       h.o.remove(); h.w.customFadeOut(888, function() {
           //no more fiddling with attributes here
       });
   }
   });    
   
    
    
});
