1function ThemeIsotope(){ 2 var ux_ts = this; 3 var theme_win = jQuery(window); 4 5 //ts init 6 this.init = function(){ 7 //ThemeIsotope: isotope list double width 8 var _isotope_width4 = jQuery('.isotope .width4'); 9 if(_isotope_width4.length){ 10 ux_ts.isotopewidth4(); 11 } 12 13 //ThemeIsotope: Portfolio #3D Flip Mouseover IE HACK 14 var _container3d = jQuery('.container3d'); 15 if(_container3d.length){ 16 if((jQuery.browser.msie == true && parseInt(jQuery.browser.version) < 9)){ 17 ux_ts.flipcenterie(); 18 //ux_ts.flipie(); 19 } 20 } 21 22 //ThemeIsotope: Run isotope 23 $allcontainer = jQuery('.container-fluid.main'); 24 25 //ThemeIsotope: Call isotope 26 var _isotope = jQuery('.isotope'); 27 if(_isotope.length){ 28 ux_ts.callisotope(); 29 } 30 31 //ThemeIsotope: isotope filter 32 var _filters = jQuery('.filters'); 33 if(_filters.length){ 34 ux_ts.isotopefilters(); 35 } 36 37 //win smartresize 38 theme_win.smartresize(function(){ 39 ux_ts.refresh(); 40 }).resize(); 41 42 theme_win.load(function(){ 43 ux_ts.refresh(); 44 }); 45 } 46 47 this.refresh = function(){ 48 var _isotope = jQuery('.isotope'); 49 if(_isotope.length){ 50 _isotope.each(function(index, element) { 51 var _this = jQuery(this), 52 image_size = jQuery(this).data('size'); 53 54 ux_ts.setWidths(image_size, _this); 55 _this.isotope({ 56 masonry: { 57 columnWidth: ux_ts.getUnitWidth(image_size, _this) 58 } 59 }); 60 }) 61 } 62 } 63 64 //ThemeIsotope: isotope list double width 65 this.isotopewidth4 = function(){ 66 var _isotope_width4 = jQuery('.isotope .width4'); 67 _isotope_width4.each(function(index, element) { 68 var width = jQuery(this).find('.fade_wrap').width(); 69 jQuery(this).find('img').width(width); 70 }); 71 } 72 73 //ThemeIsotope: isotope list responsive 74 this.getUnitWidth = function(size, container){ 75 var width; 76 switch(size){ 77 case 'medium': 78 if (container.width() <= 320) { 79 width = Math.floor(container.width() / 2); 80 } else if (container.width() >= 321 && container.width() <= 480) { 81 width = Math.floor(container.width() / 2); 82 } else if (container.width() >= 481 && container.width() <= 768) { 83 width = Math.floor(container.width() / 4); 84 } else if (container.width() >= 769 && container.width() <= 979) { 85 width = Math.floor(container.width() / 4); 86 } else if (container.width() >= 980 && container.width() <= 1200) { 87 width = Math.floor(container.width() / 8); 88 } else if (container.width() >= 1201 && container.width() <= 1600) { 89 width = Math.floor(container.width() / 8); 90 } else if (container.width() >= 1601 && container.width() <= 1824) { 91 width = Math.floor(container.width() / 10); 92 } else if (container.width() >= 1825) { 93 width = Math.floor(container.width() / 12); 94 } 95 96 if(container.is('.team-isotope')){ 97 if(container.width() <= 480){ 98 width = Math.floor(container.width() / 1); 99 }else if(container.width() >= 481){ 100 width = Math.floor(container.width() / 3); 101 } 102 } 103 break; 104 105 case 'large': 106 if (container.width() <= 320) { 107 width = Math.floor(container.width() / 2); 108 } else if (container.width() >= 321 && container.width() <= 480) { 109 width = Math.floor(container.width() / 2); 110 } else if (container.width() >= 481 && container.width() <= 768) { 111 width = Math.floor(container.width() / 4); 112 } else if (container.width() >= 769 && container.width() <= 979) { 113 width = Math.floor(container.width() / 4); 114 } else if (container.width() >= 980 && container.width() <= 1200) { 115 width = Math.floor(container.width() / 6); 116 } else if (container.width() >= 1201 && container.width() <= 1600) { 117 width = Math.floor(container.width() / 6); 118 } else if (container.width() >= 1601 && container.width() <= 1824) { 119 width = Math.floor(container.width() / 10); 120 } else if (container.width() >= 1825) { 121 width = Math.floor(container.width() / 12); 122 } 123 124 if(container.is('.team-isotope')){ 125 if(container.width() <= 480){ 126 width = Math.floor(container.width() / 1); 127 }else if(container.width() >= 481){ 128 width = Math.floor(container.width() / 2); 129 } 130 } 131 break; 132 133 case 'small': 134 if (container.width() <= 320) { 135 width = Math.floor(container.width() / 2); 136 } else if (container.width() >= 321 && container.width() <= 480) { 137 width = Math.floor(container.width() / 2); 138 } else if (container.width() >= 481 && container.width() <= 768) { 139 width = Math.floor(container.width() / 6); 140 } else if (container.width() >= 769 && container.width() <= 979) { 141 width = Math.floor(container.width() / 8); 142 } else if (container.width() >= 980 && container.width() <= 1200) { 143 width = Math.floor(container.width() / 12); 144 } else if (container.width() >= 1201 && container.width() <= 1600) { 145 width = Math.floor(container.width() / 10); 146 } else if (container.width() >= 1601 && container.width() <= 1824) { 147 width = Math.floor(container.width() / 10); 148 } else if (container.width() >= 1825) { 149 width = Math.floor(container.width() / 12); 150 } 151 if(container.is('.team-isotope')){ 152 if(container.width() <= 480){ 153 width = Math.floor(container.width() / 1); 154 }else if(container.width() >= 481){ 155 width = Math.floor(container.width() / 4); 156 } 157 } 158 break; 159 160 case 'brick': 161 if (container.width() > 1440) { 162 width = Math.floor(container.width() / 7); 163 } else if (container.width() > 1365) { 164 width = Math.floor(container.width() / 4); 165 } else if (container.width() > 1279) { 166 width = Math.floor(container.width() / 4); 167 } else if (container.width() > 1023) { 168 width = Math.floor(container.width() / 4); 169 } else if (container.width() > 767) { 170 width = Math.floor(container.width() / 3); 171 } else if (container.width() > 479) { 172 width = Math.floor(container.width() / 2); 173 } else { 174 width = Math.floor(container.width() / 1); 175 } 176 break; 177 } 178 return width; 179 } 180 181 this.setWidths = function(size,container){ 182 var unitWidth = ux_ts.getUnitWidth(size,container) - 0; 183 container.children(":not(.width2)").css({ 184 width: unitWidth 185 }); 186 187 if (container.width() <= 480) { 188 container.children(".width2").css({ 189 width: unitWidth * 1 190 }); 191 container.children(".width4").css({ 192 width: unitWidth * 2 193 }); 194 container.children(".width6").css({ 195 width: unitWidth * 2 196 }); 197 container.children(".width8").css({ 198 width: unitWidth * 2 199 }); 200 201 //brick 202 container.children(".width-and-small").css({ width: unitWidth * 1, height: unitWidth * 1 }); 203 container.children(".width-and-big").css({ width: unitWidth * 1, height: unitWidth * 1 }); 204 container.children(".width-and-long").css({ width: unitWidth * 1, height: unitWidth / 2 }); 205 container.children(".width-and-height").css({ width: unitWidth * 1, height: unitWidth * 2 }); 206 } 207 if (container.width() >= 481) { 208 container.children(".width8").css({ 209 width: unitWidth * 8 210 }); 211 container.children(".width6").css({ 212 width: unitWidth * 6 213 }); 214 container.children(".width4").css({ 215 width: unitWidth * 4 216 }); 217 container.children(".width2").css({ 218 width: unitWidth * 2 219 }); 220 221 if(container.is('.team-isotope')){ 222 container.children(".width2").css({ 223 width: unitWidth * 1 224 }); 225 } 226 227 //brick --- thumb small 228 container.children(".width-and-small").css({ width: unitWidth * 1, height: unitWidth * 1 }); 229 container.find(".width-and-small img").css({ width: unitWidth * 1 }); 230 231 //brick --- thumb big 232 container.children(".width-and-big").css({ width: unitWidth * 2, height: unitWidth * 2 }); 233 container.find(".width-and-big img").css({ width: unitWidth * 2, }); 234 235 //brick --- thumb long 236 container.children(".width-and-long").css({ width: unitWidth * 2, height: unitWidth * 1 }); 237 container.find(".width-and-long img").css({ width: unitWidth * 2 }); 238 239 //brick --- thumb height 240 container.children(".width-and-height").css({ width: unitWidth * 1, height: unitWidth * 2 }); 241 container.find(".width-and-height img").css({ width: unitWidth * 1 }); 242 243 //brick set height 244 if(size == 'brick'){ 245 container.children().each(function(){ 246 var _this = jQuery(this); 247 var _this_height = jQuery(this).height(); 248 249 if(Math.floor(_this.find('img').height()) < Math.floor(_this_height)){ 250 _this.find('img').css({ 251 width: 'auto', 252 height: _this_height 253 });
254 } 255 }); 256 } 257 258 } else { 259 container.children(".width2").css({ 260 width: unitWidth 261 }); 262 } 263 } 264 265 //ThemeIsotope: Call isotope 266 this.callisotope = function(){ 267 var _isotope = jQuery('.isotope'); 268 269 _isotope.each(function(index, element) { 270 var _this = jQuery(this); 271 var image_size = _this.data('size'); 272 273 274 if(image_size != 'brick'){ 275 ux_ts.setWidths(image_size, _this); 276 } 277 278 _this.imagesLoaded(function(){ 279 if(_this.is('.masonry')){ 280 _this.isotope({ 281 animationEngine : 'css', 282 //resizable: false, 283 masonry: { 284 columnWidth: ux_ts.getUnitWidth(image_size, _this) 285 } 286 }); 287 }else if(_this.is('.grid_list')){ 288 _this.isotope({ 289 layoutMode : 'fitRows', 290 animationEngine : 'css', 291 //resizable: false, 292 masonry: { 293 columnWidth: ux_ts.getUnitWidth(image_size, _this) 294 } 295 }); 296 } 297 }); 298 299 _this.addClass('isotope_fade'); 300 _this.siblings('#isotope-load').fadeOut(300); 301 }); 302 } 303 304 //ThemeIsotope: isotope filter 305 this.isotopefilters = function(){ 306 var _filters = jQuery('.filters'); 307 _filters.delegate('a', 'click', function() { 308 $container = jQuery(this).parent().parent().parent().next().find('.isotope'); 309 jQuery(this).parent().parent().find('li').removeClass('active'); 310 jQuery(this).parent().addClass('active'); 311 var selector = jQuery(this).attr('data-filter'); 312 $container.isotope({ 313 filter: selector 314 }); 315 return false; 316 }); 317 318 if( _filters.find('.filter-floating-triggle').length ){ 319 320 _filters.find('ul').contents().filter(function() { 321 return this.nodeType === 3; 322 }).remove(); 323 324 } 325 } 326 327 //ThemeIsotope: Portfolio #3D Flip Mouseover IE HACK 328 /*this.flipie = function(){ 329 var _card = jQuery('.card'); 330 var _container3d = jQuery('.container3d'); 331 _card.live("mouseenter", function(e){ 332 e.preventDefault(); 333 jQuery(this).find('.front').stop().animate({"opacity": 0}, 300); 334 jQuery(this).find('.back').stop().animate({"opacity": 1}, 300).css( { 'z-index' : 100,'display':'block'}); 335 }); 336 337 _container3d.live("mouseleave", function(e){ 338 e.preventDefault(); 339 var $this = jQuery(this); 340 $this.find('.back').stop().css( { 'opacity' : 0, 'z-index' : 0}); 341 $this.find('.front').stop().animate({"opacity": 1}, 300); 342 }); 343 344 jQuery('div.container3d .card .face.back').css( { 'display' : 'none'}); 345 } */ 346 //Flip centered IE8 hack 347 this.flipcenterie = function(){ 348 var _flipback = jQuery('.flip_wrap_back_con'); 349 _flipback.each(function(){ 350 var 351 flipTitHeight = jQuery(this).find('h2').height(), 352 flipMarginTop = -((flipTitHeight + 60 )/2); 353 354 jQuery(this).css({'margin-top':+flipMarginTop,'left':'0' }); 355 }); 356 } 357}
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.