﻿/* Pouya Salimi special js coding */
/* ipooya.com - irsaweb.com */

jQuery(document).ready(function(){
    jQuery("#slider").easySlider({
				auto:           true,
				continuous:     true,
                numeric:        true,
                pause:			8000,
                speed: 		    1000,
    });

    jQuery('#lastest-works').loopedSlider({
			containerClick: false
    });
    jQuery('.login-top a').click(function() {
        jQuery('#login-form').slideToggle(500);
    });
    jQuery(".sample").hover(function() {
			jQuery(this).children('.sample-intro').slideDown(500);
    }, function() {
			jQuery(this).children('.sample-intro').slideUp(500);
    });
    $('#all-resume').hide();
    var $panels = $('#all-resume .scrollContainer > div');
    var $container = $('#all-resume .scrollContainer');
    var horizontal = false;
    if (horizontal) {
        $panels.css({
            'float' : 'left',
            'position' : 'relative'
        });
        $container.css('width', $panels[0].offsetWidth * $panels.length);
    }
    var $scroll = $('#all-resume .scroll').css('overflow', 'hidden');
    var offset = parseInt((horizontal ? $container.css('paddingTop') : $container.css('paddingLeft')) || 0) * -1;
    var scrollOptions = {
        target: $scroll, // the element that has the overflow
        // allow the scroll effect to run both directions
        axis: 'xy',
        offset: offset,
        // duration of the sliding effect
        duration: 500,
        // easing - can be used with the easing plugin: 
        // http://gsgd.co.uk/sandbox/jquery/easing/
        easing: 'swing'
    };
    if (window.location.hash) {
        $('#all-resume').show('normall');
    }
    $('#right-column p a').click(function(){
        $('#all-resume').show('normall');
    });
    $('#all-resume').serialScroll(scrollOptions);
    $.localScroll(scrollOptions);
    scrollOptions.duration = 1;
    $.localScroll.hash(scrollOptions); 
}); 


