// JavaScript Document
Cufon.replace('h3', { fontFamily: 'GothamBold' }, {hover: true});

Cufon.replace('h4', { fontFamily: 'GothamBold' });//Letter Gothic Std
Cufon.replace('h1', { fontFamily: 'GothamBold' });
Cufon.replace('h2', { fontFamily: 'GothamBold' });
Cufon.replace('div.rightDiv span.post-link a', { fontFamily: 'GothamBold' });
Cufon.replace('Div.rightDiv.tl li a', { fontFamily: 'GothamBold' });
Cufon.replace('.title', { fontFamily: 'GothamBold' }, {hover: true});
Cufon.replace('.page_item', { fontFamily: 'GothamBold' }, {hover: true});
		
		
		
		
		

		
		
		
		

$(document).ready(function() {  
//alert(!$.browser.safari);
		/*if (!$.browser.safari) {	
		$("A.imgThumBox img").each(
			function(index){initImage($(this))
		});
		}*/

		$(".article").hover(function(){              
			$(this).addClass("bgWhite"); $(this).next('.vLineDiv').addClass("bgWhite");$(this).prev('.vLineDiv').addClass("bgWhite");

			 $(this).find('.js-desaturate-fixed').hide();
			$(this).find('.color').show(); 
			},    
			function(){            
			$(this).removeClass("bgWhite"); $(this).next('.vLineDiv').removeClass("bgWhite");$(this).prev('.vLineDiv').removeClass("bgWhite");
			$(this).find('.color').hide(); 
			$(this).find('.js-desaturate-fixed').show();         
			}); 
		$("DIV.rightDiv A.imgThumBox").hover(function(){
			//$(this).addClass("bgWhite"); 
			 $(this).find('.js-desaturate-fixed').hide();
			$(this).find('.color').show(); 
			},    
			function(){            
			//$(this).removeClass("bgWhite"); 
			$(this).find('.color').hide(); 
			$(this).find('.js-desaturate-fixed').show();         
			}); 
		 $(".category").hover(function(){
					var agif=$(this).find('.ctit').attr('src');
					
			 		$(this).addClass("bgBlack");
				 	$(this).find('.ctit').attr('src', agif.replace(".gif","-o.gif"));
					$(this).next('.vLineDiv').addClass("bgWhite");$(this).prev('.vLineDiv').addClass("bgWhite");
				 },
				 function()
				 {	var agif=$(this).find('.ctit').attr('src');
					$(this).removeClass("bgBlack"); 
					$(this).find('.ctit').attr('src', agif.replace("-o.gif",".gif"));
					$(this).next('.vLineDiv').removeClass("bgWhite");$(this).prev('.vLineDiv').removeClass("bgWhite");
				 });
		 $("#submit").hover(function(){
			
					var agif=$(this).attr('src');
					
			 	
				 	$(this).attr('src', agif.replace(".gif","-o.gif"));
				 },
				 function()
				 {	var agif=$(this).attr('src');
				 
					$(this).attr('src', agif.replace("-o.gif",".gif"));
				 });
		$("#searchtxt").click(function(){
							
							$(this).hide();
							$("#searchform").show();$("#s").focus();
						});
		
		if ($("#s").val()=='') $(this).val($(this).attr('rel'));
		$("#s").focus(function(){
							//alert('ge');
							//$(this).attr('rel',$(this).value);
							$(this).val('');
						});
		$("#s").blur(function(){
							//alert($(this).val());
							if($(this).val()==''){
								$(this).val($(this).attr('rel'));
								$(this).addClass('bl');
								//alert($(this).attr('rel'));
							}
							//if ($(this).val()=='') $(this).text($(this).attr('rel'));
						});
						
		$("DIV#divIng ul li:first-child,DIV#divMeth ul li:first-child").addClass('bw');
		$("DIV#divIng ul li:first-child:contains('--'),DIV#divMeth ul li:first-child:contains('--')").css("display", "none");
		});
		
      var paircount = 0;
function drawVline(objs){
	var hi;
	//alert(objs.parent().width());
	objs.each(
			
			function(index){
				hi=$(this).height();
				if ($(this).parent().width() > 1300){ 
					if (((index+1) %4)) $(this).after('<div class="vLineDiv"></div>');
				}
				else if ($(this).parent().width() > 975 && $(this).parent().width() < 1300 ){ 
					if (((index+1) %3)) $(this).after('<div class="vLineDiv"></div>'); 
				}
				else { 
				if (((index+1) %2)) $(this).after('<div class="vLineDiv"></div>');
				}
		});
	
	$('DIV.vLineDiv').height(hi);
}
      /* If you want to desaturate after page loaded - use onload event
       * of image.
      */
function initImage(obj)
      {
        obj.onload = null;
        var $newthis = $(obj);
      /*  if ($.browser.msie)
        {
          // You need this only if desaturate png with aplha channel
          $newthis = $newthis.desaturateImgFix();
        }*/
        // class for easy switch between color/gray version
      //  $newthis.addClass("pair_" + ++paircount);
       var $cloned = $newthis.clone().attr('id', '');
        // reset onload event on cloned object
       $cloned.get(0).onload = null;
        // add cloned after original image, we will switch between
        // original and cloned later
      $cloned.insertAfter($newthis).addClass("color").hide();
        // desaturate original
       $newthis = $newthis.desaturate();
	  
		

        // add events for switch between color/gray versions
     //   $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+/);
        // first I try was $("."+pair).toggle() but IE switching very strange...
       // $("."+pair).hide();
	//alert($(this).attr('class'));
        if (event.type == 'mouseenter')  {if ($(this).attr('class') != 'color' ) {$(this).hide(); $(this).siblings(".color").show();}}
         // $("."+pair).filter(".color").show();
        if (event.type == 'mouseleave')   {if ($(this).attr('class') == 'color' ) {$(this).hide();$(this).siblings(":not(.color)").show();}}
         // $("."+pair).filter(":not(.color)").show();
      }

