PhotosSeating ChartSectionsCommentsTagsEvents
'; html += '
Try a green section
'; html += '
'; return html; } function format_mini_content(data){ var index = data[0]['index']; var image = data[0]['image']; var venue = data[0]['venue']; var section = data[0]['section']; var row = data[0]['row']; var seat = data[0]['seat']; var note = data[0]['note']; var member = data[0]['member_name']; var reviews = data[0]['reviews']; var rating = make_rating(data[0]['rating'],12); var location = ''; if(section != ""){ location += "section "+section; if(row != ""){ location += ", row "+row; } } var gallery_link = gallery_link = 'open_gallery(\''+section+'\');'; var html = ''; html += '
'; html += '
'; html += '
'+location+'
'; if(parseInt(reviews) < 2){ html += ''+reviews+' photo'; }else{ html += ''+reviews+' photos'; } html += '
'; html += '
'; html += ''+rating+''; html += '
'; if(note != ""){ html += '
'+stripslashes(note)+'
'; } html += '
'; return html;} function stripslashes(str) { return (str + '').replace(/\\(.?)/g, function (s, n1) { switch (n1) { case '\\': return '\\'; case '0': return '\u0000'; case '': return ''; default: return n1; } });} function open_gallery(section_name){ $.getJSON( "/ajax/venue_seat_by_type.php?jsoncallback=?", {"venue": "Beaver Stadium", "photo_type": "football", "section": section_name, "total": "100" }, function(data) { //console.log(data); // set up big photo if(data!=""){ // safety checks var data_length = data.length; if(data_length > 0){ // set up the gallery format_gallery(data); var first_photo = data[0]['index']; // set up structured data get_photo_tags(first_photo, section_name,''); } } }) .done(function(data) { }) .fail(function(data) { }) .always(function(data) { });} function format_gallery(data){ var content = ''; var gallery_title = 'Beaver Stadium section '+data[0]['section']+''; $("#gallery_title").html(gallery_title); $(data).each(function (index, value) { var index = value['index']; var image = value['image']; var venue = value['venue']; var section = value['section']; var row = value['row']; var seat = value['seat']; var member = value['member_name']; var reviews = value['reviews']; var video = value['video']; var rating = make_rating(value['rating'], 16); var note = stripslashes(value['note']); var clean_venue = clean_link_text(venue); var clean_section = clean_link_text(section); var clean_row = clean_link_text(row); var clean_seat = clean_link_text(seat); if(member == null){ member = 'anonymous'; } var play_button = ''; if(video != ""){ play_button = ''; } var photo_link = '/photo/'+index+'/'+clean_venue+'/section-'+clean_section+'/row-'+clean_row+'/seat-'+clean_seat+'/'; content += '
'; content += '
'; content += ''+member+''; content += ''+rating+''; content += '
'; content += '
'; content += ''+play_button+''; content += '
'; content += '
'; content += '
'+venue+'
'; content += '
'+note+'
'; content += '
'; content += '
'; content += '
'; content += '
'+section+'
'; content += '
section
'; content += '
'; content += '
'; content += '
'+row+'
'; content += '
row
'; content += '
'; content += '
'; content += '
'+seat+'
'; content += '
seat
'; content += '
'; content += '
'; content += '
'; }); // add reviews to div $("#reviews").html(content); // show gallery $("#sv_photo_gallery").show(); // hide main scroll bar $("body").css('overflow', 'hidden'); // make grey area clickable, to close gallery $("#sv_photo_gallery .grey").mousedown(function(){ $("body").css('overflow', 'auto'); $("#sv_photo_gallery").hide(); }); // make grey area clickable, to close gallery $("#sv_photo_gallery .close").mousedown(function(){ $("body").css('overflow', 'auto'); $("#sv_photo_gallery").hide(); });} function get_photo_tags(photo_id, section_name, row_name){ // clear old structured data first $("#structured_data").html(""); $("#structured_data").removeClass("structured_data"); $.getJSON( "/ajax/get_photo_tags.php?jsoncallback=?", {"photo_id": photo_id }, function(data) { if(data!=""){ format_structured_data(data, section_name, row_name); } }) .done(function(data) { }) .fail(function(data) { }) .always(function(data) { });} function format_structured_data(data, section_name, row_name){ // fallback safety, this should already be cleared $("#structured_data").html(""); $("#structured_data").removeClass("structured_data"); // get for format structured data var content = ''; var section_tags = data['section_tags']; var row_tags = data['row_tags']; if(section_tags != ""){ var section_tag_string = "Section %s is tagged with"; var bold_section_name = ''+section_name+''; section_tag_string = section_tag_string.replace('%s', bold_section_name); content += '
'; content += ''+section_tag_string+':'; content += '
'; $.each(section_tags, function(key, val) { content += ''; content += '✓ '; content += ''+val['question']+''; content += ''; }); content += '
'; content += '
'; } if(row_tags != ""){ var row_tag_string = "Row %s is tagged with"; var bold_row_name = ''+row_name+''; row_tag_string = row_tag_string.replace("%s", bold_row_name); content += '
'; content += ''+row_tag_string+':'; content += '
'; $.each(row_tags, function(key, val) { var icon = '✓'; if(val['question'] == 'is accessible'){ icon = ''; } content += ''; content += ''+icon+' '; content += ''+val['question']+''; content += ''; }); content += '
'; content += '
'; } if(content != ""){ $("#structured_data").addClass("structured_data"); $("#structured_data").html(content); }} $(function(){ $("#dragable_canvas").draggable({cancel: "#mini_popup"}); $("#zoom_in").click(function(){ if(zoom_level < 5){ zoom_level ++; } do_zoom(zoom_level); }); $("#zoom_out").click(function(){ if(zoom_level > 0){ zoom_level --; }else{ $("#") } do_zoom(zoom_level) });$("#canvas").dblclick(function(){if(zoom_level < 5){ zoom_level ++; } do_zoom(zoom_level);}); var container_width = $("#canvas_container").width(); //console.log("container_width: "+container_width); var section_map = {"WA":{"path":"M288.6,305.7l-7.6-42.6c-1.9,0.8-3.9,1.6-6.1,2.3l1.1,5.3l-3.7,0.9l-1.1-5.1c-0.8,0.2-1.6,0.4-2.4,0.6 l6.9,42.2C279.8,308.7,284.1,307.5,288.6,305.7z"}, "SE":{"path":"M330.4,226.7c0-6.3-0.3-11.6-0.9-16.9h-38.4v3.9l7.2,0v3.7l-7.2,0v6.7l12.4,0v2.6L330.4,226.7L330.4,226.7z"}, "SD":{"path":"M291.1,201.3v7h38.2c-0.9-6.8-2.5-13.5-4.2-19L291.1,201.3z"}, "EA":{"path":"M269,184.9c1,0.2,2,0.4,2.9,0.6l0.8-4.6l3,0.7l-0.9,4.8c2.2,0.7,4.2,1.6,6,2.6l7.5-41.7c-4.5-1.9-9-3.1-13.2-4 L269,184.9z"}, "SF":{"path":"M303.6,228.3v0.2l-12.4,0v6.5l7.2,0v4.4l-7.2,0v4.6h38.3c0.6-4.7,0.9-10.5,0.9-15.8L303.6,228.3L303.6,228.3z"}, "SK":{"path":"M286.4,260.3c-1.2,0.8-2.6,1.5-4.1,2.2l7.6,42.7c5.6-2.4,11.4-5.9,16.8-10.8L286.4,260.3z"}, "SB":{"path":"M286.4,192.5c1.4,1.1,2.5,2.2,3.3,3l4.8-4.1l0.1,0.1l22.8-20.1c-3-4.8-6.4-8.8-10.1-12.2L286.4,192.5z"}, "SG":{"path":"M291.1,245.7v4.6l34,13.5c1.7-5.5,3.3-11.3,4.2-18.1L291.1,245.7L291.1,245.7z"}, "EE":{"path":"M216.5,184.6c1.9,0,4.3-0.1,5.3-0.1v-5.2h3.3v5.1c1.9,0,3-0.1,3-0.1s1.3,0,1.8,0v-42.6 c-3.8,0-8.6,0.1-13.4,0.1C216.5,141.9,216.5,184.6,216.5,184.6z"}, "EF":{"path":"M200.8,184.8c1.4,0,2.4,0,3.3,0v-5.5h3.8v5.4c2.9,0,5.3-0.1,7.2-0.1v-42.7c-5.3,0-9.6,0.1-14.3,0.1V184.8 L200.8,184.8z"}, "EC":{"path":"M247.6,184.3c2.9,0,6,0,9,0l4.5-42.6c-0.8,0-2,0-2.7,0c-2.9,0-6.5,0-10.8,0V184.3L247.6,184.3z"}, "SH":{"path":"M318.5,279.4c2.4-4.3,4.3-8.6,6.1-14.1l-33.5-13.3v2l5,4l-0.7,1.1L318.5,279.4z"}, "SC":{"path":"M291.6,199.7l33.2-12.3c-1.9-5.6-4.2-10.5-6.8-14.8l-22.7,20l1,1.4l-5.1,3.7L291.6,199.7z"}, "EB":{"path":"M273.9,143c-4.1-0.8-7.9-1.1-11.1-1.3l-3.7,37.1l2.1,0.7l-0.6,5.6c0.2,0,0.5,0,0.7,0c2.3,0,4.4-0.2,6.4,0 L273.9,143z"}, "WE":{"path":"M229.9,269c-1.4,0-2.3,0-3.7,0l0.3,5.2l-3.8,0l-0.4-5.2c-1.4,0-2.9,0-4.8,0v41.2c4.3,0,9.1,0,12.4,0.1V269 L229.9,269z"}, "WF":{"path":"M216.1,310.3v-41.1c-1.9,0-4.5,0-7.1,0l0.2,5.1l-3.8,0l-0.3-5.1c-1.5,0-2.9,0-4.8,0v41 C206,310.2,211.3,310.3,216.1,310.3L216.1,310.3z"}, "WJ":{"path":"M180.2,267.5c-4.9-1-8.9-2.4-12.2-4l-7.2,41.6c4.7,1.6,9.2,2.7,13.1,3.4L180.2,267.5z"}, "NB":{"path":"M160.1,258.5c-0.8-0.6-1.5-1.2-2.1-1.9l-3.7,4.4l-2.2-2.2L129.9,286c4.1,4.4,8.7,7.9,13.3,10.9L160.1,258.5z"}, "NC":{"path":"M154.7,253.4c-0.9-1.1-1.8-2.6-2.7-4.6l-33.3,21c2.9,5.9,6.3,10.9,10.2,15.1L154.7,253.4z"}, "ND":{"path":"M151.5,247.5c-0.3-0.8-0.6-1.7-0.9-2.6l-5.4,1.6l-0.7-3.1l-31.5,9.3c1.3,6.3,2.9,10.8,5.2,15.8L151.5,247.5z"}, "SJ":{"path":"M294.7,260.2l-0.7,1l-4.1-3.5c-0.7,0.6-1.5,1.2-2.4,1.9l20.1,33.8c3.6-3.5,7.1-7.7,10.1-12.8L294.7,260.2z"}, "WG":{"path":"M198.8,269.9C198.8,269.9,199.2,269.9,198.8,269.9c-2.6,0-5-0.4-7.4-0.6l-0.6,5.4l-0.1-0.1l-3.1,35.7 c0.8,0,0.9,0,0.9,0c3.7,0,6.8,0,10.2,0L198.8,269.9L198.8,269.9z"}, "NK":{"path":"M153.4,193.8l2-2l3,3.6c0.6-0.6,1.2-1.1,1.9-1.6l-17.6-39c-4.5,3.1-8.8,6.9-12.8,11.6L153.4,193.8z"}, "NH":{"path":"M143.6,208.8l0.8-3.1l6.6,2c0.1-0.2,0.1-0.4,0.2-0.5c0.2-0.7,0.5-1.4,0.8-2l-33-20.2c-2,4.8-3.7,10.1-5,16 L143.6,208.8z"}, "EJ":{"path":"M168.2,189.1c1.8-0.8,3.7-1.4,5.5-1.9l-1-5.9l3.8-0.8l1,5.8c0.9-0.2,1.8-0.4,2.8-0.5l-6.3-42.6 c-4.2,0.6-8.8,1.6-13.5,3.1L168.2,189.1z"}, "NF":{"path":"M148,229.3l-5.5-0.3l0-5.1l5.5,0.6c0.1-1.6,0.2-3.1,0.4-4.2h-37.1c-0.3,3.7-0.5,8.2-0.5,12.7c0,0.6,0,1,0,1.5 h37.4C148.1,232.5,148,231,148,229.3L148,229.3z"}, "EH":{"path":"M186.3,142.2c-3,0.1-6.8,0.2-11.1,0.8l6.3,42.6c2.4-0.3,4.6-0.5,6.7-0.6l-0.6-5.4l2.5-0.3L186.3,142.2z"}, "WH":{"path":"M181.5,267.7l-6.3,41.1c4.9,0.9,8.8,1.2,11.2,1.3l3.1-35.8L187,274l0.6-5.4 C185.4,268.4,183.4,268.1,181.5,267.7z"}, "NL":{"path":"M161.4,192.9c1.7-1.3,3.6-2.4,5.5-3.3l-7.8-43c-5,1.7-10.2,4.1-15.2,7.3L161.4,192.9z"}, "NG":{"path":"M148.6,218.8c0.3-2.1,0.7-4.4,1.1-6.3l-36.1-9.3c-1,4.7-1.7,9.9-2.2,15.7H148.6z"}, "EG":{"path":"M191.6,180.8l0.5,4.1c0.2,0-0.2,0-0.1,0c2.2,0,5,0,7.4,0V142c-6.7,0.1-11,0.1-11,0.1c-0.4,0-0.6,0-1,0 L191.6,180.8L191.6,180.8z"}, "NE":{"path":"M149.3,240.8c-0.4-1.6-0.6-3-0.9-4.6h-37.6c0.1,5.3,0.7,10.2,1.5,14.8L149.3,240.8z"}, "NJ":{"path":"M119.5,183.5l33,20.2c0.9-1.9,1.9-3.6,3.1-5.2L129,167.4C125.5,172,122.2,177.3,119.5,183.5z"}, "NEU":{"path":"M94.1,233.7l-42.8-0.2c0.4,4.5,1.2,9.1,2.2,13.8c0.1,0.4,0,0.8,0.1,1.2L94.1,238 C94.1,237.3,94.1,236,94.1,233.7z"}, "NGU":{"path":"M94.6,218.4c0-1.4,0.1-2.8,0.3-4.1L53.6,204c-1.1,4.9-1.9,10-2.3,15.3L94.6,218.4z"}, "NJU":{"path":"M60.5,184.9l36.4,21.7c0.5-1.1,1-2,1.5-2.9L70.1,170C66.5,174.4,63.2,179.4,60.5,184.9z"}, "NHU":{"path":"M95.1,212.9c0.3-1.8,0.8-3.5,1.3-4.9l-36.5-21.8c-2.4,5.1-4.4,10.6-5.9,16.4L95.1,212.9z M91.9,207.1l-1.3,3.4 l-4.7-2.1l1.3-3.4L91.9,207.1z"}, "NKU":{"path":"M99.2,202.5c0.9-1.2,1.8-2.2,2.7-3.1l-2-4.9L99,195l-2-5.1l0.8-0.4l-13.6-32.4c-4.7,3.1-9.2,7.1-13.2,11.8 L99.2,202.5z"}, "NLU":{"path":"M99,188.9l1.1-0.5l2,5.1l-1,0.5l1.9,4.5c2.7-2.1,5-2.8,5-2.8l-7.3-45.5c-5.2,0.9-10.4,3-15.4,6.1L99,188.9z"}, "NCU":{"path":"M98.5,248.7c-0.8-1.1-1.4-2.3-1.9-3.4l-36.5,21.8c3.1,6.9,6.7,12.5,10.5,17L98.5,248.7z"}, "NDU":{"path":"M96.1,243.9c-0.8-2-1.2-3.7-1.4-4.5l-40.4,10.5c1.5,6,3.3,11.2,5.3,15.9L96.1,243.9z M91.2,245.3l-4.8,1.7 l-1-3.5l4.8-1.7L91.2,245.3z"}, "NFU":{"path":"M51.2,232l43,0.2c0-2.8,0-6.8,0-12.4l-43.2,0.9C50.8,224.5,50.9,228.2,51.2,232z M88.8,224.2l0,3.7l-5.1-0.1 l0-3.7L88.8,224.2L88.8,224.2z"}, "SGC":{"path":"M347.6,233l43.3-0.2c-0.4,4.5-1,9.1-2,13.8c-0.1,0.4-0.4,0.8-0.5,1.2l-40.8-10.5 C347.6,236.5,347.6,235.3,347.6,233z"}, "SEC":{"path":"M348,217.7c0-1.4-0.1-2.8-0.3-4.1l41.3-10.3c1.1,4.9,1.9,10,2.3,15.3L348,217.7z"}, "SCC":{"path":"M382.1,184.2l-36.4,21.7c-0.5-1.1-1-2-1.5-2.9l28.3-33.8C376.1,173.7,379.4,178.7,382.1,184.2z"}, "SDC":{"path":"M388.6,201.9c-1.5-5.8-3.5-11.3-5.9-16.4l-36.5,21.8c0.5,1.5,1,3.1,1.3,4.9L388.6,201.9z M355.4,204.3l1.3,3.4 l-4.7,2.1l-1.3-3.4L355.4,204.3z"}, "SKC":{"path":"M345.3,263.1l0.8-0.3l-1.9-5.2l-0.9,0.4l-2.5-6.3c0.9-0.8,1.7-1.7,2.4-2.6l27.9,35.3 c-4.3,4.9-8.8,8.4-12.9,10.9L345.3,263.1z"}, "SHC":{"path":"M383.1,265.1c2-4.7,3.8-9.9,5.3-15.9l-40.4-10.5c-0.2,0.8-0.6,2.5-1.4,4.5L383.1,265.1z M352.4,241l4.8,1.7 l-1,3.5l-4.8-1.7L352.4,241z"}, "SFC":{"path":"M391.1,220l-43.5-0.9c0,5.6,0,9.6,0,12.4l43.3-0.2C391.1,227.5,391.3,223.7,391.1,220z M358.8,223.4l0,3.7 l-5.1,0.1l0-3.7L358.8,223.4L358.8,223.4z"}, "SGU":{"path":"M406.4,233l43.4-0.2c-0.4,4.5-0.9,9.1-2,13.8c-0.1,0.4-0.4,0.8-0.5,1.2l-40.9-10.5 C406.4,236.5,406.4,235.3,406.4,233z"}, "SEU":{"path":"M407,217.7c0-1.4-0.1-2.8-0.3-4.1l41.3-10.3c1.1,4.9,1.9,10,2.3,15.3L407,217.7z"}, "SCU":{"path":"M441.1,184.2l-36.4,21.7c-0.5-1.1-1-2-1.5-2.9l28.3-33.8C435.1,173.7,438.4,178.7,441.1,184.2z"}, "SDU":{"path":"M447.7,201.9c-1.5-5.8-3.5-11.3-5.9-16.4l-36.5,21.8c0.5,1.5,1,3.1,1.3,4.9L447.7,201.9z M414.4,204.3l1.3,3.4 l-4.7,2.1l-1.3-3.4L414.4,204.3z"}, "SJU":{"path":"M403.1,247.9c0.8-1.1,1.4-2.3,1.9-3.4l36.5,21.8c-3.1,7-6.7,12.5-10.5,17L403.1,247.9z"}, "SKU":{"path":"M404.4,263.1l0.8-0.3l-1.9-5.2l-0.9,0.4l-2.5-6.3c0.9-0.8,1.7-1.7,2.4-2.6l27.9,35.3 c-4.3,4.9-8.8,8.4-12.9,10.9L404.4,263.1z"}, "SFU":{"path":"M450,220l-43.6-0.9c0,5.6,0,9.6,0,12.4l43.4-0.2C450,227.5,450.2,223.7,450,220z M417.8,223.4l0,3.7l-5.1,0.1 l0-3.7L417.8,223.4L417.8,223.4z"}, "EDU":{"path":"M247.1,138.3V104h-15.3v34.1c2.9,0,5.3,0,7.2,0.1v-4.7h4.8v4.7C245.2,138.2,246.7,138.3,247.1,138.3z"}, "EFU":{"path":"M216.5,138v-34h-14.9l-0.3,34.3c1.1,0,2.8-0.2,3.3-0.2v-4.6h4.8v4.6C212.2,138,214.6,138,216.5,138L216.5,138z "}, "EBU":{"path":"M266.8,104.6l-3.6,34.2c3,0.2,5.9,0.6,8.7,1l0.9-5.1l2.8,0.6l4.2-27.1L266.8,104.6z"}, "ECU":{"path":"M263.3,104h-14.8v34.3c5.7,0.1,10,0.2,13.1,0.4l3.7-34.3L263.3,104z"}, "EJU":{"path":"M167.7,108.6l-13.6,3.8l5.4,31.4c0,0,5.2-2,13.6-3.6L167.7,108.6z"}, "WCU":{"path":"M248.6,349.1c10.5-0.2,15.1-0.5,16.7-0.6l-3.6-34.9c-0.4,0-0.8,0-1.2,0c-2.3,0-6.6,0-11.9,0V349.1L248.6,349.1 z"}, "WGU":{"path":"M199.3,313.6c-5.3,0-9.9,0-11.8,0l-4.5,34.7c2,0.1,7.2,0.5,16.3,0.7V313.6z"}, "WHU":{"path":"M177.1,312.5l-0.8,5.5l-2.6-0.5l-4.9,27.5l13,3.6l4.3-35C183.7,313.6,180.5,313.2,177.1,312.5z"}, "WBU":{"path":"M275.3,317.2l-2.7,0.6l-1-5.2c-2.9,0.5-5.8,0.9-8.5,1l3.8,35.2l13.2-4.1L275.3,317.2z"}, "WDU":{"path":"M247.1,313.6c-0.5,0-1.9,0-3.3,0v5.8H239v-5.8c-1.9,0-4.3,0-7.2,0v35.7c6.7,0,11.5-0.1,15.3-0.2V313.6z"}, "WFU":{"path":"M216.1,313.6c-1.9,0-3.8,0-6.7,0v5.8h-4.8v-5.8c-1.4,0-2.4,0-3.8,0v35.5c4.8,0.1,9.1,0.2,15.3,0.2V313.6z"}, "WEU":{"path":"M230.4,349.3v-35.7c-3.8,0-8.6,0-12.9,0v35.7c2.4,0,4.5,0,7,0C226.6,349.3,229.4,349.3,230.4,349.3z"}, "SAU":{"path":"M402.6,188.2l-1.1-0.5l-2,5.1l1,0.5l-1.9,4.5c-2.7-2.1-5-2.8-5-2.8l7.3-45.5c5.2,0.9,10.4,3,15.4,6.1 L402.6,188.2z"}, "SBU":{"path":"M402.4,201.8c-0.9-1.2-1.8-2.2-2.7-3.1l2-4.9l0.9,0.4l2-5.1l-0.8-0.4l13.6-32.4c4.7,3.1,9.2,7.1,13.2,11.8 L402.4,201.8z"}, "SHU":{"path":"M442.1,265.1c2-4.7,3.8-9.9,5.3-15.9l-40.4-10.5c-0.2,0.8-0.6,2.5-1.4,4.5L442.1,265.1z M411.4,241l4.8,1.7 l-1,3.5l-4.8-1.7L411.4,241z"}, "SLU":{"path":"M398.7,252.6l2.4,5.9l-1,0.4l1.9,5.2l1.1-0.5l13,32.4c-8.8,5-15.7,5.4-15.7,5.4l-7.5-45.9 C395.2,254.8,397.1,253.8,398.7,252.6z"}, "SLC":{"path":"M339.7,252.6l2.4,5.9l-1,0.4l1.9,5.2l1.1-0.5l13,32.4c-8.8,5-15.7,5.4-15.7,5.4l-7.5-45.9 C336.2,254.8,338.1,253.8,339.7,252.6z"}, "SJC":{"path":"M344,247.9c0.8-1.1,1.4-2.3,1.9-3.4l36.5,21.8c-3.1,7-6.7,12.5-10.5,17L344,247.9z"}, "SBC":{"path":"M343.4,201.8c-0.9-1.2-1.8-2.2-2.7-3.1l2-4.9l0.9,0.4l2-5.1l-0.8-0.4l13.6-32.4c4.7,3.1,9.2,7.1,13.2,11.8 L343.4,201.8z"}, "SAC":{"path":"M343.6,188.2l-1.1-0.5l-2,5.1l1,0.5l-1.9,4.5c-2.7-2.1-5-2.8-5-2.8l7.3-45.5c5.2,0.9,10.4,3,15.4,6.1 L343.6,188.2z"}, "WAU":{"path":"M281.3,344.4l13.9-4.3l-5.9-31.7c0,0-6.2,1.9-13.6,3.4L281.3,344.4z"}, "WJU":{"path":"M173.4,311.8c-5.3-1.1-10.5-2.4-13.3-3.1l-6.4,32.2l13.8,3.9L173.4,311.8z"}, "NAU":{"path":"M102.9,253.3l-2.4,5.9l1,0.4l-1.9,5.2l-1.1-0.5l-13,32.4c8.8,5,15.7,5.4,15.7,5.4l7.5-45.9 C106.4,255.6,104.5,254.5,102.9,253.3z"}, "NBU":{"path":"M97.3,263.8l-0.8-0.3l1.9-5.2l0.9,0.4l2.5-6.3c-0.9-0.8-1.7-1.7-2.4-2.6l-27.9,35.3c4.3,4.9,8.8,8.4,12.9,10.9 L97.3,263.8z"}, "EHU":{"path":"M185.6,138.5l-3.5-34l-13.2,3.7l5.4,31.7C177.7,139.3,181.5,138.8,185.6,138.5z"}, "EGU":{"path":"M200.3,104h-14.9l-1.9,0.4l3.5,34.2c0.8,0,1.6-0.1,2.4-0.1c3-0.1,6.7,0,10.9-0.1L200.3,104z"}, "EEU":{"path":"M218,138c4.8,0,8.6,0,12.4,0V104H218V138L218,138z"}, "EAU":{"path":"M281,108.6l-5,32c7.8,1.7,13.6,3.8,13.6,3.8l5.3-31.8L281,108.6z"}, "ED":{"path":"M231.4,141.8v42.6c1.9,0,4.3,0,7.7,0v-5h3.3v5c1.4,0,2.9,0,4.3,0v-42.6C241.9,141.7,237.1,141.7,231.4,141.8 L231.4,141.8z"}, "SA":{"path":"M289.6,147.7l-7.5,41.9c1.2,0.7,2.2,1.4,3.2,2.1l21-33.4C301,153.6,295.3,150.2,289.6,147.7z"}, "WB":{"path":"M267.6,267.5c-2.1,0.5-4.2,0.8-6.2,1.1l0.5,5.5l-2.3,0.8l3.2,36.7c0.5,0,0.9,0,1.4,0c2.8,0,6.4-0.7,10.4-1.4 L267.6,267.5z"}, "WC":{"path":"M257.7,268.8c-0.3,0-1.1,0-1.3,0c-2.6,0-5.9,0-9.2,0v41.6c5.3,0,9.6,0,13.7,0L257.7,268.8L257.7,268.8z"}, "WD":{"path":"M245.7,268.9c-0.5,0-1.8,0-3,0l0.3,5.4l-3.8,0l-0.4-5.3c-2.2,0-5.1,0-7.5,0.1v41.3c5.3,0,10.5,0.1,14.3,0.1 L245.7,268.9L245.7,268.9z"}, "NA":{"path":"M166.8,262.9c-2.2-1.1-4-2.3-5.6-3.5l-16.8,38.2c5,3,10.2,5.3,15.1,7.1L166.8,262.9z"}}; var props = {"props_suite_1_":{"path":"M224.6,350.8c-26.9,0-38.7-0.7-41.9-1l-1.1,7.4v2.8h83.7v-10C262.9,350.1,252.8,350.8,224.6,350.8z"}, "props_suite":{"path":"M185.2,102.2l78.4,0l31.5,8.9l2.8-16.6l-34.2-9h-77.3l-35.5,8.8l2.9,16.7L185.2,102.2L185.2,102.2z"}}; var bg = {"bg":{"path":"M185.6,74.5h79.7l32.6,9.4c233.6,0,233.6,287,0,287h-146c-158.2,0.5-159.2-284.7-1-285.3L185.6,74.5z"}}; var style_props = { "fill": "#D0E1EC", "fill-opacity": 1, "stroke": "#D0E1EC", "stroke-width": 1, "stroke-opacity": 1 }; var style_bg = { "fill": "#ebf7fe", "fill-opacity": 1, "stroke": "#369", "stroke-width": 2, "stroke-opacity": 1 }; var style_grass = { "fill": "#098042", "fill-opacity": 1, "stroke": "#804E1F", "stroke-width": 8, "stroke-opacity": 1 }; style_font_section = { "font-size": 6.5, "font-family": "Arial, Helvetica, sans-serif", "cursor":"pointer", "fill": "#696969", "width":"30px" }; style_font_section_filled = { "font-size": 6.5, "font-family": "Arial, Helvetica, sans-serif", "cursor":"pointer", "fill": "#696969" }; style_sections = { "fill": "#fff", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "stroke-opacity": 1, "cursor":"pointer" }; style_section_filled = { "fill": "#A3C266", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "cursor":"pointer" }; style_section_filled_active = { "fill": "#dce8c5", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "cursor":"pointer" }; style_section_current = { "fill": "#A3C266", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "cursor":"pointer" }; style_sections_highlighted = { "fill": "#ffffa0", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "stroke-opacity": 1, "cursor":"pointer" }; style_section_filled_highlighted = { "fill": "#7aa32d", "fill-opacity": 1, "stroke": "#36c", "stroke-width": 1, "cursor":"pointer" }; // container_width was 1800 paper = Raphael("canvas", container_width, container_width); paper.renderfix(); bg_shape = paper.set(); grass_shape = paper.set(); sections = paper.set(); section_extras = paper.set(); section_text = paper.set(); clickable_section = paper.set(); clickable_section_text = paper.set(); highlighted_section = paper.set(); // props & suites if(typeof bg !== 'undefined'){ $.each( bg, function( key, value ) { bg_shape.push(paper.path(value.path)); }); bg_shape.attr(style_bg); } // grass for ballparks if(typeof grass !== 'undefined'){ $.each( grass, function( key, value ) { grass_shape.push(paper.path(value.path)); }); grass_shape.attr(style_grass); } var field = paper.image("/seatingcharts/fields/football_avfms.png",0,0,1054,489); field.attr({"width":125, "height":58});field.transform("R0 T159,196"); // props & suites if(typeof props !== 'undefined'){ $.each( props, function( key, value ) { section_extras.push(paper.path(value.path)); }); section_extras.attr(style_props); } var array_key; // sections $.each( section_map, function( key, value ) { array_key = section_key(key); // section shape all_section_names[array_key] = paper.path(value.path).data({"sec":array_key}); sections.push(all_section_names[array_key]); // bbox of section section_box = all_section_names[array_key].getBBox(); // section text all_section_text[array_key] = paper.text(0, 0, clean_out_text(key)).data({"sec":array_key}); all_section_text[array_key].translate(section_box.x+(section_box.width/2),section_box.y+(section_box.height/2)); section_text.push(all_section_text[array_key]); }); sections.attr(style_sections); sections.data("highlighted",false); sections.data("clickable",false); section_text.attr(style_font_section); section_text.data("highlighted",false); section_text.data("clickable",false); // would this replace the other one sections.mousedown(function(e){ var section = this.data("sec"); section = clean_out_text(section); var center_x = (e.pageX - $('#canvas').offset().left)-120+($('#canvas').position().left); var center_y = (e.pageY - $('#canvas').offset().top)-270+($('#canvas').position().top); make_mini_photo_popup(center_x, center_y, section); }); section_text.mousedown(function(e){ var section = this.data("sec"); section = clean_out_text(section); var center_x = (e.pageX - $('#canvas').offset().left)-120+($('#canvas').position().left); var center_y = (e.pageY - $('#canvas').offset().top)-270+($('#canvas').position().top); make_mini_photo_popup(center_x, center_y, section); }); sections.transform("S1"); section_extras.transform("S1"); // get clickable sections find_sections_with_photos(venue); // move text to front do_to_front(); paper.setViewBox(0,0,500,500,true); zoom_level = 4; $("#canvas svg").css("overflow","visible"); //paper.setSize(800,1200); $("#seat_finder_form input").change(function(){ // show a spinner, starting now var filter = $(this).val(); make_filter_request("182","football",filter); });});