// JavaScript Document
	

$(document).ready(function(){
						   
	// STOP IE6 FLICKER
	//if ($.browser.msie && $.browser.version.substr(0,1)<7) { 
	//	document.execCommand('BackgroundImageCache', false, true);
		
	//};
	
		

	$('input[title!=""]').hint();

	
 	$('.TopRightTop li a:first').addClass('noborder');
	
	$('.FooterRight li a:first').addClass('noborder');
	

	
	

 
 	//
	
	$('.Page a').css( {backgroundPosition: "0 -35px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 0px)"}, {duration:300})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -35px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 -35px"})
		}})
	});
 	
 	
	//
	
	
	
	//
	
});


// JavaScript Document

/**
* @author Remy Sharp
* @url http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
*/

(function ($) {
	$.fn.hint = function (blurClass) {	
	
	
		if (!blurClass) { 
			blurClass = 'blur';
		}			
		return this.each(function () {	
								   		   
			// get jQuery version of 'this'
			var $input = $(this),				
			// capture the rest of the variable to allow for reuse
			title = $input.attr('title'),		
			$form = $(this.form),
			$win = $(window);
			//console.log('title=' + title);
			$(this).val('');
			function remove() {
				if( $(this).val() == title) {
					$(this).val('');
				};				
				$input.addClass(blurClass);				
			}	
			
			// only apply logic if the element has the attribute
			if (title) {
			
				// on blur, set value to title attr if text is blank
				$input.blur(function () {
					$input.removeClass(blurClass);					
					if( $(this).val() == '') {						
						$(this).val(title);					
					}					
				}).focus(remove).blur(); // now change all inputs to title			
			};
		});
	};
	
})(jQuery);




/**
 * @author Alexander Farkas
 * v. 1.02
 */
(function($) {
	$.extend($.fx.step,{
	    backgroundPosition: function(fx) {
            if (fx.state === 0 && typeof fx.end == 'string') {
                var start = $.curCSS(fx.elem,'backgroundPosition');
                start = toArray(start);
                fx.start = [start[0],start[2]];
                var end = toArray(fx.end);
                fx.end = [end[0],end[2]];
                fx.unit = [end[1],end[3]];
			}
            var nowPosX = [];
            nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0];
            nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1];
            fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1];

           function toArray(strg){
               strg = strg.replace(/left|top/g,'0px');
               strg = strg.replace(/right|bottom/g,'100%');
               strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");
               var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);
               return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];
           }
        }
	});
})(jQuery);

