jQuery.noConflict();
(function($){
	$(function(){
		$('body').addClass('jsOn');
		
		$('#search .inputbox').textBoxInstructions("Enter Keyword or Name");
	
		if (!($.browser.msie && $.browser.version.substr(0,1) == "6"))
		{
			FLIR.init({path:baseUrl+'/libraries/facelift/'});
			$('#dummy'
			+',h2#mainTitle span'
			+',.t_home #pageContent .section .sectionHeading'
			+',.mod_read_more_blogs a'
			+',#zoneNav>ul>li.active>a span'
			+',#pageContent .mod_events .ssectionHeading'
			).each(function(){
				if ($(this).text().search(/[jpqgy]/) > 0) {
					$(this).addClass('hanging');
				}
				FLIR.replace(this, new FLIRStyle({mode: 'static',output:'png'}));
			});
			$('#dummy'
			+',#featuresOFF .articleHeading'
			+',#featuresOFF .articleContent h4'
			+',#extraNavs .mod_testimonials .sectionHeading'
			).each(function(){
				if ($(this).text().search(/[jpqgy]/) > 0) {
					$(this).addClass('hanging');
				}
				FLIR.replace(this, new FLIRStyle({mode: 'wrap',output:'png'}));
			});
		}
		$.ifixpng.pixel = baseUrl+'/templates/ped/images/pixel.gif';
		$('#header h1 a'
		+',#designCredit img'
		+',.formSuccess'
		+',.formError'
		+',#search'
		+',#search .inputWrapper'
		+',#search .inputWrapper .searchDesignSugar'
		+',#search .inputbox'
		+',#relatedInstitutions2 img'
		+',.t_data h2#mainTitle'
		+',#features .featuresSugar1'
		+',.mod_events .sectionHeading'
		+',.mod_events .sectionContent .clr'
		+',#features .section .sectionContent .clr'
		+',.mod_testimonials'
		+',.mod_testimonials .clr span'
		+',#extraNavs .extraNavsSugar1'
		+',#zoneNavs'
		+',#zoneNav>.clr>span'
		+',#secondarySiteNav>.sectionContent>.clr>span'
		+',.fixPng'
		).ifixpng();
		$('#pageContent .articleContent img'
		+',.t_data #pageContent .sboxgallery img'
		+',.t_data #pageContent .thumbnail img'
		+',.t_data #pageContent .productImage img'
		+',#pageContent .articleContent .video'
		)
			.filter(':not(.noFrame,.noframe,.frameNone,.framenone)')
			.imageFrame('sharp')
		;
		$('.siteMessage')
			.hide()
			.each(function(){
				//Put in an each so that it only scrolls if .siteError is present.
				window.scrollTo(0,0);
			})
			.slideDown(700)
			;
		$('#siteNav>ul>li').hover(
			function(){ 
				$(this).addClass('sfHover');
				$(this)
					.find('ul')
					.stop()
					.css({'top':'34px','opacity':'','display':'none'})
					.fadeIn(200)
					.queue(function(){
						if ($.browser.msie && $.browser.version.substr(0,1) == '7')
						{
							this.style.removeAttribute('filter');
						}
						$(this).dequeue();
					})
					;
			},
			function(){ 
				$(this).removeClass('sfHover');
				$(this)
					.find('ul')
					.stop()
					.fadeOut(200)
					;
			}
		);
	});
})(jQuery);