// no conflicts with other frameworks
var $j = jQuery.noConflict();

//
// window.onload function to setup various javascripts
//
// initialize yoxview
  
$j(document).ready(function(){
    $j("#photoalbum").yoxview(
        { 
            //[options - leave blank with curly brackets if none]
        },
        { 
            dataSource: 'flickr',
            dataSourceOptions: {
                user: '50801963%40N02',
                photoset_id: '72157624101593067/'
            }
        }
    );
});

// Smooth Scroll

$j(function(){

    $j('a[href*=#]').click(function() {
    
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
        
            var $target = $j(this.hash);
            
            $target = $target.length && $target || $j('[name=' + this.hash.slice(1) +']');
            
            if ($target.length) {
            
                var targetOffset = $target.offset().top;
                
                $j('html,body').animate({scrollTop: targetOffset}, 1000);
                    
                return false;
                
            }
            
        }
        
    });
    
});

