function getNextVideo(id,site) { var temp = $('#video'+site+id).nextAll('.video').find('.videoFirstDiv'); if(temp.length<1) { //var nextSite = $('#video'+site+id).parents('.sites').next('.sites').find('.videoFirstDiv').eq(0); var k,aSites = new Array(); $('.sites').each(function(i){ aSites[i] = $(this).attr('id'); if(aSites[i] == site) { k = i+1; } }); if(k>=aSites.length) { k = 0; } var temp = $('#'+aSites[k]+' .videoFirstDiv:first'); } t= temp.attr('id').split('__|__'); //alert('gelen: id='+id+' site=' + site); //alert('cevap: id='+t[1]+' site=' + t[0] + ' title='+$('#title'+t[0]+t[1]).html()); document.getElementById('flvplayer').nextVideo(t[0],t[1],$('#title'+t[0]+t[1]).html()); //return {'id':t[1],'site':t[0],'title':$('#title'+t[0]+t[1]).html()}; /*var nextId = t[1]; alert('id: ' + nextId); var nextSite = t[0]; alert('site: ' + nextSite);*/ } function getPrevVideo(id,site) { var temp; temp = $('#video'+site+id).prevAll('.video').find('.videoFirstDiv'); if(temp.length<1) { var k,aSites = new Array(); $('.sites').each(function(i){ aSites[i] = $(this).attr('id'); if(aSites[i] == site) { k = i-1; } }); if(k<0) { k = aSites.length-1; } temp = $('#'+aSites[k]+' .videoFirstDiv:last'); } t= temp.attr('id').split('__|__'); document.getElementById('flvplayer').prevVideo(t[0],t[1],$('#title'+t[0]+t[1]).html()); //return {'id':t[1],'site':t[0],'title':$('#title'+t[0]+t[1]).html()}; /*var nextId = t[1]; alert('id: ' + nextId); var nextSite = t[0]; alert('site: ' + nextSite);*/ } function setSettingsData(site,key,value) { $('#settings'+site).data(key,value); } function setFilterSearch(site,id,value,dflt,obj) { $('#'+id).val(value); //$('#default'+id).html(dflt); $('#ul'+id+'>li>a').each(function(){$(this).attr('class','')}); $(obj).attr('class','selected'); //alert($('#'+id).val()); getResults(site); } function getResults(site,param) { var r = $('#settings'+site); if(param == 'pre') { r.data('page',r.data('page')-1); } else if(param == 'next') { r.data('page',r.data('page')+1); } ac_getSearchResultsPager(r.data('q'),site,r.data('page'),r.data('num'),xajax.getFormValues('filters'+site));return false; } function share_facebook(id,site) { title = encodeURIComponent($('#title'+site+id).html()); thumb = encodeURIComponent($('#thumb'+site+id).attr('src')); url = encodeURIComponent('http://www.allchannel.net/beta2?site='+site+'&id='+id); swf = encodeURIComponent('http://www.allchannel.net/swf/ac_fb_player.swf?site='+site+'&id='+id+'&clickTag='+url); if (site=="myspace") { thumb="http://www.allchannel.net/img/logo/facebook.jpg"; } if (site=="google") { thumb="http://www.allchannel.net/img/logo/facebook.jpg"; } if (site=="vidivodo") { thumb="http://www.allchannel.net/img/logo/facebook.jpg"; } if (site=="comedycentral") { thumb="http://www.allchannel.net/img/logo/facebook.jpg"; } window.open('http://www.facebook.com/sharer.php?s=100&p[medium]=103&p[title]='+title+' www.allchannel.net&p[video][type]=application%2Fx-shockwave-flash&p[video][height]=516&p[video][width]=577&p[video][src]='+swf+'&p[video][v]=0&p[video][safe]=1&p[summary]=&p[url]='+url+'&p[images][0]='+thumb+'&p[video][allowfullscreen]=true','sharer','toolbar=0,status=0,width=720,height=550'); } //centering popup function getScrollXY() { var scrOfX = 0, scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } return {X:scrOfX, Y:scrOfY}; } function getWindowSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } return{X:myWidth, Y:myHeight} } function centerPopup(divId){ //request data for centering var windowDim = getWindowSize(); var popupHeight = $(divId).height(); var popupWidth = $(divId).width(); var scroll = getScrollXY(); //centering $(divId).css({ "top": windowDim.Y/2-popupHeight/2 + scroll.Y-15, "left": windowDim.X/2-popupWidth/2 + scroll.X-15 }); } function jsModelBasic(param,w,h,opt) { var w = w || 577; var h = h || 543; if(!opt) { opt = { containerCss: { height: h, width: w } }; } $.modal(param,opt); } function array_flip(arr){ var key, tmp = {}; for( key in arr ) { tmp[arr[key]] = key; } return tmp; } function shareWindow(site,id) { /*
| close | |
