function changeCoverYear(year){location.href=publicdomain+"celebs/cosmo-covers/"+year;}
function changeCoverYearEmag(year){location.href=publicdomain+"celebs/cosmo-covers/e-magazine/year/"+year;}
var blhover=0;var blLeft=0;function buttonLinksHoverLeft3(){if((454-$("#scroll-list2").width())<=blLeft){blLeft-=10;$('#scroll-list2').css("left",blLeft);blhover=setTimeout("buttonLinksHoverLeft3();",50);}else{$('#scroll-list2').css("left",454-$("#scroll-list2").width());stopBLHover3();}}
function buttonLinksHoverRight3(){if(blLeft<0){blLeft+=10;$('#scroll-list2').css("left",blLeft);blhover=setTimeout("buttonLinksHoverRight3();",50);}else{$('#scroll-list2').css("left","0");stopBLHover3();}}
function stopBLHover3(){clearTimeout(blhover);}
var blhover4=0;var blLeft4=0;function buttonLinksHoverLeft4(){if((454-$("#scroll-list5").width())<=blLeft4){blLeft4-=10;$('#scroll-list5').css("left",blLeft4);blhover4=setTimeout("buttonLinksHoverLeft4();",50);}else{$('#scroll-list5').css("left",454-$("#scroll-list5").width());stopBLHover4();}}
function buttonLinksHoverRight4(){if(blLeft4<0){blLeft4+=10;$('#scroll-list5').css("left",blLeft4);blhover4=setTimeout("buttonLinksHoverRight4();",50);}else{$('#scroll-list5').css("left","0");stopBLHover4();}}
function stopBLHover4(){clearTimeout(blhover4);}
function topMostVids(type,category){if(type=="most-viewed"){$('#tRated').parent().attr("id","");$('#mViewed').parent().attr("id","selected");}else{$('#mViewed').parent().attr("id","");$('#tRated').parent().attr("id","selected");}
var showResponse=function(originalRequest){$('#topMostUl').html(originalRequest);};var showProgress=function(){$('#topMostUl').html('loading...');};parameter="type="+type+"&category="+category;var url=publicdomainobj+"cosmotv/topMostLoad.xml.php";$.ajax({type:"POST",url:url,data:parameter,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/"+type);}
function generateRandomVid(channel){var showResponse=function(originalRequest){$('#randomArticles').html(originalRequest);};var showProgress=function(){$('#randomArticles').html('<p align="center">loading...</p>');};parameter="channel="+channel;var url=publicdomainobj+"rightBoxes/randomVideos.xml.php";$.ajax({type:"POST",url:url,data:parameter,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/more-in-cosmotv");}
function searchTv(){var key=$('#tvSearchKey').val();key1=key.replace(/ +/g,'+');location.href=publicdomain+'tag/tvsearch/'+key1;}
function markRating(mark){for(i=1;i<=5;i++){$('#vRate'+i).removeClass("selected");$('#vRate'+i).removeClass("selectedHalf");if(mark>0){if(mark>=1){$('#vRate'+i).addClass("selected");}else{if(mark>=.3&&mark<=.7){$('#vRate'+i).addClass("selectedHalf");}else if(mark>.7){$('#vRate'+i).addClass("selected");}}}
mark--;}}
function rateMe(bid,rating){var showResponse=function(originalRequest){$('#rateDiv').html(originalRequest);};var showProgress=function(){$('#rateDiv').html('rating...');}
var params="bid="+bid+"&rating="+rating;url=publicdomainobj+"cosmotv/rate.xml.php";$.ajax({type:"POST",url:url,data:params,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/rate");}
