1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10/** 11 * Polaris 12 */ 13 14var Design = { 15 bindKeys : function() { 16 Cargo.Core.KeyboardShortcut.Add("Left", 37, function() { 17 Action.Project.Prev(); 18 return false; 19 }); 20 21 Cargo.Core.KeyboardShortcut.Add("Right", 39, function() { 22 Action.Project.Next(); 23 return false; 24 }); 25 }, 26 27 hoverProject: function() { 28 // Thumbnail hover 29 $(".thumbnails") 30 .on("mouseenter", ".project_thumb", function(e) { 31 $(".project_link[data-id='" + $(this).attr("data-id") +"'] a").addClass("hover"); 32 }) 33 .on("mouseleave", ".project_thumb", function(e) { 34 $(".project_link[data-id='" + $(this).attr("data-id") +"'] a").removeClass("hover"); 35 }); 36 37 // Navigation 38 $(".navigation") 39 .on("mouseenter", ".project_link a", function(e) { 40 $(".project_thumb[data-id='" + $(this).closest('.project_link').attr("data-id") +"']").addClass("hover"); 41 }) 42 .on("mouseleave", ".project_link a", function(e) { 43 $(".project_thumb[data-id='" + $(this).closest('.project_link').attr("data-id") +"']").removeClass("hover"); 44 }); 45 }, 46 47 checkNavigationHeight: function() { 48 49 50 var navigation = $(".navigation"); 51 52 if(navigation.length === 0){ 53 return; 54 } 55 56 var pad_top = (navigation.css('padding-top')) ? Math.floor(navigation.css('padding-top').replace("px","")) : 0, 57 margin_top = (navigation.css('margin-top')) ? Math.floor(navigation.css('margin-top').replace("px","")) : 0, 58 top_height = navigation.position().top + pad_top + margin_top; 59 60 if (navigation.length > 0) { 61 if (navigation.height() + top_height > $(window).height()) { 62 if (!navigation.hasClass("scroll")) { 63 navigation.add(".site_header").removeClass("fixed").addClass("scroll"); 64 } 65 } else { 66 if (!navigation.hasClass("fixed")) { 67 navigation.add(".site_header").removeClass("scroll").addClass("fixed"); 68 } 69 } 70 } 71 }, 72 73 checkSetVisibility: function() { 74 // Find the active set based on the project ID 75 var parentSet = $("[data-setid='" + Cargo.Model.Project.GetSetId() + "']"), 76 otherSets = $("[data-setid]").not(parentSet); 77 78 // If the set exists, set active/inactive 79 if (parentSet.length > 0) { 80 otherSets.removeClass("active").addClass("inactive"); 81 parentSet.removeClass("inactive").addClass("active"); 82 83 // Show the footer link 84 $(".set_footer").show(); 85 } else { 86 $(".set_footer").hide(); 87 } 88 }, 89 90 checkSetSpacing: function() { 91 $(".set_link").removeClass("first-set last-set spacer"); 92 93 var first_set = $(".set_link:first"), 94 last_set = $(".set_link:last"); 95 96 first_set.addClass("first-set"); 97 last_set.addClass("last-set"); 98 99 if (Cargo.Model.DisplayOptions.attributes.use_set_links) { 100 var setLinksPosition = Cargo.Model.DisplayOptions.GetSetLinksPosition(); 101 102 if (first_set.attr("id") == last_set.attr("id")) { 103 // Only one set 104 if (setLinksPosition == "top") { 105 last_set.addClass("spacer").removeClass("first-set"); 106 } else if (setLinksPosition == "bottom") { 107 first_set.addClass("spacer"); 108 } 109 } else { 110 if (setLinksPosition == "top") { 111 last_set.addClass("spacer"); 112 } else if (setLinksPosition == "bottom") { 113 first_set.add(last_set).addClass("spacer"); 114 } 115 } 116 } 117 } 118}; 119 120/** 121 * Events 122 */ 123 124$(function() { 125 Cargo.Core.ReplaceLoadingAnims.init(); 126 127 Design.bindKeys(); 128 Design.hoverProject(); 129 Design.checkSetSpacing(); 130 Design.checkNavigationHeight(); 131}); 132 133// Window Resize 134$(window).resize(function() { 135 Design.checkNavigationHeight(); 136}); 137 138// Project Load Complete 139Cargo.Event.on("project_load_complete", function(pid) { 140 Design.checkSetVisibility(); 141 142 /* 143 * Move the project navigation if the default image width is > 670px. 144 */ 145 146 var defaultImageWidth = parseInt(Cargo.Model.DisplayOptions.GetImageWidth()); 147 148 if (defaultImageWidth < 670) { 149 defaultImageWidth = 670; 150 } 151 152 defaultImageWidth += 305; 153 154 $(".project_navigation").css("left", defaultImageWidth + "px"); 155}); 156 157// Project Close Complete 158Cargo.Event.on("show_index_complete", function(pid) { 159 setTimeout(function() { 160 // Reset sets 161 $("[data-setid]").removeClass("active inactive"); 162 $(".set_footer").hide(); 163 }, 20); 164}); 165 166Cargo.Event.on("navigation_reset", function(new_page) { 167 Design.checkSetSpacing(); 168}); 169 170Cargo.Event.on("navigation_set_toggle", function() { 171 Design.checkNavigationHeight(); 172}); 173 174// Pagination 175Cargo.Event.on("pagination_complete", function(new_page) { 176 Design.checkSetVisibility(); 177 Design.checkSetSpacing(); 178 window.setTimeout(function() { 179 Design.checkNavigationHeight(); 180 }, 10); 181}); 182 183Cargo.Event.on("project_collection_reset", function(new_page) { 184 Design.checkSetVisibility(); 185 Design.checkSetSpacing(); 186 window.setTimeout(function() { 187 Design.checkNavigationHeight(); 188 }, 10); 189}); 190 191Cargo.Event.on("fullscreen_destroy_hotkeys", function() { 192 Design.bindKeys(); 193}); 194 195/** 196 * Typography 197 */ 198 199WebFontConfig = { 200 google: { families: ["Istok+Web:400,700,400italic,700italic:latin"] } 201}; 202 203(function() { 204 var wf = document.createElement("script"); 205 wf.src = ("https:" == document.location.protocol ? "https" : "http") + "://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"; 206 wf.type = "text/javascript"; 207 wf.async = "true"; 208 var s = document.getElementsByTagName("script")[0]; 209 s.parentNode.insertBefore(wf, s); 210})(); 211 212}
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.