var $j = jQuery.noConflict();
$j(document).ready(function() {

$j('.tipsy a').tipsy({gravity: $j.fn.tipsy.autoNS});

// Prettyphoto init
$j("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',theme:'dark_rounded',slideshow:10000, autoplay_slideshow: false});

$j(".prettygallery img, .image img, .main-post-image img, ul.bottom-social li a").fadeTo("slow", 1); // This sets the opacity of the thumbs to fade down to 60% when the page loads

$j(".prettygallery img, .image img, .main-post-image img, ul.bottom-social li a").hover(function(){
	$j(this).fadeTo("slow", 0.6); // This should set the opacity to 100% on hover
},function(){
	$j(this).fadeTo("slow", 1); // This should set the opacity back to 60% on mouseout
});
		
//Hide (Collapse) the toggle containers on load
$j(".toggle_container").hide();

//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
$j("h2.trigger").click(function(){	$j(this).toggleClass("active").next().toggle(); });
$j('.box-content ul > li > ul').parent().addClass('has-sub-menu');

//Go to top
$j('a.go_top').click(function(){$j('html, body').animate({scrollTop: '0px'}, 300);return false;});

//No margin - featured box
$j(".featured-area-content .featured-box:nth-child(4n), .horizontal-widgets-holder .box:nth-child(4n)").addClass("last-featured");

//No background - menu
$j(".main-menu li:last-child, .tour-holder ul.simpleTabsNavigation li:last, ol.commentlist li:last-child").addClass("last");

<!-- Div clear after boxes (added on 10.02.2011) -->
$j('div.horizontal-widgets-holder .box:nth-child(4n)').after('<div class="clear"></div>');

$j(".box-content ul li a, .tour-holder ul.simpleTabsNavigation li a").hover(function(){
	$j(this).stop().animate({ paddingLeft: '9px'}, 300);	
}, function() {
	$j(this).stop().animate({ paddingLeft: '0px'}, 300);
});

$j(".box ul.social li a").hover(function(){
	$j(this).stop().animate({ paddingLeft: '60px'}, 300);	
}, function() {
	$j(this).stop().animate({ paddingLeft: '42px'}, 300);
});

});





