$(document).ready(function(){
	
	//if we are on the front page
	if ($("#scroll").length >0){
	
		// scroll link
	  $('#scroll').click(function(){
			$('#logo_big').stop().scrollTo( 'li:eq(1)' , 800, {axis:'x'});
	  	return false;
		});
		// go back
		$('#scroll_back').click(function(){
			$('#logo_big').stop().scrollTo('li:eq(0)' , 800, {axis:'x'} );	
	  	return false;
	  });
		// go back	
		$("a[title*='return']").click(function(){
			$('#logo_big').stop().scrollTo('li:eq(0)' , 800, {axis:'x'} );	
	  	return false;
	  });
	
	}	
	
	if ($(".nav").length >0){
		$('.nav').superfish({
			pathClass : 'current'
		});
	}

	//if we are on the grouping/artist page
	if ($("#scroll_to_collection_menu").length >0){
		// scrol to collection menu
		$('#scroll_to_collection_menu').click(function(){
			$.scrollTo( 'div.collection_menu_wrapper', 1000, {duration:2000, offset:-20});  
	  	return false;
	  });
	
	}
	

	// remove firstchild border top from news list
	if ($("div.news_list_item").length >0){
		$("div.news_list_item:first").css("border-top-width", "0");	
	}	

	// remove firstchild border top from grouping/show/id 
	if ($("div.collection_category").length >0){
		$("div.collection_category:first").css("border-top-width", "0");	
	}
	
	// remove firstchild border top from collection/archive
	if ($("div.archive_item").length >0){
		$("div.archive_item:first").css("border-top-width", "0");	
	}
	

	// artist page name view
	$("div.nameHolder").hover(
    function (){
			// change background
			$(this).addClass('pretty-hover');

    },
    function (){
			// change background
			$(this).removeClass('pretty-hover');	
			
    }
  );
	
	
});