jQuery(document).ready(function() {		
	if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) {
		// IE 6 has problem with supersubs plugin so we don't use it here...
		$j('ul.topnav').superfish({  		// initialize superfish
				delay:       400,			// one second delay on mouseout 
				animation: {				// fade-in and slide-down animation 
					height:	'show'
				},
				speed:		275
			});
	} else {
		// all other browsers, include supersubs plugin.
		$j('ul.topnav').supersubs({ 
	            minWidth:    12,	// minimum width of sub-menus in em units 
	            maxWidth:    27,	// maximum width of sub-menus in em units 
	            extraWidth:  0		// extra width for slight rounding differences in fonts 
	        }).superfish({  		// initialize superfish
	            delay:       400,	// one second delay on mouseout 
	            animation: {		// fade-in and slide-down animation 
					height:	'show'
				},
	            speed:		275
	        });
	}	
	
	// FancyBox init	
  $j("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});

	$j(".pic_bg").hover( function () {
		if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) <= 8) {
			$j(this).find('a').stop(false, true).toggleClass('imgHover');
		} else {
			$j(this).find('a').stop(false, true).toggleClass('imgHover', 200);
		}
	});		
	
	$j("label.overlabel").overlabel();
	
	// Login
	$j(".wp-logform").hover(
    function () {
 	   if (!$j(this).hasClass('current'))
 	    {
 	      $j(this).addClass('current'); 
 	      $j(this).children("#login-form").show();
 	    }
 	  }, 
 	  function () {
 	     $j(this).removeClass('current');
 	     $j(this).children("#login-form").hide();
    }); 
    
});


function cufonStart() {Cufon.replace('.fancy_title > div');}
