// -- CUSTOM FUNCTIONS AND EFFECTS --
// -- NO CONFLICT MODE --
var $s = jQuery.noConflict();
$s(function(){
// -- IMAGE PRELOADER --
target = $s(".cycle_slider li, .loadify, .custom_embed, .ar_thumb, .img_thumb, .mf_thumb, .mslides li, .thumb_big, .thumb_medium img");
images = target.find("img");
counter = 0;
i=0;
loaded = [];
nextDelay = 0;
images.each(function(){
if( $s(this).parent().length == 0 )
$s(this).wrap("");
else
$s(this).parent().addClass("preload");
loaded[i++] = false;
});
images = $s.makeArray(images);
timer = setInterval(function() {
if( counter >= loaded.length )
{
clearInterval(timer);
return;
}
for( i=0; i 0)
{
var zoom = $s('').prependTo($s(this));
var icons = $s(this).find('.thumb_controls');
$s(zoom).css({opacity: "0"});
$s(icons).css({opacity: "0"});
$s(this).hover(function()
{
var x = images.width();
var y = images.height();
var xy = images.position();
$s(zoom).css({width:x, height:y, top:xy.top + settings.xOffset, left:xy.left + settings.yOffset});
$s(icons).css({top:y/2 - 10, left:x/2 - 19 });
$s(zoom).stop().animate({"opacity": "0.5"}, 200);
$s(icons).stop().animate({"opacity": "1"}, 200);
}, function() {
$s(zoom).stop().animate({"opacity": "0"}, 200);
$s(icons).stop().animate({"opacity": "0"}, 200);
}
);
}
});
return this;
};
$s(".ar_thumb, .img_thumb, .mf_thumb").thumbHover({ xOffset: 0, yOffset: 0 });
// -- TOP OF PAGE --
$s('.top_btn').hide();
$s(window).scroll(function () {
if( $s(this).scrollTop() > 100 ) {
$s('.top_btn').fadeIn(300);
}
else {
$s('.top_btn').fadeOut(300);
}
});
$s('.top_btn a').click(function(){
$s('html, body').animate({scrollTop:0}, 500 );
return false;
});
// -- BOX CLOSE BUTTON --
$s(".box").each(function(){
$s(this).append('');
$s(this).find('.hide_box').click(function(){
$s(this).parent().hide();
});
});
// -- SOCIAL ICONS FADE --
$s('ul.social32 li a, ul.social16 li a').hover(function(){
$s(this).stop().animate({opacity: "0.8"}, 100 );
}, function() {
$s(this).stop().animate({opacity: "1"}, 100 );
});
$s('.cycle_nav').css({opacity:"0"});
$s('.show_desc, .slide_date').hide();
}); // END DOCUMENT.READY
// -- WINDOW.LOAD
$s(window).load( function() {
$s('.show_desc, .slide_date').fadeIn();
$s('.slider, .slider_medium, .slider_large').hover(function(){
$s(this).find('.cycle_nav').stop().animate({opacity: "1"}, 200 );
}, function() {
$s(this).find('.cycle_nav').stop().animate({opacity: "0"}, 200 );
});
});
// -- END WINDOW.LOAD --