var $j = jQuery.noConflict();

$j(function(){
    // custom easing called "custom" 
    $j.easing.custom = function (x, t, b, c, d) { 
        var s = 1.70158;  
        if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 
        return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 
    }
    
    if($j('.pBoxContainer').length) {
        // alert($j('.pBoxContainer').height());
        $j('.potfolioContent').height($j('.pBoxContainer').height());
        var horizontal = $j(".mid").scrollable({size: 3, clickable: false, easing: 'custom', speed: 1000}).circular().navigator(".navi").autoscroll({steps: 3, interval: 11000});
    }
    
    if($j('select#timeline').length) var slider = $j('select#timeline').selectToUISlider().next();
    
    if($j('.services').length && $j('.about').length) {
        var ha = $j('.about').height();
        var hs = $j('.services').height();
        
        if(ha > hs) {
            $j('.services p:last').css({marginTop : (ha-hs)+'px'})
        } else {
            $j('.about p:last').css({marginTop : (hs-ha)+'px'})
        }
    }
    
});
