var _now_loading_id; /*--------------------------------------------------------------------------*/ var MovieCtrl = function(){ this.initialize.apply(this); } MovieCtrl.prototype = { initialize: function(){ this._modname = 'movie'; this._loading_id = 'now_loading'; }, // movie ---------------------------------------------------------------------- // // // clearLoading: function(){ jQuery('#'+_now_loading_id).css('display', 'none'); }, // // // getBestMovieList: function( elemid, offset, limit, op, func, async ){ var opt = ''; var v = ''; if( typeof(offset) == 'undefined' ){offset = 0;} if( typeof(limit) == 'undefined' ){limit = 10;} if( typeof(op) != 'undefined' ){opt += '|'+op;} if( typeof(async) != 'undefined' ){async = true;} if( typeof(func) == 'undefined' ){func = defaultHtml;} _now_loading_id = elemid+'_'+this._loading_id; this.getNaviJson(elemid, _now_loading_id, 'mm=getbest&offset='+offset+'&limit='+limit+'&options='+opt, func, async); }, // // // getMegaMenuMovieList: function( elemid, offset, limit, op, force ){ var opt = ''; var v = ''; var boxid = _line_prefix+offset; if( typeof(offset) == 'undefined' ){offset = 0;} if( typeof(limit) == 'undefined' ){limit = 10;} if( typeof(op) != 'undefined' ){opt += '|'+op;} _now_loading_id = elemid+'_'+this._loading_id; this.getNaviJson(elemid, _now_loading_id, 'mm=getrecent&offset='+offset+'&limit='+limit+'&options='+opt, recentHtml); }, // // // getRecentMovieList: function( elemid, offset, limit, op, force ){ var opt = ''; var v = ''; var boxid = _line_prefix+offset; if( typeof(force) == 'undefined' || ! force ){ if( jQuery('#'+boxid).size() != 0 ){ boxAutoScroll(boxid); return; } } if( typeof(offset) == 'undefined' ){offset = 0;} if( typeof(limit) == 'undefined' ){limit = 10;} if( typeof(op) != 'undefined' ){opt += '|'+op;} _now_loading_id = elemid+'_'+this._loading_id; this.getNaviJson(elemid, _now_loading_id, 'mm=getrecent&offset='+offset+'&limit='+limit+'&options='+opt, recentHtml); }, // // // getMoviePlayer: function( elemid, id, op ){ var opt = ''; var v = ''; if( typeof(id) == 'undefined' || ! id ){return;} if( typeof(op) != 'undefined' ){opt += '|'+op;} _now_loading_id = elemid+'_'+this._loading_id+id; this.getNaviJson(elemid, _now_loading_id, 'mm=getmovie&mid='+id+'&options='+opt); }, // // // countUpMovie: function( elemid, id, op ){ var opt = ''; var v = ''; if( typeof(id) == 'undefined' || ! id ){return;} if( typeof(op) != 'undefined' ){opt += '|'+op;} _now_loading_id = elemid+'_'+this._loading_id+id; this.getNaviJson(elemid, _now_loading_id, 'mm=countup&mid='+id+'&options='+opt, '', true, true); }, // // // getNaviJson: function( elemid, loadingid, opt, func, async, unloading ){ elemid = elemid.replace('#', ''); if( typeof(unloading) == 'undefined' ){unloading = false;} if( typeof(async) == 'undefined' ){async = true;} if( typeof(func) == 'undefined' && func != '' ){ func = defaultHtml; } if (unloading == false) { jQuery('#'+loadingid).html('now loading'); jQuery('#'+loadingid).css('display', 'block'); } jQuery.ajax({ url: 'http://run2.tv/modules/movie/trailerjax.php?'+opt, data: { modname: this._modname, idbox: elemid, loading: loadingid }, dataType: 'json', cache: false, async: async, success: func }); } };