PageSourceSearch

https://www.escapadesenpaysnarbonnais.com/wp-content/themes/direct…?ver=ffc16ec6b49654490397c978a8b1dd5b

js escapadesenpaysnarbonnais.com collected 2026-10-02 23:27:23 UTC 26,642 bytes, 635 lines download raw bytes

1function gridGalleryShortcode(){
2  var contWidth = $j('.gridgallery').parent().width();
3  var tileMargin = 10; 
4  var tileBorder = 2;
5  var tileRowNum = 5;
6  var tileCount = 0;
7  var origPict = "";
8  var origSize;
9  var rowsCount;
10  var descHeight = 0;
11  var descMarginBottom = 0;
12  var superDescHeight = 0;
13  if($j('.gridgallery').hasClass('five')){
14     tileRowNum = 5;
15  } else if($j('.gridgallery').hasClass('four')){
16     tileRowNum = 4;
17  } else if($j('.gridgallery').hasClass('three')){
18     tileRowNum = 3;
19  } 
20  var tileHeight = $j("#gridgallery-setting-height").html();
21  var tileWidth = parseInt((contWidth-(tileRowNum*(tileMargin+(tileBorder*2))))/tileRowNum)+parseInt(tileMargin/tileRowNum);
22    
23  $j('.gridgallery .ulHolder').css({'background':'none'});
24  
25  var tileCounter = 1;
26  var rowCounter = 1;
27  var tileCounterSmall = 1;
28  var rowCounterSmall = 1;
29  var tileCountGlobal = 0;
30  $j('.gridgallery .ulHolder .ourHolder .item').each(function(){
31    tileCountGlobal++;
32  });
33  rowCount = Math.ceil(tileCountGlobal/tileRowNum);
34  $j('.gridgallery .ulHolder .ourHolder .item').each(function(){
35    var editImage;
36    var currTile = $j(this).children('.tile').children('.tileWrap');
37    var currImage = currTile.html();
38    if(tileHeight == 'auto'){
39      editImage = currImage.replace('w=1',"w="+tileWidth).replace('h=1',"h="+tileWidth);
40      currTile.html('<img src="'+editImage+'" width="'+tileWidth+'" height="'+tileWidth+'" alt="tile" />');
41    } else {
42      editImage = currImage.replace('w=1',"w="+tileWidth).replace('h=1',"h="+parseInt(tileHeight));
43      currTile.html('<img src="'+editImage+'" width="'+tileWidth+'" height="'+tileHeight+'" alt="tile" />');
44    }
45    $j(this).children('.tile').width(tileWidth);
46    $j(this).children('.tile').css({'display':'block'});
47    $j(this).children('.tile-desc-wrap').children('.tile-desc').width(tileWidth);
48    $j(this).children('.tile-desc-wrap').children('.tile-desc').css({'margin-left':tileMargin+tileBorder+'px'});
49    $j(this).children('.tile-desc-wrap').children('.tile-desc').css({'margin-bottom':descMarginBottom+'px'});
50    
51    if($j(this).children().size() > 1){
52      descHeight = parseInt($j(this).children('.tile-desc-wrap').children('.tile-desc').css('height'));
53      descMarginBottom = 10;
54      if(superDescHeight == 0){
55        superDescHeight = descHeight;
56      }
57      $j(this).children('.tile-desc-wrap').height(superDescHeight);
58      $j(this).children('.tile-desc-wrap').children('.tile-desc').height(superDescHeight);
59    }
60    
61    if(tileHeight == 'auto'){
62      $j(this).children('.tile').height(tileWidth);
63      $j(this).children('.tile').parent().height(parseInt(tileWidth) + superDescHeight + descMarginBottom + tileBorder + tileMargin);
64    } else {
65      $j(this).children('.tile').height(parseInt(tileHeight));
66      $j(this).children('.tile').parent().height(parseInt(tileHeight) + superDescHeight + descMarginBottom + tileBorder + tileMargin);
67    }
68    
69    // children
70    currChildTile = $j(this).children('.tile').children('.gridgallery-icon').children();
71    
72    if($j('.portfolio').hasClass('item-fancybox')){ } else {
73      if(tileHeight == 'auto'){
74        parsedWidth = parseInt((tileWidth*2)+tileMargin+(tileBorder*2));
75        editImage = currImage.replace('w=1',"w="+parsedWidth).replace('h=1',"h="+parseInt(parsedWidth+(descHeight*2)+(descMarginBottom*2)));
76        editImage = editImage.replace(/&amp;/g,"&");
77        currChildTile.css({'background':'url(\''+editImage+'\') no-repeat center center'})
78      } else {
79        editImage = currImage.replace('w=1',"w="+((tileWidth*2)+tileMargin+(tileBorder*4))).replace('h=1',"h="+((parseInt(tileHeight)*2)+tileMargin+(tileBorder*4)+(descHeight*2)+(descMarginBottom*2)));
80        editImage = editImage.replace(/&amp;/g,"&");
81        currChildTile.css({'background':'url(\''+editImage+'\') no-repeat center center'})
82      }
83    }
84    currChildTile.width(((tileWidth*2)+tileMargin+(tileBorder*2)));
85    
86    if(tileHeight == 'auto'){
87      currChildTile.height(((tileWidth*2)+tileMargin+(tileBorder*2)));
88    } else {
89      currChildTile.height(((parseInt(tileHeight)*2)+tileMargin+(tileBorder*2) + (descHeight*2) + (descMarginBottom*2)));
90    }
91    
92    if(rowCounter == 1){
93      // first row
94      if(tileCounter == 1){
95        // first row | first tile
96        if(tileHeight == 'auto'){
97          currChildTile.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','right':'0px','margin-left':'0px'});
98        } else {
99          currChildTile.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','right':'0px','margin-left':'0px'});
100        }
101      } else if (tileCounter == tileRowNum){
102        // first row | last tile
103        if(tileHeight == 'auto'){
104          currChildTile.css({'left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','right':'0px','top':'-'+tileBorder+'px' ,'margin-left':'0px'});
105        } else {
106          currChildTile.css({'left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','right':'0px','top':'-'+tileBorder+'px' ,'margin-left':'0px'});
107        }
108        tileCounter = 0;
109        rowCounter++;
110      } else {
111        // first row | tiles between first and last
112        currChildTile.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
113      }
114    } else if (rowCounter == (rowCount)){
115      // last row
116      if(tileCounter == 1){
117        // last row | first tile
118        if(tileHeight == 'auto'){
119          currChildTile.css({'top':'-'+(tileWidth+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','bottom':'0px','right':'0px','margin-left':'0px'});
120        } else {
121          currChildTile.css({'top':'-'+(parseInt(tileHeight)+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','bottom':'0px','right':'0px','margin-left':'0px'});
122        }
123      } else if (tileCounter == tileRowNum){
124        // last row | last tile
125        if(tileHeight == 'auto'){
126          currChildTile.css({'top':'-'+(tileWidth+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','bottom':'0px','left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','bottom':'0px','right':'0px','margin-left':'0px'});
127        } else {
128          currChildTile.css({'top':'-'+(parseInt(tileHeight)+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','bottom':'0px','left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','bottom':'0px','right':'0px','margin-left':'0px'});
129        }
130        tileCounter = 0;
131        rowCounter++;
132      } else {
133        // last row | tiles between first and last
134        if(tileHeight == 'auto'){
135          currChildTile.css({'top':'-'+(tileWidth+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
136        } else {
137          currChildTile.css({'top':'-'+(parseInt(tileHeight)+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
138        }
139      }
140    } else {
141      // rows between first and last
142      if(tileCounter == 1){
143        // rows between first and last | first tile
144        currChildTile.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','right':'0px','margin-left':'0px'});
145      } else if (tileCounter == tileRowNum){
146        // rows between first and last | last tile
147        if(tileHeight == 'auto'){
148          currChildTile.css({'left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','right':'0px','top':'-'+tileBorder+'px','margin-left':'0px'});
149        } else {
150          currChildTile.css({'left':'-'+(tileWidth+tileMargin+tileBorder*3)+'px','right':'0px','top':'-'+tileBorder+'px','margin-left':'0px'});
151        }
152        tileCounter = 0;
153        rowCounter++;
154      } else {
155        // rows between first and last | tiles between first and last
156        currChildTile.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
157      }
158    } 
159    tileCount++;
160    tileCounter++;    
161  });
162  $j('.gridgallery').width(contWidth);  // width fix
163  
164  if(tileHeight == 'auto'){
165    $j('.gridgallery .ulHolder .ourHolder').height(((tileWidth+tileMargin+descHeight+descMarginBottom)*rowCount+(tileBorder*2))+(tileMargin*2)+(tileBorder*2));
166    $j('.gridgallery .ulHolder').height(((tileWidth+tileMargin+(tileBorder*2)+descHeight+descMarginBottom)*rowCount)+(tileMargin*2)+(tileBorder*2));
167    $j('.gridgallery .portfolioHolder').css({'margin-left':'-'+tileMargin+'px'});
168  } else {
169    $j('.gridgallery .ulHolder .ourHolder').height(((parseInt(tileHeight)+tileMargin+descHeight+descMarginBottom)*rowCount+(tileBorder*2))+(tileMargin*2)+(tileBorder*2));
170    $j('.gridgallery .ulHolder').height(((parseInt(tileHeight)+tileMargin+(tileBorder*2)+descHeight+descMarginBottom)*rowCount)+(tileMargin*2)+(tileBorder*2));
171    $j('.gridgallery .portfolioHolder').css({'margin-left':'-'+tileMargin+'px'});
172  }
173  $j('.gridgallery #portfolio-loader').fadeOut('fast');
174  $j('.gridgallery #filterOptions').css({'visibility':'visible'});
175  $j('.gridgallery .port-cat').css({'visibility':'visible'});
176  $j('.gridgallery .ulHolder').css({'visibility':'visible'});
177}
178
179function refreshGridGallery(){
180  var contWidth = $j('.gridgallery').parent().width();
181  var tileRowNum = 5;
182  var tileMargin = 10;  // margin: 0 0 3px 3px 
183  var tileBorder = 2;  // border: 10px
184  var tileCount = 0;
185  var tileCounter = 1;
186  var rowCounter = 1;
187  var tileCountGlobal = 0;
188  var descHeight = 0;
189  var descMarginBottom = 0;
190  if($j('.gridgallery').hasClass('five')){
191     tileRowNum = 5;
192  } else if($j('.gridgallery').hasClass('four')){
193     tileRowNum = 4;
194  } else if($j('.gridgallery').hasClass('three')){
195     tileRowNum = 3;
196  }
197  var tileHeight = $j("#gridgallery-setting-height").html();  
198  var tileWidth = parseInt((contWidth-(tileRowNum*tileMargin))/tileRowNum);
199  $j('.gridgallery .ulHolder .ourHolder .item').each(function(){
200    tileCountGlobal++;
201  });
202  rowCount = Math.ceil(tileCountGlobal/tileRowNum);
203  $j('.gridgallery .ulHolder .ourHolder .item').each(function(){
204    if($j(this).children().size() > 1){
205      descHeight = parseInt($j(this).children('.tile-desc').css('height'));
206      descMarginBottom = 10;
207    }
208    
209    var tile_small = $j(this).children('.tile');
210    var tile_big = tile_small.children().children('a'); 
211    if(rowCounter == 1){
212      // first row
213      if(tileCounter == 1){
214        // first row | first tile
215        tile_big.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','right':'0px','margin-left':'0px'});
216      } else if (tileCounter == tileRowNum){
217        // first row | last tile
218        if(tileHeight == 'auto'){
219          tile_big.css({'left':'-'+(tileWidth+tileMargin+tileBorder*2)+'px','right':'0px','top':'-'+tileBorder+'px' ,'margin-left':'0px'});
220        } else {
221          tile_big.css({'left':'-'+(tileWidth+tileMargin+tileBorder)+'px','right':'0px','top':'-'+tileBorder+'px' ,'margin-left':'0px'});
222        }
223        tileCounter = 0;
224        rowCounter++;
225      } else {
226        // first row | tiles between first and last
227        if(tileHeight == 'auto'){
228          tile_big.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
229        } else {
230          tile_big.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
231        }
232      }
233    } else if (rowCounter == (rowCount)){
234      // last row
235      if(tileCounter == 1){
236        // last row | first tile
237        if(tileHeight == 'auto'){
238          tile_big.css({'top':'-'+(tileWidth+tileMargin+tileBorder+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','bottom':'0px','right':'0px','margin-left':'0px'});
239        } else {
240          tile_big.css({'top':'-'+(parseInt(tileHeight)+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','bottom':'0px','right':'0px','margin-left':'0px'});
241        }
242      } else if (tileCounter == tileRowNum){
243        // last row | last tile
244        if(tileHeight == 'auto'){
245          tile_big.css({'top':'-'+(tileWidth+tileMargin+tileBorder+descHeight+descMarginBottom)+'px','bottom':'0px','left':'-'+(tileWidth+tileMargin+tileBorder)+'px','bottom':'0px','right':'0px','margin-left':'0px'});
246        } else {
247          tile_big.css({'top':'-'+(parseInt(tileHeight)+tileMargin+tileBorder*2+descHeight+descMarginBottom)+'px','bottom':'0px','left':'-'+(tileWidth+tileMargin+tileBorder)+'px','bottom':'0px','right':'0px','margin-left':'0px'});
248        }
249        tileCounter = 0;
250        rowCounter++;
251      } else {
252        // last row | tiles between first and last
253        if(tileHeight == 'auto'){
254          tile_big.css({'top':'-'+(tileWidth+tileMargin+(tileBorder)+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
255        } else {
256          tile_big.css({'top':'-'+(parseInt(tileHeight)+tileMargin+(tileBorder*2)+descHeight+descMarginBottom)+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
257        }
258      }
259    } else {
260      // rows between first and last
261      if(tileCounter == 1){
262        // rows between first and last | first tile
263        tile_big.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','right':'0px','margin-left':'0px'});
264      } else if (tileCounter == tileRowNum){
265        // rows between first and last | last tile
266        if(tileHeight == 'auto'){
267          tile_big.css({'left':'-'+(tileWidth+tileMargin+tileBorder)+'px','right':'0px','top':'-'+tileBorder+'px','margin-left':'0px'});
268        } else {
269          tile_big.css({'left':'-'+(tileWidth+tileMargin+tileBorder)+'px','right':'0px','top':'-'+tileBorder+'px','margin-left':'0px'});
270        }
271        tileCounter = 0;
272        rowCounter++;
273      } else {
274        // rows between first and last | tiles between first and last
275        tile_big.css({'top':'-'+tileBorder+'px','left':'-'+tileBorder+'px','bottom':'0px','margin-left':'0px'});
276      }
277    }     
278    tileCount++;
279    tileCounter++;
280  });
281}
282
283function initTile() {
284	if($j('#header-container').css('display') == 'none') {$j('#header-container').remove();}
285	
286	$j('.tile').each( function() {
287		$j(this).removeClass('endLine corner goRight');
288	});
289	counter = 0;
290	if($j('.portfolio').hasClass('five')){counter = 5;}
291	if($j('.portfolio').hasClass('four')){counter = 4;}
292	if($j('.portfolio').hasClass('three')){counter = 3;}
293	
294	sizeOfRows = Math.ceil(($j('.tile').size())/(counter));
295	cou = 0;
296	$j('.tile').each( function() {
297		cou++;
298		if((cou) == counter){
299			$j(this).addClass('goRight');
300			cou = 0;
301		}
302	});
303	
304	fullRow = sizeOfRows - 1;
305	var n;
306	for (n=0;n<=$j('.tile').size();n++) {
307		if(n >= (counter * fullRow)){
308			if(fullRow != 0) {
309				$j('.tile').eq(n).addClass('endLine');
310			}
311		}
312		if(n == ($j('.tile').size()-1) && n != counter * fullRow ) {
313			$j('.tile').eq(n).addClass('corner').removeClass('goRight');
314		}
315		if(n == ($j('.tile').size()-1) && fullRow == 0) {
316			$j('.tile').eq(n).addClass('goRight').removeClass('corner');
317		}
318	}
319	//$j('.tile').last().addClass('corner');
320        
321        if($j('.tile').size() == 1){
322            $j('.tile').removeClass('corner').removeClass('goRight').removeClass('endLine');
323        }
324}
325
326function showTile() {	
327	var tileMargin = 10;
328	var tileBorder = 2;
329  var descHeight = 0;
330  var descMarginBottom = 0;
331  
332  if($j('.item').children('.tile-desc')){
333      descHeight = parseInt($j('.item').children('.tile-desc').css('height'));
334      descMarginBottom = 10;
335    }
336  
337  $j('span').click(function(){
338	 $j('.tile').unbind('mouseleave');
339		var cat = $j(this).attr('class');
340		$j('.portfolio .tile').each( function() {
341				$j(this).children().children('.bbox').css('opacity','0');
342			if( !$j(this).hasClass(cat)) {
343				$j(this).children().children('.bbox').animate({opacity: '+=0.6'});
344				//$j(this).children('.bbox').show();
345			}
346		});
347	});
348
349	tileWidth = (($j('.tile').width()*2)+tileMargin+(tileBorder*2));
350	tileHeight = (($j('.tile').height()*2)+tileMargin+(2*tileBorder)+(descHeight*2)+descMarginBottom);
351	tileMarginLeft = parseInt($j('.goRight').children().children('.tileImage').css('marginLeft'));
352	
353	$j('.tile').children().children('.tileImage').css('width',tileWidth).css('height',tileHeight);
354	
355	$j('.tile').click( function() {
356        try{
357            window.getSelection().removeAllRanges();
358        }
359	catch(e){}
360	  $j('.tile').css('opacity','1');
361		$j(this).removeClass('noOut');
362		if($j(this).hasClass('noOut')){
363			$j('.tile').children().children('.tileImage').children('.about').fadeOut('fast')
364			$j('.tile').children().children('.tileImage').fadeOut('fast')
365			$j('.tile').css('opacity','1');
366		}
367		else{
368			//$j(this).children('.tileImage').children('.about').css('display','block');
369			if($j(this).hasClass('goRight')){
370				$j(this).addClass('noOut');
371				$j(this).addClass('notOpacity');
372				$j('.tile').each(function(){
373					if($j(this).hasClass('notOpacity')){$j(this).removeClass('notOpacity');}
374					else {
375						$j(this).css('opacity','0.5');
376					}
377				});
378				$j(this).children().children('.tileImage').fadeIn('normal').css('zIndex','110');
379				
380			}
381			else {
382				if($j(this).hasClass('endLine')) {
383					$j(this).addClass('noOut');
384					$j(this).addClass('notOpacity');
385					$j('.tile').each(function(){
386						if($j(this).hasClass('notOpacity')){$j(this).removeClass('notOpacity');}
387						else{
388						$j(this).css('opacity','0.5');
389						}
390					});
391					$j(this).children().children('.tileImage').fadeIn('normal').css('zIndex','110');
392				}
393				else {
394					if(!$j(this).hasClass('noOut')){
395						$j(this).addClass('noOut');
396						$j(this).addClass('notOpacity');
397						$j('.tile').each(function(){
398							if($j(this).hasClass('notOpacity')){$j(this).removeClass('notOpacity');}
399							else{
400							$j(this).css('opacity','0.5');
401							}
402						});
403						$j(this).children().children('.tileImage').fadeIn('normal').css('zIndex','110');
404					}
405				}
406			}
407		}
408		$j('.tile').bind('mouseleave', function(){
409			$j('.tile').css('opacity','1');
410			if($j(this).hasClass('goRight')){ 
411				$j(this).children().children('.tileImage').css('zIndex','100').fadeOut('fast')
412				$j(this).removeClass('noOut');
413			}
414			else {
415				if($j(this).hasClass('endLine')) {
416					$j(this).children().children('.tileImage').css('zIndex','100').fadeOut('fast')
417					$j(this).removeClass('noOut');
418				}
419				else{
420					if($j(this).hasClass('noOut')){
421						$j(this).children().children('.tileImage').css('zIndex','100').fadeOut('fast')
422						$j(this).removeClass('noOut');
423					}
424				}
425			}
426			$j('.tile').css('opacity','1'); 
427		});
428	});
429}
430
431//$j.when(quicksand()).then(function(){alert('aaa');});
432function quicksand() {
433	// get the action filter option item on page load
434  var $filterType = $j('#filterOptions li.active a').attr('class');
435	
436  // get and assign the ourHolder element to the
437	// $holder varible for use later
438  var $holder = $j('ul.ourHolder');
439
440  // clone all items within the pre-assigned $holder element
441  var $data = $holder.clone();
442
443  // attempt to call Quicksand when a filter option
444	// item is clicked
445	$j('#filterOptions li a').click(function(e) {
446		// reset the active class on all the buttons
447		$j('#filterOptions li').removeClass('active');
448		
449		// assign the class of the clicked filter option
450		// element to our $filterType variable
451		var $filterType = $j(this).attr('class');
452		$j(this).parent().addClass('active');
453		
454		if ($filterType == 'all') {
455			// assign all li items to the $filteredData var when
456			// the 'All' filter option is clicked
457			var $filteredData = $data.find('li');
458		} 
459		else {
460			// find all li elements that have our required $filterType
461			// values for the data-type element
462			var $filteredData = $data.find('li[class~=' + $filterType + ']');
463
464		}
465		
466		// call quicksand and assign transition parameters
467		$holder.quicksand($filteredData, {
468			duration: 800,
469			easing: 'jswing'
470		},function(){
471			refreshGridGallery();
472      initTile();
473      tileHover();
474      if($j('.portfolio').hasClass('item-direct')){
475          directLink();
476      } else if($j('.portfolio').hasClass('item-fancybox')) {
477          itemFancybox();
478      } else {
479          showTile();
480      }
481      if(typeof Cufon != 'undefined'){      
482			 Cufon.refresh();
483      }
484		});		
485		
486		return false;
487	});
488} 
489
490function categorySlider() {
491        strong = parseInt($j('.strong').css('width'));
492        $j('.strong').css('width',strong+'px')
493        
494        $j('.category-list a').click(function(e){
495            e.preventDefault();
496            $j('.gallery-portfolio').hide();
497            var link = $j(this).attr('id');
498            $j('.'+link).show();
499        });
500        
501	var f = 1;
502	ulWidth = 0;
503	$j('.galery-holder').each(function(){
504		liW = $j(this).children('.galery-wrap').children('.galery-slider').children('li').width() + parseInt($j('.galery-slider li').css('marginRight'));
505		ulWidth = $j(this).children('.galery-wrap').children('.galery-slider').children('li').size() * liW;
506		maxL = 0;
507		if($j(this).children('.galery-wrap').children('.galery-slider').children('li').size() <= 5)
508		{
509			maxL = $j(this).children('.galery-wrap').children('.galery-slider').children('li').size();			
510			max = $j(this).children('.galery-wrap').children('.galery-slider').children('li').size();
511			$j(this).attr('data-enable', maxL);			
512			$j(this).attr('data-max', max);
513		}
514		else{
515			maxL =$j(this).children('.galery-wrap').children('.galery-slider').children('li').size()-5;
516			max = $j(this).children('.galery-wrap').children('.galery-slider').children('li').size()-5;
517			$j(this).attr('data-enable', maxL);
518			$j(this).attr('data-max', max);
519		}
520		
521		mL = maxL;
522		
523		$j(this).attr('data-ulWidth',ulWidth);
524                $j(this).children('ul').css('width',ulWidth);
525	});
526	
527	//$j('.galery-slider').css('width',ulWidth);
528	$j('.gall-r').click(function(){
529    //console.log();
530		if($j(this).parent('.name').siblings('.galery-holder').attr('data-enable') != parseInt($j(this).parent('.name').siblings('.galery-holder').attr('data-max')-($j(this).parent('.name').siblings('.galery-holder').attr('data-max')-3))){
531			$j(this).parent('.name').siblings('.galery-holder').children('.galery-wrap').children('.galery-slider').stop('true','true');
532			$j(this).parent('.name').siblings('.galery-holder').children('.galery-wrap').children('.galery-slider').animate({"left": "-="+liW+"px"});
533			mL=$j(this).parent('.name').siblings('.galery-holder').attr('data-enable')-1;
534			$j(this).parent('.name').siblings('.galery-holder').attr('data-enable', mL);
535		}
536		return false;
537	});
538	//$j('.galery-slider').css('width',ulWidth);
539	$j('.gall-l').click(function(){
540    //console.log();
541		if($j(this).parent('.name').siblings('.galery-holder').attr('data-enable') != $j(this).parent('.name').siblings('.galery-holder').attr('data-max')){
542			$j(this).parent('.name').siblings('.galery-holder').children('.galery-wrap').children('.galery-slider').stop('true','true');
543			$j(this).parent('.name').siblings('.galery-holder').children('.galery-wrap').children('.galery-slider').animate({"left": "+="+liW+"px"});
544			mL=$j(this).parent('.name').siblings('.galery-holder').attr('data-enable');
545			mL++;
546			$j(this).parent('.name').siblings('.galery-holder').attr('data-enable', mL);
547		}
548		return false;
549	});
550}
551
552
553
554function directLink(){
555  $j('.tile').parent().click(function(){
556      window.location = $j(this).children().children().children('a').attr('href');
557  });
558}
559
560function itemFancybox(){
561  $j(".portfolio .ourHolder li").each(function(){
562    var type = 'image';
563    var href = ''; 
564    
565    if($j(this).hasClass('itemType-image')){
566      type = 'image';
567      href = $j(this).children('.tile').children().children('a').attr('href');
568      $j(this).children('.tile').fancybox({
569        'type' : type,
570        'href' : href,
571        'transitionIn'  : 'elastic',
572        'transitionOut' : 'elastic',
573        'speedIn'   : 600, 
574        'speedOut'    : 200, 
575        'overlayShow' : true,
576        'autoDimensions' : false,
577        'width' : $j('.gridgallery').parent().width(),
578        'height' : parseInt($j('.gridgallery').parent().width()/1.5)
579      });      
580    } else if ($j(this).hasClass('itemType-video')){
581      type = 'swf';
582      href = $j(this).children('.tile').children().children('a').attr('href');
583      if(href.indexOf("youtube") != -1){
584       href = href.replace(new RegExp("watch\\?v=", "i"), 'v/');
585      } else {
586        type = 'iframe';
587        var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/;
588        var match = href.match(regExp);
589        href = "http://player.vimeo.com/video/"+match[2]+"?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff";
590      }
591      $j(this).children('.tile').fancybox({
592        'type' : type,
593        'href' : href,
594        'transitionIn'  : 'elastic',
595        'transitionOut' : 'elastic',
596        'speedIn'   : 600, 
597        'speedOut'    : 200, 
598        'overlayShow' : true,
599        'autoDimensions' : false,
600        'width' : $j('.gridgallery').parent().width(),
601        'height' : parseInt($j('.gridgallery').parent().width()/1.5)
602      }); 
603    } else {
604      type = 'iframe';
605      href = $j(this).children('.tile').children().children('a').attr('href');
606      $j(this).children('.tile').click(function(){
607        window.open(href);
608      });
609    }
610    
611    
612  });
613}
614
615function portCatShow() {
616  $j(".portfolio .port-cat.icon").click(
617      (function() {
618        $j('.portfolio .port-cat.categories').fadeToggle('slow');
619      })
620  );
621}
622
623function tileHover(){
624  $j('.gridgallery .ourHolder .item').each(function(){
625    var tileIcon = $j(this).children('.tile').children('.gridgallery-icon');
626    
627    $j(this).hover(function(){
628      tileIcon.css({'background-color' : 'rgba(51, 51, 51, 0.8)'});
629      tileIcon.stop(true,true).fadeIn('slow');
630    },function(){
631      tileIcon.stop(true,true).fadeOut('slow');
632      tileIcon.css({'background-color' : 'none'});      
633    });    
634  });
635}

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.