1 2var resource = { 3 tab: function(self){ 4 $(self).closest('ul').find('.active').removeClass('active'); 5 $(self).addClass('active'); 6 $(self).closest('ul').next().find('.active').removeClass('active'); 7 $($(self).attr('href')).addClass('active'); 8 } 9} 10 11$(function(){ 12 13 $('#taggs li a, #video-tab a').click(function(){ 14 resource.tab(this) 15 return false 16 }); 17 18 // Center the description popup boxes for all videos. 19 $('.player-pop-box').each(function(){ 20 $(this).css('marginTop', -$(this).outerHeight()/2) 21 }); 22 23 $('.text-nav li').hover(function(){ 24 $('.text-nav li').removeClass('active'); 25 $(this).addClass('active') 26 $(this).find('.text-nav-outer').show() 27 }, 28 29 function(){ 30 $('.text-nav li').removeClass('active'); 31 $(this).find('.text-nav-outer').hide(); 32 }); 33 34 35 // Function For Mega DropDown 36 $('.nav-bar > li').hover(function(){ 37 $(this).find('.mega-dropdown').stop(true, true).slideDown(500); 38 }, 39 function(){ 40 $(this).find('.mega-dropdown').slideUp(500); 41 if($(this).find('.mega-dropdown').hasClass('scholarse')){ 42 $('.text-nav li').eq(0).addClass('active') 43 $('.text-nav li').eq(0).find('.text-nav-outer').show() 44 } 45 if($(this).find('.mega-dropdown').hasClass('channels')){ 46 $('.channels-sub li').eq(0).addClass('active') 47 $('.channels-sub li').eq(0).find('.channel-sub-sub').show() 48 } 49 }); 50 51 /* 52 $('.video-thumbs, .video-panel').hover(function(){ 53 $(this).find('.player-pop-box').fadeIn(1000); 54 }, 55 function(){ 56 $(this).find('.player-pop-box').hide(); 57 }); 58 $('.video-thumbs .player-pop-box, .video-panel .player-pop-box').hover(function(){ 59 $(this).hide(); 60 }); 61 */ 62 63 // Function For Channel Sub Sub 64 $('.channels-sub > li').hover(function(){ 65 $('.channels-sub > li').removeClass('active') 66 $('.channel-sub-sub').hide() 67 $(this).find('.channel-sub-sub').show() 68 }, 69 function(){ 70 $(this).find('.channel-sub-sub').hide() 71 }); 72 73 // This helps load more videos. 74 page = 1; 75 76 $("#loadMoreButton").click(function(){ 77 78 page=page+1; 79 80 if(page > numberOfPages) { 81 82 jQuery("#loadMoreButton").html("There are no more videos"); 83 return false; 84 85 } 86 87 jQuery("#loadMoreButton").html("<img src='img/bx_loader.gif' /> Loading.........."); 88 89 jQuery.ajax({ 90 type: "POST", 91 url: loadMoreUrl, 92 data: { "page": page}, 93 cache: false, 94 success: function(html){ 95 96 $(loadMoreInto).append(html); 97 if(page >= numberOfPages) { 98 $("#loadMoreButton").html("There are no more videos"); 99 } else { 100 $("#loadMoreButton").html("Load More"); 101 } 102 103 // 104 $('.video-thumbs, .video-panel').unbind('mouseenter mouseleave'); 105 106 // Center the pop-out boxes. 107 $('.player-pop-box').each(function(){ 108 $(this).css('marginTop', -$(this).outerHeight()/2) 109 }) 110 111 /* 112 // Make them pop-up on hover. 113 $('.video-thumbs, .video-panel').hover(function(){ 114 $(this).find('.player-pop-box').fadeIn(1000); 115 }, 116 function(){ 117 $(this).find('.player-pop-box').hide(); 118 }); 119 $('.video-thumbs .player-pop-box, .video-panel .player-pop-box').hover(function(){ 120 $(this).hide(); 121 }); 122 */ 123 124 } 125 }); 126 127 return false; 128 129 }); 130 131 // This is used for the scrolling videos on the category page. 132 jQuery('.series-carousel').each(function() { 133 134 // Only create the carousel if there are more than 4 videos. 135 if(this.getElementsByClassName('car-item-wrap')[0].getElementsByTagName('li').length <= 4) return; 136 137 // Create the scrolling carousel. 138 jQuery(this.getElementsByClassName('car-item-wrap')[0]).jCarouselLite({ 139 'btnNext': this.getElementsByClassName('next')[0], 140 'btnPrev': this.getElementsByClassName('prev')[0], 141 'visible': 4, 142 'scroll': 4, 143 'speed': 1000 144 }); 145 146 });
147 148}); 149 150// This function pops up a window to display a video attachment. 151function showAttachment(attachURI) { 152 window.open(attachURI, "mywindow","resizable=1,width=500,height=800"); 153} 154 155// This function is called when a user clicks the 'Embed' butotn on the video page. 156function addmyspacePopup(vid) { 157 this.vid=vid 158 window.open(''+MELODYURL+'/share_code.php?vid='+this.vid+'&social=myspace', 'share','toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=no,width=450,height=300,left=100,top=50'); 159} 160 161// This function is used to select the text in a textbox. 162function SelectAll(id){ 163 document.getElementById(id).focus(); 164 document.getElementById(id).select(); 165} 166 167// This function allows a site user to subsctibe to a scholar. 168function subscribeToScholar(scholarId) { 169 document.getElementById('subscribeFormLabel').innerHTML = 'Please Wait<img src="img/bx_loader.gif" />'; 170 jQuery.post(siteUrl+'/scholar.php?subscribe=true&id='+scholarId, 171 {'email': document.getElementById("txtEmail").value}, 172 function(data) { 173 if(data == 1) { 174 document.getElementById('subscribeFormLabel').innerHTML = 'Great! You are now subscribed to this scholar.'; 175 } else if(data == 2) { 176 document.getElementById('subscribeFormLabel').innerHTML = '<span style="color: red;">Invalid email address.</span>'; 177 } else if(data == 3) { 178 document.getElementById('subscribeFormLabel').innerHTML = 'You are already subscribed to this scholar.'; 179 } else { 180 alert(data); 181 document.getElementById('subscribeFormLabel').innerHTML = '<span style="color: red;">Connection error: please try again.</span>'; 182 } 183 } 184 ).fail(function(){ 185 document.getElementById('subscribeFormLabel').innerHTML = '<span style="color: red;">Connection error: please try again.</span>'; 186 }); 187 return false; 188}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.