/* --- EasyGoDesign JavaScript --- */
	$(document).ready(function(){
		/* --- Scrollbar Setup Begin --- */
			$('.make-dagger-bar').html('&#9618;');
			$('div.noJavascriptScrollbox').attr('id', 'scrollbox');
			$(window).load(function() {
				mCustomScrollbars();
			});
			function mCustomScrollbars(){
				$("#scrollbox").mCustomScrollbar("vertical",0,"easeOutCirc",1.05,"auto","yes","no",0); 
			}
			/* function to fix the -10000 pixel limit of jquery.animate */
			$.fx.prototype.cur = function(){
				if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
				  return this.elem[ this.prop ];
				}
				var r = parseFloat( jQuery.css( this.elem, this.prop ) );
				return typeof r == 'undefined' ? 0 : r;
			}
			/* function to load new content dynamically */
			function LoadNewContent(id,file){
				$("#"+id+" .customScrollBox .content").load(file,function(){
					mCustomScrollbars();
				});
			}
			
			// Mobile Touchscreen Scrolling
			jQuery.fn.oneFingerScroll = function() {
				var scrollStartPos = 0;
				$(this).bind('touchstart', function(event) {
					// jQuery clones events, but only with a limited number of properties for perf reasons. Need the original event to get 'touches'
					var e = event.originalEvent;
					scrollStartPos = $(this).scrollTop() + e.touches[0].pageY;
					e.preventDefault();
					$('.dragger_container').hide();
				});
				$(this).bind('touchmove', function(event) {
					var e = event.originalEvent;
					$(this).scrollTop(scrollStartPos - e.touches[0].pageY);
					e.preventDefault();
					$('.dragger_container').hide();
				});
				return this;
			};
			$('.customScrollBox').oneFingerScroll(); // Allow MobileTouchScrolling to this box
		/* --- Scrollbar Setup End --- */
		
		// Clean Smart SEO Box
		$('#smart-seo-box-egd').remove();
		
		// jQuery imageZoom
		$('a.imageZoom').fancyzoom({overlay:0.8, imgDir: document.location.protocol + '//' + document.domain + '/images/fancyzoom/'});
		
	});
