<%= content_for :javascript do%> request_participation = function(){ var route = "<%= space_event_path(@space, @event) %>" + "?participation_by_ajax=true"; $.get(route,{ authenticity_token: "<%=form_authenticity_token()%>" }, function(data){ $("#title_content").html("<%=t('event.video_part')%>"); $("#streaming_url_value").html(data); $("#req_participation_link").html('<%=link_to_function ('' + t('event.streaming.back') + ''),"request_streaming()", {:id=>"view_streaming", :class=>"grey_button basic_button",:title => t('event.view_participation')} %>'); }); }; request_streaming = function(){ var route = "<%= space_event_path(@space, @event) %>" + "?streaming_by_ajax=true"; $.get(route,{ authenticity_token: "<%=form_authenticity_token()%>" }, function(data){ $("#title_content").html("<%=t('event.streaming.title')%>"); $("#streaming_url_value").html(data); $("#req_participation_link").html('<%=link_to_function ('' + t('join_cam') + ''), "request_participation()", {:id=>"view_streaming", :class=>"grey_button basic_button",:title => t('event.view_participation')} %>'); }); }; <%end%>

<%=image_tag("down.png",:class=>"jqueryToggle")%><%=image_tag("right.png",:style=>"display:none",:class=>"jqueryToggle")%>
<%=t('event.streaming.title')%>: <%=@event.get_session_now.title if @event.has_session_now?%>

<%if @event.has_session_now?%> <%if request.env['HTTP_USER_AGENT'] =~ /iPad/ || request.env['HTTP_USER_AGENT'] =~ /iPhone/ %> <%= @event.streaming(640, 480, 'ipad')%> <%else%>
Live!
<%= @event.streaming(640, 480, 'flash')%>
<%end%> <%else%>
<%=image_tag("visor_video.png")%> <%=t('event.note.streaming')%>
<%end%>
<%if @event.description != ""%> <%= render :partial => "events/event_description" %> <%end%>