var ie=false;

function initRollOverImages() {
  var image_cache = new Object();
  $("img.swap").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}

$(document).ready(initRollOverImages);

$(document).ready(function(){  
$("img.hover").fadeTo(0,1.0);  
$("img.hover").hover(function(){  
        $(this).fadeTo(400,0.85);  
    },  
    function(){  
        $(this).fadeTo(300,1.0);  
    });  
});  

$(document).ready(function(){  
$("img.hover2").fadeTo(0,1.0);  
$("img.hover2").hover(function(){  
        $(this).fadeTo(300,0.70);  
    },  
    function(){  
        $(this).fadeTo(300,1.0);  
    });  
});  

$(document).ready(function($) {
	$('#photoGallery .sliderContent').width(900);
	$('#photoGallery').removeClass("noscript");
	$('#photoGallery').addClass('slider');
	$('#photoGallery').mobilyslider({
		transition: 'fade',// transition: horizontal, vertical, fade
		autoplay: true, 
		autoplaySpeed: 5000, // time between transitions (miliseconds)
		pauseOnHover: true, // stop animation while hovering
		animationSpeed: 1000,
		arrows:false,
		bullets: true
	});

	if(ie !== false){

		if(ie <= 6){

			$('#photoGallery .sliderBullets').css({right:'5px',	bottom:'5px'});

		}

	}

});

$(function(){
     $("#re_top a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});
