1jQuery(document).ready(function($){ 2 $(".tt_tabs").bind("tabsbeforeactivate", function(event, ui){ 3 if(ui.newTab.length) 4 { 5 if(ui.newTab[0].parentNode.className.indexOf("all_filters")===-1) 6 $("html, body").animate({scrollTop: $("#"+$(ui.newTab).children("a").attr("id")).offset().top}, 400); 7 else 8 { 9 if($(".events_categories_filter").length) 10 $("html, body").animate({scrollTop: $(".events_categories_filter").offset().top}, 400); 11 else if($(".events_filter").length) 12 $("html, body").animate({scrollTop: $(".events_filter").offset().top}, 400); 13 } 14 } 15 }); 16 17 $(".tt_tabs").on("tabsactivate", function(event, ui){ 18 ui.newPanel.find(".image_carousel").trigger('configuration', ['debug', false, true]); 19 }); 20 21 $(".tt_tabs_navigation a").click(function(event){ 22 var $this = $(this); 23 $this.parent().parent().find("li").removeClass("ui-tabs-active"); 24 $this.parent().addClass("ui-tabs-active"); 25 }); 26 27 $(".tt_tabs").tabs({ 28 event: 'change', 29 show: true, 30 create: function(event, ui){ 31 $("html, body").scrollTop(0); 32 if($(".tt_tabs_navigation.all_filters").length) 33 { 34 if(ui.tab.length && $(".tt_tabs_navigation.events_categories_filter a[href='" + ui.tab[0].children[0].hash + "']").length) 35 $(".tt_tabs_navigation.events_categories_filter a[href='" + ui.tab[0].children[0].hash + "']").parent().addClass("ui-tabs-active"); 36 else 37 $(".tt_tabs_navigation.events_categories_filter li:first-child a").parent().addClass("ui-tabs-active"); 38 39 if(ui.tab.length && $(".tt_tabs_navigation.events_filter a[href='" + ui.tab[0].children[0].hash + "']").length) 40 $(".tt_tabs_navigation.events_filter a[href='" + ui.tab[0].children[0].hash + "']").parent().addClass("ui-tabs-active"); 41 else 42 $(".tt_tabs_navigation.events_filter li:first-child a").parent().addClass("ui-tabs-active"); 43 } 44 } 45 }); 46 47 //browser history 48 $(".tt_tabs .ui-tabs-nav a").click(function(){ 49 if($(this).attr("href").substr(0,4)!="http") 50 $.bbq.pushState($(this).attr("href")); 51 else 52 window.location.href = $(this).attr("href"); 53 }); 54 55 //tabs box navigation 56 $(".tabs_box_navigation").mouseover(function(){ 57 $(this).find("ul").removeClass("tabs_box_navigation_hidden"); 58 }); 59 60 $(".tabs_box_navigation a").click(function(event){ 61 if($.param.fragment()==$(this).attr("href").replace("#", "") || ($.param.fragment()=="" && $(this).attr("href").replace("#", "").substr(0, 10)=="all-events")) 62 event.preventDefault(); 63 $(this).parent().parent().find(".selected").removeClass("selected"); 64 $(this).parent().addClass("selected"); 65 $(this).parent().parent().parent().children('label').text($(this).text()); 66 $(this).parent().parent().addClass("tabs_box_navigation_hidden"); 67 }); 68 69 $(".tt_tabs_navigation:not(.all_filter) a, .tabs_box_navigation:not(.all_filter) a").click(function(event){ 70 event.preventDefault(); 71 var $this = $(this); 72 var hash = $this.attr("href"); 73 var sharpIdx = (window.location.href.indexOf("#")!==-1 ? window.location.href.indexOf("#") : window.location.href.length); 74 var event_str = ($(".events_filter .selected a").length ? $(".events_filter .selected a").attr("href").replace("#", "") : ($(".events_filter .ui-tabs-active a").length ? $(".events_filter .ui-tabs-active a").attr("href").replace("#", "") : "")); 75 var events_category_str = ($(".events_categories_filter .selected a").length ? $(".events_categories_filter .selected a").attr("href").replace("#", "") : ($(".events_categories_filter .ui-tabs-active a").length ? $(".events_categories_filter .ui-tabs-active a").attr("href").replace("#", "") : "")); 76 $("#tt_error_message").addClass("tt_hide"); 77 if(event_str!=="" && events_category_str!=="") 78 { 79 if((event_str!=="all-events" && events_category_str!=="all-events" && $("[id='" + event_str + "'][class*='tt-event-category-" + events_category_str.toLowerCase() +"']").length) || (events_category_str==="all-events")) 80 window.location.href = window.location.href.substr(0, sharpIdx) + decodeURIComponent("#" + event_str); 81 else if(event_str==="all-events" && events_category_str!=="all-events") 82 window.location.href = window.location.href.substr(0, sharpIdx) + decodeURIComponent("#" + events_category_str); 83 else 84 {
85 window.location.href = window.location.href.substr(0, sharpIdx) + "#"; 86 $(".tt_tabs").tabs('option', 'collapsible', true); 87 $(".tt_tabs").tabs('option', 'active', false); 88 $("#tt_error_message").removeClass("tt_hide"); 89 } 90 } 91 else 92 window.location.href = window.location.href.substr(0, sharpIdx) + decodeURIComponent(hash); 93 //window.location.hash is causing issues on Safari, because of that 94 //it's necessary to use window.location.href 95 }); 96 97 if($(".events_categories_filter li.ui-tabs-active").length && $(".events_filter li.ui-tabs-active").length) 98 $(".events_filter li.ui-tabs-active a").click(); 99 100 //hashchange 101 $(window).bind("hashchange", function(event){ 102 //some browsers will have the URL fragment already encoded, 103 //while others will not, thus it's necessary to handle both cases. 104 105 //URL fragment is already encoded: 106 $(".tabs_box_navigation a[href='#" + $.param.fragment() + "']").trigger("click"); 107 $('.tt_tabs .ui-tabs-nav [href="#' + $.param.fragment() + '"]').trigger("change"); 108 //URL fragment must be encoded: 109 $(".tabs_box_navigation a[href='#" + encodeURIComponent($.param.fragment()) + "']").trigger("click"); 110 $('.tt_tabs .ui-tabs-nav [href="#' + encodeURIComponent($.param.fragment()) + '"]').trigger("change"); 111 }).trigger("hashchange"); 112 113 //tooltip 114 $(".tt_tooltip").bind("mouseover click", function(){ 115 var attachTo = $(this); 116 if($(this).is(".event_container")) 117 attachTo = $(this).parent(); 118 var position = attachTo.position(); 119 var tooltip_text = $(this).children(".tt_tooltip_text"); 120 tooltip_text.css("width", $(this).outerWidth() + "px"); 121 tooltip_text.css("height", tooltip_text.height() + "px"); 122 tooltip_text.css({"top": position.top-tooltip_text.innerHeight() + "px", "left": position.left + "px"}); 123 }); 124 125 //upcoming events 126 $(".tt_upcoming_events").each(function(){ 127 var self = $(this); 128 var autoscroll = 0; 129 var elementClasses = $(this).attr('class').split(' '); 130 for(var i=0; i<elementClasses.length; i++) 131 { 132 if(elementClasses[i].indexOf('autoscroll-')!=-1) 133 autoscroll = elementClasses[i].replace('autoscroll-', ''); 134 } 135 self.carouFredSel({ 136 direction: "up", 137 items: { 138 visible: (self.children().length>2 ? 3 : self.children().length), 139 height: 'variable' 140 }, 141 scroll: { 142 items: 1, 143 easing: "swing", 144 pauseOnHover: true 145 }, 146 prev: {button: self.next().children('#upcoming_event_prev')}, 147 next: {button: self.next().children('#upcoming_event_next')}, 148 auto: { 149 play: (parseInt(autoscroll) ? true : false) 150 } 151 }); 152 153 self.find("li a.tt_upcoming_events_event_container, li>span").hover(function(){ 154 self.trigger('configuration', ['debug', false, true]); 155 }, 156 function(){ 157 setTimeout(function(){ 158 self.trigger('configuration', ['debug', false, true]); 159 }, 1); 160 }); 161 }); 162 $(window).resize(function(){ 163 $(".tt_upcoming_events").trigger('configuration', ['debug', false, true]); 164 }); 165 166 //timetable row heights 167 /*var maxHeight = Math.max.apply(null, $(".timetable:visible tr td:first-child").map(function () 168 { 169 return $(this).height(); 170 }).get()); 171 $(".timetable:visible tr td").css("height", maxHeight); 172 //timetable height fix 173 $(".timetable .event").each(function(){ 174 if($(this).children(".event_container").length>1) 175 { 176 var childrenHeight = 0; 177 $(this).children(".event_container").not(":last").each(function(){ 178 childrenHeight += $(this).innerHeight(); 179 }); 180 var height = $(this).height()-childrenHeight-($(this).parent().parent().width()<=750 ? 9 : 22); 181 if(height>$(this).children(".event_container").last().height()) 182 $(this).children(".event_container").last().css("height", height + "px"); 183 } 184 });*/ 185 186 //show/hide event hours on mobile device 187 $(document.body).on("click", ".tt_timetable.small .plus.box_header", function(event) { 188 var $this = $(this); 189 var $list = $this.next("ul.tt_items_list"); 190 $list.slideDown(500); 191 $this.removeClass("plus"); 192 $this.addClass("minus"); 193 }); 194 $(document.body).on("click", ".tt_timetable.small .minus.box_header", function(event) { 195 var $this = $(this); 196 var $list = $this.next("ul.tt_items_list"); 197 $list.slideUp(500, function() { 198 $this.removeClass("minus"); 199 $this.addClass("plus"); 200 }); 201 }); 202});
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.