var $j = jQuery.noConflict();

/**
 * Scroll the site
 *
 * @since 0.1
 */
function smoothScroll(){
	$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}, 1200);
				return false;
				}
			}
	});
}


//IE Overflow fix *PRE
function iePreOverflowFix() {
	$j.fn.fixOverflow = function () {
	if ($j.browser.msie) {
		return this.each(function () {
			if (this.scrollWidth > this.offsetWidth) {
				$j(this).css({ 'padding-bottom' : '20px', 'overflow-y' : 'hidden' });
			}
		});            
		} else {
			return this;
		}
	};
	//Usage
	$j('pre').fixOverflow().doOtherPlugin();

}

/**
 * Call all functions
 *
 * @since 0.2
 */
jQuery(document).ready(function(){
	smoothScroll();
	iePreOverflowFix();
});