$(document).ready( function() {

	$("label").inFieldLabels();

	$('.menu_top .up').tinyTips('title');
	$('.menu_top .up5').tinyTips2('title');

}); 

      $(function(){
	      $('a.newWindow').click(function(){
    	  window.open(this.href);
     	 return false;
      	});
      });

     var paircount = 0;
	  function initImage(obj)
      {
        obj.onload = null;
        	var $newthis = $(obj);
        if ($.browser.msie)
        {
          $newthis = $newthis.desaturateImgFix();
        }
        $newthis.addClass("pair_" + ++paircount);
    	    var $cloned = $newthis.clone().attr('id', '');
        	$cloned.get(0).onload = null;
       		$cloned.insertAfter($newthis).addClass("color").hide();
        	$newthis = $newthis.desaturate();
        	$newthis.bind("mouseenter mouseleave", desevent);
        	$cloned.bind("mouseenter mouseleave", desevent);
      };

function desevent(event) {
        var classString = new String($(this).attr('class'));
        var pair = classString.match(/pair_\d+/);
        	if (event.type == 'mouseenter')
          		$("."+pair).filter(".color").stop(true, true).fadeIn(500);
        if (event.type == 'mouseleave')
          	$("."+pair).filter(".color").stop(true, true).fadeOut(500);
      }


(function(a){a.fn.tinyTips=function(b){var c='<div class="tinyTip"><div class="content"></div></div>';var d=300;var e;var f;a(this).hover(function(){a("body").append(c);e=a("div.tinyTip");e.hide();if(b==="title"){var g=a(this).attr("title")}else{if(b!=="title"){var g=b}}a(".tinyTip .content").html(g);f=a(this).attr("title");a(this).attr("title","");var j=-60;var h=0-(a(this).width()/100000);var k=a(this).offset();var i=k;i.top=k.top-j;i.left=k.left-h;e.css("position","absolute").css("z-index","1000");e.css(i).animate({ opacity: 'show', top: '175' }, '1000')},function(){a(this).attr("title",f);a("div.tinyTip").fadeOut(d,function(){a(this).remove()})})}})(jQuery);

(function(a){a.fn.tinyTips2=function(b){var c='<div class="tinyTip"><div class="content"></div></div>';var d=300;var e;var f;a(this).hover(function(){a("body").append(c);e=a("div.tinyTip");e.hide();if(b==="title"){var g=a(this).attr("title")}else{if(b!=="title"){var g=b}}a(".tinyTip .content").html(g);f=a(this).attr("title");a(this).attr("title","");var j=-60;var h=332-(a(this).width()/1);var k=a(this).offset();var i=k;i.top=k.top-j;i.left=k.left-h;e.css("position","absolute").css("z-index","1000");e.css(i).animate({ opacity: 'show', top: '175' }, '1000')},function(){a(this).attr("title",f);a("div.tinyTip").fadeOut(d,function(){a(this).remove()})})}})(jQuery);
