function get_view_name(){
	var indexA = location.pathname.indexOf("admin")+6;
	var indexB = location.pathname.indexOf("/", indexA)
	var view = location.pathname.substring(indexA, indexB);	
	return view;
}

function get_home_url(){
	return jQuery("base").attr("href");
}

function get_url_to_ajax(){
	return get_home_url()+"ajax/";
}

function trim(str) { 
	a = str.replace(/^\s+/, ''); 
	return a.replace(/\s+$/, '');
}


function wyrownaj_bg() {

	var bg_height = $(".contentBg").height();
	$(".contentOpacity").height(bg_height+30);
	$(".content").height(bg_height-20);		

	
} 


$(document).ready(function(){

	$(function() {
		$('a[@rel*=lightbox]').lightBox(); 
		$('a.lightbox').lightBox();
		$('a.zoom').lightBox();  
	});


	/*
	 * wyrownujemy bg
	 *
	setTimeout(function() {
	 	wyrownaj_bg();
	 },1234);
	*/

});
