var templateImages=new Array();
templateImages[39]=new Array("mid_back.jpg","18784");
templateImages[47]=new Array("main_menu.jpg","4328");
templateImages[33]=new Array("bg.jpg","6328");
templateImages[43]=new Array("footer.jpg","7853");
templateImages[45]=new Array("header.jpg","36472");
templateImages[46]=new Array("logo.jpg","7350");
templateImages[42]=new Array("wrapper_back.jpg","501");
templateImages[48]=new Array("menu_border.jpg","1134");
templateImages[50]=new Array("hover.jpg","652");
templateImages[51]=new Array("ajax-loader.gif","1924");
templateImages[63]=new Array("5cents.jpg","39146");
templateImages[53]=new Array("diatrofi.jpg","15952");
templateImages[54]=new Array("questions.jpg","24863");
templateImages[64]=new Array("student_pack.jpg","35479");
templateImages[62]=new Array("cat-style-s.jpg","525");
templateImages[61]=new Array("cat-style.jpg","509");
templateImages[69]=new Array("bicofattica.jpg","17093");
templateImages[66]=new Array("lightbox-blank.gif","43");
templateImages[67]=new Array("lightbox-btn-close.gif","700");
templateImages[68]=new Array("lightbox-ico-loading.gif","2608");

var templateTotalImages=20;
var templateLoadedImages=0;
var templateTotalBytes=222244;
var templateTotalBytesLoaded=0;

jQuery(document).ready(function($){
	$("body").append('<div id="cViewloader"><div id="progressbar"><div id="progress"></div></div></div>');
	$("#cViewloader").css({"z-index":"10000000","position":"absolute","left":((document.body.clientWidth/2)-60)+"px","top":"200px","width":"120px"});
	$("#progressbar").reportprogress(0,templateTotalBytes);
	$('body').append("<div id='cloader'></div>");
	$('#cloader').css({'position':'absolute','top':'-3000px','width':'0px','height':'1px','overflow':'hidden'});
	$('#cloader').append("<img src='/images/themes/1/mid_back.jpg' onLoad='templateCheckLoad(39);' onError='alert(39);'/><img src='/images/themes/1/main_menu.jpg' onLoad='templateCheckLoad(47);' onError='alert(47);'/><img src='/images/themes/1/bg.jpg' onLoad='templateCheckLoad(33);' onError='alert(33);'/><img src='/images/themes/1/footer.jpg' onLoad='templateCheckLoad(43);' onError='alert(43);'/><img src='/images/themes/1/header.jpg' onLoad='templateCheckLoad(45);' onError='alert(45);'/><img src='/images/themes/1/logo.jpg' onLoad='templateCheckLoad(46);' onError='alert(46);'/><img src='/images/themes/1/wrapper_back.jpg' onLoad='templateCheckLoad(42);' onError='alert(42);'/><img src='/images/themes/1/menu_border.jpg' onLoad='templateCheckLoad(48);' onError='alert(48);'/><img src='/images/themes/1/hover.jpg' onLoad='templateCheckLoad(50);' onError='alert(50);'/><img src='/images/themes/1/ajax-loader.gif' onLoad='templateCheckLoad(51);' onError='alert(51);'/><img src='/images/themes/1/5cents.jpg' onLoad='templateCheckLoad(63);' onError='alert(63);'/><img src='/images/themes/1/diatrofi.jpg' onLoad='templateCheckLoad(53);' onError='alert(53);'/><img src='/images/themes/1/questions.jpg' onLoad='templateCheckLoad(54);' onError='alert(54);'/><img src='/images/themes/1/student_pack.jpg' onLoad='templateCheckLoad(64);' onError='alert(64);'/><img src='/images/themes/1/cat-style-s.jpg' onLoad='templateCheckLoad(62);' onError='alert(62);'/><img src='/images/themes/1/cat-style.jpg' onLoad='templateCheckLoad(61);' onError='alert(61);'/><img src='/images/themes/1/bicofattica.jpg' onLoad='templateCheckLoad(69);' onError='alert(69);'/><img src='/images/themes/1/lightbox-blank.gif' onLoad='templateCheckLoad(66);' onError='alert(66);'/><img src='/images/themes/1/lightbox-btn-close.gif' onLoad='templateCheckLoad(67);' onError='alert(67);'/><img src='/images/themes/1/lightbox-ico-loading.gif' onLoad='templateCheckLoad(68);' onError='alert(68);'/>");
});

function templateCheckLoad(id){
	templateLoadedImages+=1;
	templateTotalBytesLoaded+=parseInt(templateImages[id][1]);
	$("#progressbar").reportprogress(templateTotalBytesLoaded,templateTotalBytes);
}
var showStart=0;
(function($){$.fn.reportprogress = function(val,maxVal) {var max=100;if(maxVal){max=maxVal};var width=Math.round(val/max*100);$("#progress").animate({"width":width+"%"},100,function(){if((width==100) && showStart!=1){showStart=1;$("#cViewloader").fadeOut("slow",function(){show("arapina");});}});}})(jQuery);
function setAjax(){
$(".text a").attr("rel","noajax");
$(".page a").attr("rel","noajax");
$("#main_menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_container",href,"fadeIn|slow",$(this));
return false;
						});
}});
$("#top_menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_container",href,"fadeIn|slow",$(this));
return false;
						});
}});
$("#footer_menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_container",href,"fadeIn|slow",$(this));
return false;
						});
}});
$("#menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_ch",href,"fadeIn|slow",$(this));
return false;
						});
}});
$("#main_page a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_container",href,"fadeIn|slow",$(this));
return false;
						});
}});
$("#logo a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){var href=$(this).attr("href");
doAjax("#page_container",href,"fadeIn|slow",$(this));
return false;
						});
}});
}
