// ++++ IE6 PNG Fix
$(document).ready(function(){ 
    $(document).pngFix(); 
});

// ++++ Scrolling effects
$(function(){
	$('#pane').jScrollPane({animateTo:true, animateInterval:50, animateStep:5});
	$('#pane2').jScrollPane({animateTo:true, animateInterval:50, animateStep:5});
             
	$('a.scroll').bind('click', function(){
		$this = $(this);
		var destinationSelector = $(this).attr('rel');
		$('.scroll-pane').each(function(){
			this.scrollTo(destinationSelector);
		});
		return false;
	});
});

// ++++ Personnel Select
$(document).ready(function() {
	$('ul.personnel-select li').mouseenter(function(){
		$this = $(this);
		var $employee = $this.attr('rel');
		$('ul.personnel-select').addClass($employee);
	}).mouseleave(function(){
		$this = $(this);
		var $employee = $this.attr('rel');
		$('ul.personnel-select').removeClass($employee);
	});
});


// ++++ Image Gallery
$(document).ready(function() {
	$('dd.thumbs').each(function(index, element){$(element).attr("id", 'thumbs' + index);});
	$('.slideshow').each(function(index, element){$(element).attr("id", 'slideshow' + index);});
	$('.portfolio').each(function(i){
		var gallery = $('#thumbs'+i).galleriffic({imageContainerSel:'#slideshow'+ i});
	});
});

// ++++ Initialize Modal 
Shadowbox.init({
	height:			100,
	width:			100,
	overlayColor:	"#000",
	overlayOpacity:	.4
});

