

if(LANG == "ru") {
	Cufon.replace('.cufon1', { fontFamily: 'PF Handbook Pro', hover: true });
	Cufon.replace('.cufon3', { fontFamily: 'PF Handbook Pro', hover: true });	
} else {
	Cufon.replace('.cufon1', { fontFamily: 'Klavika Regular', hover: true });
	Cufon.replace('.cufon3', { fontFamily: 'Klavika Light', hover: true });
}

$(document).ready(function(){
	
	// zoom

	if(typeof hs != "undefined") {

		hs.graphicsDir = BASE_URL + 'js/highslide/highslide/graphics/';
		hs.align = 'center';
		hs.transitions = ['expand', 'crossfade'];
		hs.outlineType = 'rounded-white';
		hs.fadeInOut = true;
		hs.showCredits = false;
		hs.preserveContent = true;

		// Add the controlbar
		hs.addSlideshow({
			//slideshowGroup: 'group1',
			interval: 5000,
			repeat: false,
			useControls: true,
			fixedControls: 'fit',
			overlayOptions: {
				opacity: .75,
				position: 'bottom center',
				hideOnMouseOut: true
			}
		});


	}
	
	
    $('a.zoom').each(function() {
    	
		this.onclick = function() {
			
			return hs.expand(this);
	    };
    });	
    
    
    // sastavadalas
    
    sastavdalas();
    
  
    // css table-cell
    
    if ($.browser.msie && $.browser.version <= 7) {
      
    	$('div.prece div.left ul.side li a').css('display', 'block');
    	
    	$('div.prece div.left > ul.side > li a').each(function(){
    		
    		if( $(this).text().length < 20) {
    			
    			$(this).css('height', '25px');
    			$(this).css('padding-top', '7px');
    		}	
    	});
 	
	}

    // box-right
    
    var h = $('div#cont').height();
    $('div#cont div.box-right').height(h);
   
    
});




function sastavdalas() {
	
	var items = $('div.sastavdala div.item-title');
	var h = 0;
	
	items.each(function(i, it){
		
		var hn = $(it).height();
		
		if(hn > h)
			h = hn;
		
	});
	
	
	// izlīdzina pēc h
	
	items.each(function(i, it){
		
		$(it).height(h);
	});
	
}



