Kilometro6
Animated Portfolio Gallery
Animated Portfolio Gallery
Este código va en Texto por encima de la página:
<!-- www.kilometro6.es.tl -->
<script src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/cufon-yui.js" type="text/javascript"></script>
<script src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/Quicksand_Book_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1,h2');
</script>
<h1 class="title">Título <span>Descripción</span></h1>
<div class="pg_content">
<div id="pg_title" class="pg_title">
<h1 style="display:block;top:25px;">Shape Company Website Design</h1>
<h1>Summer of Love</h1>
<h1>Smashing Multimedia</h1>
<h1>Design Studio Project</h1>
<h1>Graphpedia Blog Innovative Solutions</h1>
<h1>My Portfolio Project</h1>
<h1>1st Webdesigner</h1>
<h1>Workspace Tools Conference</h1>
</div>
<div id="pg_preview">
<img class="pg_thumb" style="display:block;z-index:9999;" src="https://img.webme.com/pic/k/kilometro6-pruebas/1m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/1.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/2m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/2.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/3m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/3.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/4m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/4.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/5m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/5.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/6m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/6.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/7m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/7.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/8m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/8.jpg"/>
</div>
<div id="pg_desc1" class="pg_description">
<div style="display:block;left:250px;">
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
<div>
<h2>Project Description</h2>
<p>It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer.</p>
</div>
<div>
<h2>Project Description</h2>
<p> Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div>
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
<div>
<h2>Project Description</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Project Description</h2>
<p>It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer.</p>
</div>
<div>
<h2>Project Description</h2>
<p> Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div>
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
</div>
<div id="pg_desc2" class="pg_description">
<div style="display:block;left:250px;">
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
</div>
</div>
<div id="thumbContainter">
<!-- www.kilometro6.es.tl -->
<div id="thumbScroller">
<div class="container">
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/1c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/2c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/3c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/4c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/5c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/6c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/7c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/8c.jpg" alt="" class="thumb" /></a></div>
</div>
</div>
</div>
</div>
<div id="overlay"></div>
<div>
<span id="webme_footer_textlink_dont_hide"></span>
</div>
<!-- The JavaScript -->
<!-- www.kilometro6.es.tl -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
//index of current item
var current = 0;
//speeds / ease type for animations
var fadeSpeed = 400;
var animSpeed = 600;
var easeType = 'easeOutCirc';
//caching
var $thumbScroller = $('#thumbScroller');
var $scrollerContainer = $thumbScroller.find('.container');
var $scrollerContent = $thumbScroller.find('.content');
var $pg_title = $('#pg_title');
var $pg_preview = $('#pg_preview');
var $pg_desc1 = $('#pg_desc1');
var $pg_desc2 = $('#pg_desc2');
var $overlay = $('#overlay');
//number of items
var scrollerContentCnt = $scrollerContent.length;
var sliderHeight = $(window).height();
//we will store the total height
//of the scroller container in this variable
var totalContent = 0;
//one items height
var itemHeight = 0;
//First let's create the scrollable container,
//after all its images are loaded
var cnt = 0;
$thumbScroller.find('img').each(function(){
var $img = $(this);
$('<img/>').load(function(){
++cnt;
if(cnt == scrollerContentCnt){
//one items height
itemHeight = $thumbScroller.find('.content:first').height();
buildScrollableItems();
//show the scrollable container
$thumbScroller.stop().animate({'left':'0px'},animSpeed);
}
}).attr('src',$img.attr('src'));
});
//when we click an item from the scrollable container
//we want to display the items content
//we use the index of the item in the scrollable container
//to know which title / image / descriptions we will show
$scrollerContent.bind('click',function(e){
var $this = $(this);
var idx = $this.index();
//if we click on the one shown then return
if(current==idx) return;
//if the current image is enlarged,
//then we will remove it but before
//we animate it just like we would do with the thumb
var $pg_large = $('#pg_large');
if($pg_large.length > 0){
$pg_large.animate({'left':'350px','opacity':'0'},animSpeed,function(){
$pg_large.remove();
});
}
//get the current and clicked items elements
var $currentTitle = $pg_title.find('h1:nth-child('+(current+1)+')');
var $nextTitle = $pg_title.find('h1:nth-child('+(idx+1)+')');
var $currentThumb = $pg_preview.find('img.pg_thumb:eq('+current+')');
var $nextThumb = $pg_preview.find('img.pg_thumb:eq('+idx+')');
var $currentDesc1 = $pg_desc1.find('div:nth-child('+(current+1)+')');
var $nextDesc1 = $pg_desc1.find('div:nth-child('+(idx+1)+')');
var $currentDesc2 = $pg_desc2.find('div:nth-child('+(current+1)+')');
var $nextDesc2 = $pg_desc2.find('div:nth-child('+(idx+1)+')');
//the new current is now the index of the clicked scrollable item
current = idx;
//animate the current title up,
//hide it, and animate the next one down
$currentTitle.stop().animate({'top':'-50px'},animSpeed,function(){
$(this).hide();
$nextTitle.show().stop().animate({'top':'25px'},animSpeed);
});
//show the next image,
//animate the current to the left and fade it out
//so that the next gets visible
$nextThumb.show();
$currentThumb.stop().animate({'left': '350px','opacity':'0'},animSpeed,function(){
$(this).hide().css({
'left' : '250px',
'opacity' : 1,
'z-index' : 1
});
$nextThumb.css({'z-index':9999});
});
//animate both current descriptions left / right and fade them out
//fade in and animate the next ones right / left
$currentDesc1.stop().animate({'left':'205px','opacity':'0'},animSpeed,function(){
$(this).hide();
$nextDesc1.show().stop().animate({'left':'250px','opacity':'1'},animSpeed);
});
$currentDesc2.stop().animate({'left':'295px','opacity':'0'},animSpeed,function(){
$(this).hide();
$nextDesc2.show().stop().animate({'left':'250px','opacity':'1'},animSpeed);
});
e.preventDefault();
});
//when we click a thumb, the thumb gets enlarged,
//to the sizes of the large image (fixed values).
//then we load the large image, and insert it after
//the thumb. After that we hide the thumb so that
//the large one gets displayed
$pg_preview.find('.pg_thumb').bind('click',showLargeImage);
//enlarges the thumb
function showLargeImage(){
//if theres a large one remove
$('#pg_large').remove();
var $thumb = $(this);
$thumb.unbind('click');
var large_src = $thumb.attr('alt');
$overlay.fadeIn(200);
//animate width to 600px,height to 500px
$thumb.stop().animate({
'width' : '600px',
'height': '500px'
},500,function(){
$('<img id="pg_large"/>').load(function(){
var $largeImg = $(this);
$largeImg.insertAfter($thumb).show();
$thumb.hide().css({
'left' : '250px',
'opacity' : 1,
'z-index' : 1,
'width' : '360px',
'height' : '300px'
});
//when we click the large image
//we revert the animation
$largeImg.bind('click',function(){
$thumb.show();
$overlay.fadeOut(200);
$(this).stop().animate({
'width' : '360px',
'height': '300px'
},500,function(){
$(this).remove();
$thumb.css({'z-index' : 9999});
//bind again the click event
$thumb.bind('click',showLargeImage);
});
});
}).attr('src',large_src);
});
}
//resize window event:
//the scroller container needs to update
//its height based on the new windows height
$(window).resize(function() {
var w_h = $(window).height();
$thumbScroller.css('height',w_h);
sliderHeight = w_h;
});
//create the scrollable container
//taken from Manos :
//http://manos.malihu.gr/jquery-thumbnail-scroller
function buildScrollableItems(){
totalContent = (scrollerContentCnt-1)*itemHeight;
$thumbScroller.css('height',sliderHeight)
.mousemove(function(e){
if($scrollerContainer.height()>sliderHeight){
var mouseCoords = (e.pageY - this.offsetTop);
var mousePercentY = mouseCoords/sliderHeight;
var destY = -(((totalContent-(sliderHeight-itemHeight))-sliderHeight)*(mousePercentY));
var thePosA = mouseCoords-destY;
var thePosB = destY-mouseCoords;
if(mouseCoords==destY)
$scrollerContainer.stop();
else if(mouseCoords>destY)
$scrollerContainer.stop()
.animate({
top: -thePosA
},
animSpeed,
easeType);
else if(mouseCoords<destY)
$scrollerContainer.stop()
.animate({
top: thePosB
},
animSpeed,
easeType);
}
}).find('.thumb')
.fadeTo(fadeSpeed, 0.6)
.hover(
function(){ //mouse over
$(this).fadeTo(fadeSpeed, 1);
},
function(){ //mouse out
$(this).fadeTo(fadeSpeed, 0.6);
}
);
}
});
</script>
<!-- www.kilometro6.es.tl -->
<script src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/cufon-yui.js" type="text/javascript"></script>
<script src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/Quicksand_Book_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1,h2');
</script>
<h1 class="title">Título <span>Descripción</span></h1>
<div class="pg_content">
<div id="pg_title" class="pg_title">
<h1 style="display:block;top:25px;">Shape Company Website Design</h1>
<h1>Summer of Love</h1>
<h1>Smashing Multimedia</h1>
<h1>Design Studio Project</h1>
<h1>Graphpedia Blog Innovative Solutions</h1>
<h1>My Portfolio Project</h1>
<h1>1st Webdesigner</h1>
<h1>Workspace Tools Conference</h1>
</div>
<div id="pg_preview">
<img class="pg_thumb" style="display:block;z-index:9999;" src="https://img.webme.com/pic/k/kilometro6-pruebas/1m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/1.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/2m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/2.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/3m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/3.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/4m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/4.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/5m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/5.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/6m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/6.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/7m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/7.jpg"/>
<img class="pg_thumb" src="https://img.webme.com/pic/k/kilometro6-pruebas/8m.jpg" alt="https://img.webme.com/pic/k/kilometro6-pruebas/8.jpg"/>
</div>
<div id="pg_desc1" class="pg_description">
<div style="display:block;left:250px;">
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
<div>
<h2>Project Description</h2>
<p>It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer.</p>
</div>
<div>
<h2>Project Description</h2>
<p> Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div>
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
<div>
<h2>Project Description</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Project Description</h2>
<p>It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer.</p>
</div>
<div>
<h2>Project Description</h2>
<p> Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div>
<h2>Project Description</h2>
<p>A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.</p>
</div>
</div>
<div id="pg_desc2" class="pg_description">
<div style="display:block;left:250px;">
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
</div>
<div>
<h2>Technologies Used</h2>
<p>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.</p>
</div>
</div>
</div>
<div id="thumbContainter">
<!-- www.kilometro6.es.tl -->
<div id="thumbScroller">
<div class="container">
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/1c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/2c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/3c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/4c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/5c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/6c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/7c.jpg" alt="" class="thumb" /></a></div>
</div>
<div class="content">
<div><a href="#"><img src="https://img.webme.com/pic/k/kilometro6-pruebas/8c.jpg" alt="" class="thumb" /></a></div>
</div>
</div>
</div>
</div>
<div id="overlay"></div>
<div>
<span id="webme_footer_textlink_dont_hide"></span>
</div>
<!-- The JavaScript -->
<!-- www.kilometro6.es.tl -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="http://kilometro6.comze.com/wp-content/uploads/2013/09/Animated%20Portfolio%20Gallery/js/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
//index of current item
var current = 0;
//speeds / ease type for animations
var fadeSpeed = 400;
var animSpeed = 600;
var easeType = 'easeOutCirc';
//caching
var $thumbScroller = $('#thumbScroller');
var $scrollerContainer = $thumbScroller.find('.container');
var $scrollerContent = $thumbScroller.find('.content');
var $pg_title = $('#pg_title');
var $pg_preview = $('#pg_preview');
var $pg_desc1 = $('#pg_desc1');
var $pg_desc2 = $('#pg_desc2');
var $overlay = $('#overlay');
//number of items
var scrollerContentCnt = $scrollerContent.length;
var sliderHeight = $(window).height();
//we will store the total height
//of the scroller container in this variable
var totalContent = 0;
//one items height
var itemHeight = 0;
//First let's create the scrollable container,
//after all its images are loaded
var cnt = 0;
$thumbScroller.find('img').each(function(){
var $img = $(this);
$('<img/>').load(function(){
++cnt;
if(cnt == scrollerContentCnt){
//one items height
itemHeight = $thumbScroller.find('.content:first').height();
buildScrollableItems();
//show the scrollable container
$thumbScroller.stop().animate({'left':'0px'},animSpeed);
}
}).attr('src',$img.attr('src'));
});
//when we click an item from the scrollable container
//we want to display the items content
//we use the index of the item in the scrollable container
//to know which title / image / descriptions we will show
$scrollerContent.bind('click',function(e){
var $this = $(this);
var idx = $this.index();
//if we click on the one shown then return
if(current==idx) return;
//if the current image is enlarged,
//then we will remove it but before
//we animate it just like we would do with the thumb
var $pg_large = $('#pg_large');
if($pg_large.length > 0){
$pg_large.animate({'left':'350px','opacity':'0'},animSpeed,function(){
$pg_large.remove();
});
}
//get the current and clicked items elements
var $currentTitle = $pg_title.find('h1:nth-child('+(current+1)+')');
var $nextTitle = $pg_title.find('h1:nth-child('+(idx+1)+')');
var $currentThumb = $pg_preview.find('img.pg_thumb:eq('+current+')');
var $nextThumb = $pg_preview.find('img.pg_thumb:eq('+idx+')');
var $currentDesc1 = $pg_desc1.find('div:nth-child('+(current+1)+')');
var $nextDesc1 = $pg_desc1.find('div:nth-child('+(idx+1)+')');
var $currentDesc2 = $pg_desc2.find('div:nth-child('+(current+1)+')');
var $nextDesc2 = $pg_desc2.find('div:nth-child('+(idx+1)+')');
//the new current is now the index of the clicked scrollable item
current = idx;
//animate the current title up,
//hide it, and animate the next one down
$currentTitle.stop().animate({'top':'-50px'},animSpeed,function(){
$(this).hide();
$nextTitle.show().stop().animate({'top':'25px'},animSpeed);
});
//show the next image,
//animate the current to the left and fade it out
//so that the next gets visible
$nextThumb.show();
$currentThumb.stop().animate({'left': '350px','opacity':'0'},animSpeed,function(){
$(this).hide().css({
'left' : '250px',
'opacity' : 1,
'z-index' : 1
});
$nextThumb.css({'z-index':9999});
});
//animate both current descriptions left / right and fade them out
//fade in and animate the next ones right / left
$currentDesc1.stop().animate({'left':'205px','opacity':'0'},animSpeed,function(){
$(this).hide();
$nextDesc1.show().stop().animate({'left':'250px','opacity':'1'},animSpeed);
});
$currentDesc2.stop().animate({'left':'295px','opacity':'0'},animSpeed,function(){
$(this).hide();
$nextDesc2.show().stop().animate({'left':'250px','opacity':'1'},animSpeed);
});
e.preventDefault();
});
//when we click a thumb, the thumb gets enlarged,
//to the sizes of the large image (fixed values).
//then we load the large image, and insert it after
//the thumb. After that we hide the thumb so that
//the large one gets displayed
$pg_preview.find('.pg_thumb').bind('click',showLargeImage);
//enlarges the thumb
function showLargeImage(){
//if theres a large one remove
$('#pg_large').remove();
var $thumb = $(this);
$thumb.unbind('click');
var large_src = $thumb.attr('alt');
$overlay.fadeIn(200);
//animate width to 600px,height to 500px
$thumb.stop().animate({
'width' : '600px',
'height': '500px'
},500,function(){
$('<img id="pg_large"/>').load(function(){
var $largeImg = $(this);
$largeImg.insertAfter($thumb).show();
$thumb.hide().css({
'left' : '250px',
'opacity' : 1,
'z-index' : 1,
'width' : '360px',
'height' : '300px'
});
//when we click the large image
//we revert the animation
$largeImg.bind('click',function(){
$thumb.show();
$overlay.fadeOut(200);
$(this).stop().animate({
'width' : '360px',
'height': '300px'
},500,function(){
$(this).remove();
$thumb.css({'z-index' : 9999});
//bind again the click event
$thumb.bind('click',showLargeImage);
});
});
}).attr('src',large_src);
});
}
//resize window event:
//the scroller container needs to update
//its height based on the new windows height
$(window).resize(function() {
var w_h = $(window).height();
$thumbScroller.css('height',w_h);
sliderHeight = w_h;
});
//create the scrollable container
//taken from Manos :
//http://manos.malihu.gr/jquery-thumbnail-scroller
function buildScrollableItems(){
totalContent = (scrollerContentCnt-1)*itemHeight;
$thumbScroller.css('height',sliderHeight)
.mousemove(function(e){
if($scrollerContainer.height()>sliderHeight){
var mouseCoords = (e.pageY - this.offsetTop);
var mousePercentY = mouseCoords/sliderHeight;
var destY = -(((totalContent-(sliderHeight-itemHeight))-sliderHeight)*(mousePercentY));
var thePosA = mouseCoords-destY;
var thePosB = destY-mouseCoords;
if(mouseCoords==destY)
$scrollerContainer.stop();
else if(mouseCoords>destY)
$scrollerContainer.stop()
.animate({
top: -thePosA
},
animSpeed,
easeType);
else if(mouseCoords<destY)
$scrollerContainer.stop()
.animate({
top: thePosB
},
animSpeed,
easeType);
}
}).find('.thumb')
.fadeTo(fadeSpeed, 0.6)
.hover(
function(){ //mouse over
$(this).fadeTo(fadeSpeed, 1);
},
function(){ //mouse out
$(this).fadeTo(fadeSpeed, 0.6);
}
);
}
});
</script>
<!-- www.kilometro6.es.tl -->
Este va en CSS-Code sin Style Tags:
/*Código adaptado por www.kilometro6.es.tl*/
h1.title{
position:absolute;
right:20px;
top:0px;
font-weight:normal;
text-transform:uppercase;
font-size:56px;
color:#fff;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
padding:0px 15px 10px 15px;
}
h1.title span{
font-size:14px;
display:block;
}
span.reference{
font-family:Arial;
position:fixed;
right:10px;
bottom:10px;
font-size:10px;
}
span.reference a{
color:#333;
text-transform:uppercase;
text-decoration:none;
margin-left:20px;
}
*{
margin:0;
padding:0;
}
body{
background: #564c4c url(https://img.webme.com/pic/k/kilometro6-pruebas/webtreats2.jpg) repeat top left;
font-family:"Trebuchet MS","Myriad Pro", Helvetica, sans-serif;
font-size:12px;
color: #111;
overflow-x:hidden;
}
#overlay{
position:fixed;
top:0px;
left:0px;
width:100%;
height:100%;
background: #000;
display:none;
opacity:0.9;
}
#thumbContainter{
position:fixed;
top:0px;
left:0px;
bottom:0px;
margin:0;
width:175px;
padding:0 10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
border-right:1px solid #f0f0f0;
-moz-box-shadow:-2px 0px 10px #000 inset;
-webkit-box-shadow:-2px 0px 10px #000 inset;
box-shadow:-2px 0px 10px #000 inset;
}
#thumbScroller{
position:relative;
height:600px;
overflow:hidden;
left:-180px;
}
#thumbScroller .container{
position:relative;
top:0;
float:left;
}
#thumbScroller .content{
clear:both;
float:left;
}
#thumbScroller .content div{
padding:2px;
height:100%;
float:left;
}
#thumbScroller .content a{
outline:none;
}
#thumbScroller img{
border:5px solid #000;
-moz-box-shadow:0px 0px 2px #000;
-webkit-box-shadow:0px 0px 2px #000;
box-shadow:0px 0px 2px #000;
}
img.pg_thumb,
img#pg_large,
.pg_title h1,
.pg_content .pg_description div
{
position:absolute;
}
.pg_content .pg_description div{
display:none;
}
.pg_title h1{
display:none;
left:250px;
top:-50px;/*25*/
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
padding:10px 20px;
color:#fff;
font-weight:bold;
}
img.pg_thumb{
display:none;
}
img#pg_large{
z-index:9999;
}
img.pg_thumb,
img#pg_large{
top:90px;
left:250px;
padding:10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
cursor:pointer;
}
.pg_description h2{
color:#000;
font-size:22px;
margin-bottom:10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg2.png) repeat top left;
padding:5px;
}
.pg_description p{
font-size:14px;
width:500px;
padding:10px;
overflow:hidden;
text-shadow:0px 0px 1px #fff;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
color:#fff;
}
#pg_desc1 div{
top:420px;
left:205px;
}
#pg_desc2 div{
top:560px;
left:295px;
}
#webme_footer_textlink_dont_hide {
background-color: #000000;
color: #FFFFFF;
position:fixed;
right:10px;
bottom:10px;
}
h1.title{
position:absolute;
right:20px;
top:0px;
font-weight:normal;
text-transform:uppercase;
font-size:56px;
color:#fff;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
padding:0px 15px 10px 15px;
}
h1.title span{
font-size:14px;
display:block;
}
span.reference{
font-family:Arial;
position:fixed;
right:10px;
bottom:10px;
font-size:10px;
}
span.reference a{
color:#333;
text-transform:uppercase;
text-decoration:none;
margin-left:20px;
}
*{
margin:0;
padding:0;
}
body{
background: #564c4c url(https://img.webme.com/pic/k/kilometro6-pruebas/webtreats2.jpg) repeat top left;
font-family:"Trebuchet MS","Myriad Pro", Helvetica, sans-serif;
font-size:12px;
color: #111;
overflow-x:hidden;
}
#overlay{
position:fixed;
top:0px;
left:0px;
width:100%;
height:100%;
background: #000;
display:none;
opacity:0.9;
}
#thumbContainter{
position:fixed;
top:0px;
left:0px;
bottom:0px;
margin:0;
width:175px;
padding:0 10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
border-right:1px solid #f0f0f0;
-moz-box-shadow:-2px 0px 10px #000 inset;
-webkit-box-shadow:-2px 0px 10px #000 inset;
box-shadow:-2px 0px 10px #000 inset;
}
#thumbScroller{
position:relative;
height:600px;
overflow:hidden;
left:-180px;
}
#thumbScroller .container{
position:relative;
top:0;
float:left;
}
#thumbScroller .content{
clear:both;
float:left;
}
#thumbScroller .content div{
padding:2px;
height:100%;
float:left;
}
#thumbScroller .content a{
outline:none;
}
#thumbScroller img{
border:5px solid #000;
-moz-box-shadow:0px 0px 2px #000;
-webkit-box-shadow:0px 0px 2px #000;
box-shadow:0px 0px 2px #000;
}
img.pg_thumb,
img#pg_large,
.pg_title h1,
.pg_content .pg_description div
{
position:absolute;
}
.pg_content .pg_description div{
display:none;
}
.pg_title h1{
display:none;
left:250px;
top:-50px;/*25*/
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
padding:10px 20px;
color:#fff;
font-weight:bold;
}
img.pg_thumb{
display:none;
}
img#pg_large{
z-index:9999;
}
img.pg_thumb,
img#pg_large{
top:90px;
left:250px;
padding:10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
cursor:pointer;
}
.pg_description h2{
color:#000;
font-size:22px;
margin-bottom:10px;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg2.png) repeat top left;
padding:5px;
}
.pg_description p{
font-size:14px;
width:500px;
padding:10px;
overflow:hidden;
text-shadow:0px 0px 1px #fff;
background:transparent url(https://img.webme.com/pic/k/kilometro6-pruebas/bg-apg.png) repeat top left;
color:#fff;
}
#pg_desc1 div{
top:420px;
left:205px;
}
#pg_desc2 div{
top:560px;
left:295px;
}
#webme_footer_textlink_dont_hide {
background-color: #000000;
color: #FFFFFF;
position:fixed;
right:10px;
bottom:10px;
}
Partes a modificar:
Tienen que modificar todas las imágenes, descripciones y títulos.
Puedes ver un ejemplo aqui.
Cualquier pregunta puedes hacerla en nuestra Seccion de Soporte
Hoy hemos ayudado a 17 visitantes (20 clics a subpáginas) en kilometro6!