$(document).ready(function () {

	/////////////////////////// SCROLL PANE
	$(function()
	{
		$j=jQuery.noConflict();
		$('.scroll-pane').jScrollPane();
	});
	
	/////////////////////////// SMOOTHE IMAGE LOADING 
	// http://www.bennadel.com/blog/1007-jQuery-Attr-Function-Doesn-t-Work-With-IMAGE-complete.htm

	$("img").animate({ 
		opacity: 0
	}, 0 );
	
	$("img").load(function(evt){
		$(evt.target).animate({ 
			opacity: 1
		}, 200 );
	});

	if($("img")[0].complete){
		$("img").animate({ 
			opacity: 1
		}, 600 );
	}

	//attach directly to each image within each .imageSection 
    $('img').onImagesLoad({ 
        itemCallback: itemImagesLoaded,
        selectorCallback: selectorImagesLoaded
    }); 
    //itemImagesLoaded (the itemCallback) is invoked once for each individual image that loads 
    //i.e. the itemCallback will be invoked "$('.imageSection img').length" times 
    function itemImagesLoaded(domObject){ 
        $(domObject).animate({ 
			"opacity": "1"
		}, 400 );
    } 
	
});


