if ( $.browser.webkit) {
	$(window).load(function() {	
		// vertical scroll	
		$('.scroll-pane').jScrollPane({
			showArrows:false,
			scrollbarWidth:27,
			dragMaxHeight:77
		});					   
	})
} else{
	$(document).ready(function() {	
		// vertical scroll	
		$('.scroll-pane').jScrollPane({
			showArrows:false,
			scrollbarWidth:27,
			dragMaxHeight:77
		});					   
	})
}
$(document).ready(function() {		
	//images hover
	$('.hover_img .img_act').css({opacity:'0', visibility:'hidden'})
	$('.hover_img').hover(function(){
			$(this).find('.img_act').css({visibility:'visible'}).stop().animate({opacity:'1'},400, function(){$(this).css({opacity:'none'})})					   
		}, function(){
			$(this).find('.img_act').stop().animate({opacity:'0'},400, function(){$(this).css({visibility:'hidden'})})
		}
	)
	// portfolio
	$('.gallery1').roundabout({
			 shape: 'waterWheel',
        	 minScale: 0.5, // tiny!
        	 maxScale: 1, // tiny!
       	     btnNext: '#prev1',
             btnPrev: '#next1',
			 easing:'easeOutExpo',
			 clickToFocus:'true',
			 focusBearing:'1',
			 duration:800,
			 tilt:'0',
			 reflect:true
	});
	$('.gallery2').roundabout({
			 shape: 'waterWheel',
        	 minScale: 0.5, // tiny!
        	 maxScale: 1, // tiny!
       	     btnNext: '#prev2',
             btnPrev: '#next2',
			 easing:'easeOutExpo',
			 clickToFocus:'true',
			 focusBearing:'1',
			 duration:800,
			 tilt:'0',
			 reflect:true
	});
	$('.gallery3').roundabout({
			 shape: 'waterWheel',
        	 minScale: 0.5, // tiny!
        	 maxScale: 1, // tiny!
       	     btnNext: '#prev3',
             btnPrev: '#next3',
			 easing:'easeOutExpo',
			 clickToFocus:'true',
			 focusBearing:'1',
			 duration:800,
			 tilt:'0',
			 reflect:true
	});
	
	$('.portfolio').find('.img_act').css({opacity:'0', display:'none'});
	$('.portfolio li a').css({display:'none'});
	$('.portfolio li').hover(function(){
			if ($(this).hasClass('roundabout-in-focus')) {
				$(this).find('a').css({display:'block'});
				$(this).find('.img_act').css({display:'block'}).stop().animate({opacity:'1'}, 400, function(){$(this).css({opacity:'none'})})
			}
		}, function(){
			if ($(this).hasClass('roundabout-in-focus')) {
				$(this).find('a').css({display:'none'});
				$(this).find('.img_act').stop().animate({opacity:'0'}, 400, function(){$(this).css({display:'none'})})
			}
	})
	var h, new_h;
	setInterval(setNew,00)
	function setHeight(){
		new_h=$(window).height();
	}
	function setNew(){
		setHeight();
		if ((h!=new_h)) {
			h=new_h;
			$('.gallery .container_12').css({height:h});
			$('#icons li a').mouseenter().mouseleave();
		}
	}
	// menu
	$('ul#menu').superfish({
      delay:       600,
      animation:   { height:'show'},
      speed:       400,
      autoArrows:  false,
      dropShadows: false
    });
	// tool tip
	$('.normaltip').aToolTip({
    	toolTipClass: 'aToolTip'});
	
	
 });
