
$( function(){
	
	/* remove NoJS warning */
	$("#noJSwarning").hide();
	
/*
    var h = $(window).height() - 20; 
    var w = $(window).width() - 100;
    
    $("#gallery_content").css( { "width" : (w - 65), "height" : h } ); // make the content 10px smaller, because of the padding
    
   	$("#gallery_container").css( { "left" : -( w - 55) } )
   							.width( w )
   							.height( h );
    
    $("#gallery_iframe").height( h-55 );
    
    $("div#motto a img").css( { 'opacity' : '0.7' } )
                .hover(function(){ $(this).css( { 'opacity' : '1.0' } );}, function(){ $(this).css( { 'opacity' : '0.7' } );});*/
    
    //remove the link for the current page in the subcategories menu            
	$("div#subcategories a:first").parent().prepend( "<b>"+$("div#subcategories a:first").text()+"</b>" ).end().remove();

	// prevent default link from changing the url
	$("li.menu_link a").click( function( evt ){ evt.preventDefault(); })
	

	$("li.menu_link").click( function( e ){
			
			e.preventDefault();
			window.location = $(this).children( "a" ).attr( "href" );			

			})
			.hover(function(){ 
				$(this).css( { 'cursor' : 'pointer' } )
				.animate( { "paddingLeft":"7px" },100)
				.addClass( "menu_link_hovered " )
				.children( "a:first" ).css({ "color" : "#EEE" });
				
	},function(){ 
				$(this)
				.animate( { "paddingLeft":"5px" },100)
				.removeClass( "menu_link_hovered " )
				.children( "a:first" ).css({ "color" : "#AAA" }); 
	});
		
	/*// modal popup for the gallery
	 
    $('div#gallery_button a').click(function(e) 
    {   
         e.preventDefault();
         
         if( parseInt( $("#gallery_container").css( "left" ) ) == -10 )
         {
         	HideGallery();
         }
         else
         {
         	ShowGallery( "http://gallery.diavach-bg.com" );
         }
       	
     });
      $('div#gallery_button img').hover( function(){
     	$(this).attr( "src", "include/imgs/gallery_button_hover.png" );
     }, function(){
     	$(this).attr( "src", "include/imgs/gallery_button.png" );
     });  
     
     $("div#gallery_header img" ).css( { "opacity" : 0.6 } ).hover( function(){ $(this).css( { "cursor" : "pointer", "opacity" : 1 } ); }, function(){ $(this).css( { "opacity" : 0.6 } )});
     $("div#gallery_header img#gal_bg_flag").click( function(){ ChangeGlLng( "bg" ); });
     $("div#gallery_header img#gal_en_flag").click( function(){ ChangeGlLng( "en" ); });       */  


	// pagination style
	$("div.single_button_normal").hover( function(){ $(this).addClass("single_button_hover");}, function(){ $(this).removeClass("single_button_hover"); });        

});
/*
function GetHeight()
{
	return $( "#gallery_container" ).height();
}

function GetWidth()
{
	return $("#gallery_container").width();
}

function ChangeGlLng( lng )
{
	$("#gallery_iframe").attr( { "src" : "http://gallery.diavach-bg.com/index.php?g2_language="+lng } );
}

function HideGallery()
{
    var w = GetWidth();
    
    $('div#gallery_button img').attr( "src", "include/imgs/gallery_button.png" ).unbind().hover( function(){
     	$(this).attr( "src", "include/imgs/gallery_button_hover.png" );
     }, function(){
     	$(this).attr( "src", "include/imgs/gallery_button.png" );
     });
    
    $("#gallery_container").animate( { "left" : 0 }, 200, function(){ $(this).animate( { "left" : -( w - 55) }, 1000, function(){  $("#gallery_iframe").attr( { "src" : "" } ); $("#container").animate( { "opacity" : 1 }, 250 );} ); } );
}

function ShowGallery( url )
{    
	$('div#gallery_button img').attr( "src", "include/imgs/gallery_button_hover.png" ).unbind().hover( function(){
     	$(this).attr( "src", "include/imgs/gallery_button.png" );
     }, function(){
     	$(this).attr( "src", "include/imgs/gallery_button_hover.png" );
     });

    $("#container").animate( { "opacity" : 0 }, 250, function(){ $("#gallery_container").animate( { "left" : 0 }, 1000, function(){ $(this).animate( { "left" : -10 }, 200, 
    
    	function()
    	{ 
    		$("#gallery_iframe").attr( { "src" : url } );
    	} ); } ); } );
}*/

