- 
			You are here:  
		
 
				- 
									Home
									
						
					
								
			 
					- 
				
					Schedule				
				
			
 
		
                     
                 
                                    ');
                    //                    $(".fc-left").html('
 
');
                    $(".fc-left").html('
SCM Regular Broadcast Calendar, '+ moment().format("MMMM YYYY") +'
');
                    $(".fc-center").empty();
                }
            });
            if(print==1){
                $('#tvs-legend').hide();
                $('.fc-button-group').hide();
                $('.fc-right').append(
                    $('
')
                );
            }
            $('.fc-listWeek-button').removeClass('fc-corner-right')
            $('.fc-button-group').append(
                $('
')
                .on('click', function () {
                    window_
                    window_location = window_
                    window.open(window_location,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no'); return false;
                })
            );
            $(document).on('click','div.hasSeries',function(){
                series_id = $(this).data('series_id');
                console.info(series_id);
                $.ajax({
                    url: 'index.php?option=com_tvsp&task=calendar.getSeries&id='+series_id,
                    type: 'GET',
                    success: function(r) {
                        if(r.success != false){
                            d = r.data.result;
                            $('#series-producer_name').text(d.producer_name).attr('href',d.producer_link);
                            $('#series-episodes').attr('href',d.episodes_link);
                            $('#series-moreinfo').attr('href',d.series_link);
                            $('#series-series_name').text(d.series_name);
                            $('#series-series_intro').text(d.series_intro);
                            $('#series-broadcast_time').text(d.broadcast_time);
                            $('#series-audience_rating').text(d.audience_rating);
                            $('#series-theme').text(d.theme);
                            $('#series-language').text(d.language);
                            $('#series-genre').text(d.genre);
                            $('#series-current_season').text(d.current_season);
                            $('.modal-header').css({ 'background-color':themes[d.theme_id].bgcolor, 'color':themes[d.theme_id].fgcolor  })
                            $('#tbody-episodes').empty();
                            $("#myModal").css('top','10%');
                            $("#myModal").modal('show');
                            $.ajax({
                                url: 'http://api.seattlecommunitymedia.org/schedule/seriesepisodes/'+series_id+'/'+d.current_season+'/15',
                                type: 'GET',
                                success: function(data) {
                                    console.info(data);
                                    $.each(data, function() {
                                        console.info(this);
                                        tr = $('
|
');
                                        tr.append(  $('
 | ').text( 'Ep.'+ this.episode));
                                        star = this.isNew==0 ? '' : '
';
                                        star = this.isNew==0 ? '' : '
New ';
                                        tr.append(  $('
 | ').text( moment(this.for_airing).format("MMM Do") ));
                                        tr.append(  $('
 | ').html( star+this.program_name));
                                        $('#tbody-episodes').append(tr);
                                        //        $.each(this, function(k, v) {
                                    });
                                },
                                error: function(jqXHR, textStatus, errorThrown) {
                                    console.log('AJAX error at api.seriesepisodes: '+textStatus+', '+errorThrown);
                                }
                            });
                        }
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        console.log('AJAX error at calendar.getSeries: '+textStatus+', '+errorThrown);
                    }
                });
            });
        });
    })(jQuery);
    Loading calendar...
    
    
News, Business, and Government  | 
 | 
Community Issues & Advocacy  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
    
    
    
        
            
            
                
                
                    
                        
                            
                                
                                    
                                    Airs regularly 
                                    Rated TV-
                                    Genre: 
                                    Theme: 
                                    Language: