$('html').addClass('flickerFix');
jQuery.noConflict();
    // Use jQuery via jQuery(...)
    jQuery(document).ready(function(){
		jQuery('#Slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: '4500',
		speed: '2000'
		});
		
		var scrollHeight = window.innerHeight
		
		jQuery(window).resize(function() {
			  jQuery('#LeftColumnWrap').css('height', jQuery(window).height());
			  jQuery('#PageWrap').css('height', scrollHeight);

		});
			
		jQuery('#LeftColumnWrap').css('height', jQuery(window).height());
		jQuery('#PageWrap').css('height', scrollHeight);

		ul_nav = jQuery('#MainNav ul:first');
	 	ul_nav.attr('id','ul_nav');
		jQuery('#ul_nav').find('ul').hide();
		jQuery('#ul_nav').find('li.inpath').parent().show();
	 	jQuery('#ul_nav a.header').click(function(e){  
			e.preventDefault();	
			if (jQuery(this).hasClass('lvl1')) {
				jQuery('a.lvl1').removeClass('inpath');
			}
			if (jQuery(this).hasClass('lvl2')) {
				jQuery('a.lvl2').removeClass('inpath');
			}
				jQuery(this).addClass('inpath');
				jQuery(this).next("ul").slideToggle(500);
				jQuery(this).parent().siblings("li:has(ul)").find("ul").slideUp(500);
					
		}); 


if((navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/Android/i)))
	{
		jQuery('#PageWrap').css('width','575px').css('padding-left','405px');
		
		var myScroll;
		function loaded() {
			setTimeout(function () {
				myScroll = new iScroll('PageWrap', { hScrollbar: false, vScrollbar: false });
			}, 100);
		}
		window.addEventListener('load', loaded, false);
	}

});

