1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
| <head>
<--bxSlider-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.min.js" type="text/javascript"></script>
<link href="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css"/>
<--LightBox-->
<script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/mootools.js"></script>
<script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/swfobject.js"></script>
<script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/videobox.js"></script>
<link rel="stylesheet" href="http://www.jeromegobin.hostei.com/video/css/videobox.css" type="text/css" media="screen"/>
<--HoverSlideEffect-->
<script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/cufon-yui.js" type="text/javascript"></script>
<script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/Cantarell.font.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://www.jeromegobin.hostei.com/hoverslideeffect/css/style.css" type="text/css" media="screen"/>
<script type="text/javascript">
//<![CDATA[
jQuery.noConflict();
//]]>
</script>
</head>
<body>
<--bxSlider-->
<ul class="bxslider">
<li>
<img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-1.jpg" alt=""/>
</li>
<li>
<img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-2.jpg" alt=""/>
</li>
<li>
<img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-3.jpg" alt=""/>
</li>
<li>
<img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-4.jpg" alt=""/>
</li>
<li>
<img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-5.jpg" alt=""/>
</li>
</ul>
<script type="text/javascript">
//<![CDATA[
jQuery('.bxslider').bxSlider({ auto: true, autoControls: true });
//]]>
</script>
<--LightBox-->
<a href="https://vimeo.com/88662703&autoplay=1" rel="vidbox 560 315"><img onmouseover="this.src='http://www.jeromegobin.hostei.com/logo/showreel_2.gif'" onmouseout=
"this.src='http://www.jeromegobin.hostei.com/logo/showreel_1.jpg'" src="http://www.jeromegobin.hostei.com/logo/showreel_1.jpg" alt="" width="300" border="0" /></a>
<--HoverSlideEffect-->
<div id="hs_container" class="hs_container">
<div class="hs_area hs_area1">
<img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/3.jpg" alt=""/>
</div>
<div class="hs_area hs_area2">
<img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/3.jpg" alt=""/>
</div>
<div class="hs_area hs_area3">
<img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/3.jpg" alt=""/>
</div>
<div class="hs_area hs_area4">
<img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/3.jpg" alt=""/>
</div>
<div class="hs_area hs_area5">
<img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/3.jpg" alt=""/>
</div>
</div>
<!-- The JavaScript -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
</script><script type="text/javascript" src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/jquery.easing.1.3.js">
</script><script type="text/javascript">
//<![CDATA[
$(function() {
//custom animations to use
//in the transitions
var animations = ['right','left','top','bottom','rightFade','leftFade','topFade','bottomFade'];
var total_anim = animations.length;
//just change this to one of your choice
var easeType = 'swing';
//the speed of each transition
var animSpeed = 450;
//caching
var $hs_container = $('#hs_container');
var $hs_areas = $hs_container.find('.hs_area');
//first preload all images
$hs_images = $hs_container.find('img');
var total_images = $hs_images.length;
var cnt = 0;
$hs_images.each(function(){
var $this = $(this);
$('<img/>').load(function(){
++cnt;
if(cnt == total_images){
$hs_areas.each(function(){
var $area = $(this);
//when the mouse enters the area we animate the current
//image (random animation from array animations),
//so that the next one gets visible.
//"over" is a flag indicating if we can animate
//an area or not (we don't want 2 animations
//at the same time for each area)
$area.data('over',true).bind('mouseenter',function(){
if($area.data('over')){
$area.data('over',false);
//how many images in this area?
var total = $area.children().length;
//visible image
var $current = $area.find('img:visible');
//index of visible image
var idx_current = $current.index();
//the next image that's going to be displayed.
//either the next one, or the first one if the current is the last
var $next = (idx_current == total-1) ? $area.children(':first') : $current.next();
//show next one (not yet visible)
$next.show();
//get a random animation
var anim = animations[Math.floor(Math.random()*total_anim)];
switch(anim){
//current slides out from the right
case 'right':
$current.animate({
'left':$current.width()+'px'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'left' : '0px'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the left
case 'left':
$current.animate({
'left':-$current.width()+'px'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'left' : '0px'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the top
case 'top':
$current.animate({
'top':-$current.height()+'px'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'top' : '0px'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the bottom
case 'bottom':
$current.animate({
'top':$current.height()+'px'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'top' : '0px'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the right and fades out
case 'rightFade':
$current.animate({
'left':$current.width()+'px',
'opacity':'0'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'left' : '0px',
'opacity' : '1'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the left and fades out
case 'leftFade':
$current.animate({
'left':-$current.width()+'px','opacity':'0'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'left' : '0px',
'opacity' : '1'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the top and fades out
case 'topFade':
$current.animate({
'top':-$current.height()+'px',
'opacity':'0'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'top' : '0px',
'opacity' : '1'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
//current slides out from the bottom and fades out
case 'bottomFade':
$current.animate({
'top':$current.height()+'px',
'opacity':'0'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'top' : '0px',
'opacity' : '1'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
default:
$current.animate({
'left':-$current.width()+'px'
},
animSpeed,
easeType,
function(){
$current.hide().css({
'z-index' : '1',
'left' : '0px'
});
$next.css('z-index','9999');
$area.data('over',true);
});
break;
}
}
});
});
//when clicking the hs_container all areas get slided
//(just for fun...you would probably want to enter the site
//or something similar)
$hs_container.bind('click',function(){
$hs_areas.trigger('mouseenter');
});
}
}).attr('src',$this.attr('src'));
});
});
//]]>
</script>
</body> |
Partager