/** * * @author Ardeleanu Ionut * @langversion JAVASCRIPT * * http://www.appticles.com * ionut@appticles.com * alexandra@appticles.com * */ /* Browsers tested: IE6+, Firefox 3+, Opera 8+, Chrome, Safari 4 for windows*/ // hack for IE if (window.console === undefined) { var console = { log : function(param){ alert(param);} }; } var WMPJSInterface = function(){ var objects_arr = new Array(); return{ localpath: '', // domain path AjaxUpload: new WMPAjaxUpload(), // object that makes the upload of a form without refreshin via AJAX Preloader: new WMPPreloader(), // the preloader object used for sending data to server through AJAX Loader: new WMPLoader(), // the object used to display AJAX error messages /*****************************************************************************************/ /* INIT INTERFACE */ /*****************************************************************************************/ /** * initialize the WMPJSInterface * method type: LOCAL * params: none */ init: function(){ //when document is finish loaded, initialize the interface objects (UI_register, UI_users, UI_comments, etc) jQuery(document).ready(function(){ WMPJSInterface.Loader.init(); WMPJSInterface.initObjects(); }); }, /*****************************************************************************************/ /* INIT INTERFACE OBJECTS */ /*****************************************************************************************/ /** * initialize the WMPJSInterface objects * method type: LOCAL * params: none */ initObjects: function(){ for (var i=0; i= scrollTop && objTop < containerHeight+scrollTop){ if (objBottom > containerHeight+scrollTop){ jQuery(container).animate({scrollTop: objBottom-containerHeight }, 1000); } } else if (objTop >= containerHeight+scrollTop){ jQuery(container).animate({scrollTop: objBottom-containerHeight }, 1000); } } } }();