$(function() {
			
	// main porfolio and archives thumb fade effect script   
$(".image").bind({mouseenter:function(){
$(this).children(".text").stop(true,true).fadeIn(325);}
,
mouseleave:function() {
$(this).children(".text").stop(true,true).fadeOut(325);}
});
   // menu fade effect script
$(".menunav").bind({mouseenter:function(){
$(this).children(".menuhover").stop(true,true).animate({opacity:1},275);}
,
mouseleave:function() {
$(this).children(".menuhover").stop(true,true).animate({opacity:0.5},300);}
});
	// about icons fade effect
$(".abouticon").bind({mouseenter:function(){
$(this).children(".icons").stop(true,true).animate({opacity:0.3},400);}
,
mouseleave:function() {
$(this).children(".icons").stop(true,true).animate({opacity:1},300);}
});

	// back to page top script
	
	
    $(window).scroll(function () {
		if ($(this).scrollTop() > 350) {
			$('#back-top').stop().animate({left:0},400);
		} else {
		    if(canScroll==0){
		    $('#back-top').stop().animate({left:'-124px'},400);
		    if($('#footer').length) {
               $('#footer').stop().animate({color:navcolor},400).removeClass('active');
            }
		    window.location.hash='start';
		    }
		}
	}).resize(function(){
	   setHeight()
	});

	$('#back-top').click(function () {
	    canScroll=0;
		$('body,html').animate({
			scrollTop: 0
		}, 800);
		$.history.load('start');
		return false;
   	});	
});
