jQuery.noConflict();
(function(jQuery) { 
jQuery(function() {
	if(jQuery.browser.msie) {
		jQuery('#nav-top #menu > ul > li').mouseover(function() { jQuery(this).addClass('over') }).mouseout(function() { jQuery(this).removeClass('over')});
	}
	jQuery('#nav-top #menu > ul > li.active').mouseover(function() { jQuery(this).prepend('<img class="hoverable" src="http://lakeimage.kdwebserver.co.uk/fileadmin/templates/html/main/images/v.gif" />') }).mouseout(function() { jQuery(this).find('.hoverable').remove()});
	jQuery('.footerleft').find('p:eq(2)').css('display','block')
	jQuery('#contactform').find('input:submit').wrap('<div class="inputwrap"></div>')
	jQuery('#login-form').find('input:submit').wrap('<div class="inputwrap"></div>')
	jQuery('.watch a').append('<span>&nbsp;</span>')
	jQuery('#nav-top #menu > ul > li').find('i > a').append('<span>&nbsp;</span>')
	jQuery('#news li:last').addClass('last')
	/*jQuery('.submit, .inputwrap').hover(function(){jQuery(this).attr('id','over')},function(){jQuery(this).attr('id','')})*/
	jQuery('a[id*=c]').remove()
	jQuery('label[for*=forgot]').css('width','100px')
	jQuery('label[for*=forgot]').siblings('input:text').addClass('inputtext')
	
	jQuery('#solutions').find('li > a').click(function(){
		jQuery('#solutions .active').find('.solutions-content').slideUp(function(){jQuery(this).parent().removeClass('active')})
		if(!jQuery(this).parent().is('.active')){jQuery(this).parent().find('.solutions-content').slideDown(function(){ jQuery(this).parent().addClass('active')});}
		if(jQuery(this).parents('body').is('#home')){return false;}
	});
	jQuery('#home #highlight-menu ul > li').append('<span></span>')
	jQuery('#home #highlight-menu ul > li').find('span').hide();
	jQuery('#home #highlight-contents li').hide();
	jQuery('#home #highlight-menu ul > li').hoverIntent({ 
		over: function() { 
				var classnew=jQuery(this).attr('class');
				setTimeout("jQuery('#highlight-contents li').hide();",300);
				jQuery('#highlight-contents').wrap('<div></div>')
				jQuery('#highlight-contents').animate({right:'-2px'},300);
				jQuery('#highlight-contents').animate({right:'178px'},300);
				setTimeout("jQuery('#highlight-contents').find('li[class="+classnew+"]').show();",300);
				jQuery(this).find('span').show()
				
				
		},
		out: function() {
			jQuery(this).find('span').hide()
			
		} 
	});
	
	jQuery('#solutions li').click(function(){
		jQuery('#solutions li').removeClass('active');
		jQuery(this).addClass('active');
	});
	
	
	/*jQuery('#highlight-menu ul > li > a').hover(
	function(){
		var srcSL = jQuery(this).find('img').attr('src').replace(/.gif/, "_hover.gif");
		jQuery(this).find('img').attr('src',srcSL);}, 
	function(){var srcSL = jQuery(this).find('img').attr('src').replace(/_hover.gif/, ".gif");
		jQuery(this).find('img').attr('src',srcSL);}
	);*/
	
	jQuery('#highlight-menu ul > li > a').hoverIntent({ 
		over: function() {
			var relS = jQuery(this).attr('rel');
			var srcS = jQuery(this).find('img').attr('src');
			jQuery(this).find('img').attr('src',relS);
			jQuery(this).attr('rel',srcS);}, 
		out: function() {
			var relS2 = jQuery(this).attr('rel');
			var srcS2 = jQuery(this).find('img').attr('src');
			jQuery(this).find('img').attr('src',relS2);
			jQuery(this).attr('rel',srcS2);}
	});
	
	jQuery('#highilighted').hoverIntent(function(){},function(){ jQuery('#highlight-contents').animate({right:'-2px'},300);});
	
	jQuery('input:text').each(function(){
			jQuery(this).focus(function(){ jQuery(this).attr('value','')})
	});

	jQuery('#careers > li').maxsizer();
	
	jQuery('#newssingle #right').find('#gallery li a').addClass('nyroModal').attr('rel','gal')
	
	/*jQuery('#newssingle #right').find('#gallery li a').each(function(){
		var nS = jQuery(this).find('img').attr('src')
		jQuery(this).attr('href',nS)	
	});*/
	
	jQuery('#newssingle #right').find('#gallery li a').nyroModal()
	//jQuery('#gallery a').nyroModal();
	jQuery('.news-list-browse:empty').hide()
	
});

jQuery.fn.maxsizer=function() {	
	var arr=[];
	var maxim=0;
	jQuery(this).each(function(i){
		arr.push(jQuery(this).height());
		maxim=Math.max(maxim,arr[i]);
	});
	jQuery(this).height(maxim);
}

})(jQuery);