
$(document).ready(function(){$("#datepickerInput").datepicker({changeMonth:true,changeYear:true});$("#datepicker").click(function(){$("#datepickerInput").datepicker("show");})
$("#datepickerInput").change(function(){var s=$("#datepickerInput").val().split("/",3);var date=s[2].toString()+"-"+s[0].toString()+"-"+s[1].toString();window.location=window.location.pathname+"?dtmDate="+date;})})
$.datepicker.regional['el']={closeText:'Κλείσιμο',prevText:'Προηγούμενος',nextText:'Επόμενος',currentText:'Τρέχων Μήνας',monthNames:['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος','Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],monthNamesShort:['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν','Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],dayNames:['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],dayNamesShort:['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],dayNamesMin:['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],weekHeader:'Εβδ',firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:''};$.datepicker.setDefaults($.datepicker.regional['el']);function initializeNewspaperNavSlider(o){if(o.noOfItems>o.noOfItemsPerScreen){var goLeft=0;if(o.selectedItem<=o.noOfItemsPerScreen){goLeft=0;enableBtn("next",o);}else if((o.noOfItems-o.selectedItem)>=o.noOfItemsPerScreen){var noOfPreviousItems=o.selectedItem-1;goLeft=noOfPreviousItems*o.itemWidth;enableBtn("prev",o);enableBtn("next",o);}else{goLeft=((o.noOfItems-o.noOfItemsPerScreen)*o.itemWidth)+54;enableBtn("prev",o);}
o.ul.css({'left':'-'+goLeft+'px'});}
$("#newspaperSlider ul li#ns_"+o.selectedItem+" img ").css("border-color","#000");}
function slideTo(where,o){var firstItemInList=returnItemPositionInListN(o.ul.position().left,o.itemWidth);switch(where)
{case'prev':var noOfPreviousItems=firstItemInList-1;var goLeft=0;if(noOfPreviousItems>=o.noOfItemsPerScreen){goLeft=o.noOfItemsPerScreen*o.itemWidth;}
else{goLeft=noOfPreviousItems*o.itemWidth;}
goLeft=(o.ul.position().left)+goLeft;break;case'next':var noOfNextItems=o.noOfItems-firstItemInList;var goRight=0;if(noOfNextItems>=(o.noOfItemsPerScreen*2)){goRight=o.noOfItemsPerScreen*o.itemWidth;}
else{var s=(noOfNextItems+1)-o.noOfItemsPerScreen;goRight=s*o.itemWidth;}
goRight=(o.ul.position().left)-goRight;goLeft=goRight-54;break;}
if(goLeft==0){disableBtn("prev",o);}else{enableBtn("prev",o)}
var afterSlideFirstItemPosition=returnItemPositionInListN(goLeft,o.itemWidth);if((o.noOfItems-afterSlideFirstItemPosition)>=o.noOfItemsPerScreen){enableBtn("next",o);}else{disableBtn("next",o);}
$('#newspaperSlider ul:not(:animated)').animate({'left':goLeft},500,function(){});}
function enableBtn(which,o){$('#newspaperSliderCntr div.'+which).unbind('click');$('#newspaperSliderCntr div.'+which).click(function(){slideTo(''+which+'',o);});$('#newspaperSliderCntr div.'+which).css("cursor","pointer");}
function disableBtn(which,o){$('#newspaperSliderCntr div.'+which).unbind('click');$('#newspaperSliderCntr div.'+which).css("cursor","default");}
function returnItemPositionInListN(pos,itemWidth){return(Math.abs(pos)+itemWidth)/itemWidth;}
function returnLiMarginRight(){return parseInt($('.photostorySliderWrapper .slider ul li').css('margin-right').replace("px",""));}
function initializePhotostorySlider(){var o={cntrWidth:$('.photostorySliderWrapper .slider').outerWidth(),itemWidth:$('.photostorySliderWrapper .slider ul li:last').outerWidth()+returnLiMarginRight(),noOfItems:$('.photostorySliderWrapper .slider ul > *').size(),noOfItemsPerScreen:$('.photostorySliderWrapper .slider').outerWidth()/($('.photostorySliderWrapper .slider ul li:last').outerWidth()+returnLiMarginRight()),ul:$('.photostorySliderWrapper .slider ul')};if(o.noOfItems>o.noOfItemsPerScreen){$('div.nav span.next a').click(function(){slideTo("next",o);});$('div.nav span.prev a').click(function(){slideTo("prev",o);});enableButton("next",o);disableButton("prev",o);}else{disableButton("prev",o);disableButton("next",o);}}
$(window).load(function(){if($('.photostorySliderWrapper .slider').length>0){initializePhotostorySlider();}});$(document).ready(function(){$(".slider ul li").click(function(){var thisId="caption_"+$(this).attr("id").substring(15);var thisCaption=$("#"+thisId).html();$("#gallery-caption span").html(thisCaption);});$("a#prev-img").click(function(){goToPhoto("prev");});$("a#next-img").click(function(){goToPhoto("next");});$("a#photo-info").click(function(){var pos=parseInt($('div#gallery-controls').css('bottom').replace("px",""));if(pos<50){$('div#gallery-controls').animate({"bottom":"+=50px","height":"+=50px"},"slow");$('span#captionArr').html("Κρύψε Περιγραφή ↓");}else{$('div#gallery-controls').animate({"bottom":"-=50px","height":"-=50px"},"slow");$('span#captionArr').html("Δες Περιγραφή ↑");}});});function goToPhoto(where){var array=$("div.slider ul > li");var liIdValue="";$.each(array,function(index,value){liIdValue=$(value).attr("id").replace("photoStoryItem_","");array[index]=parseInt(liIdValue);});var id=$('#iframe').contents().find('#imgHiddenId').html();var imgVersion=$('#iframe').contents().find('#imgVersion').html();var iframePath=publicationUrl+"template/widgets/photostoryContent/view/helpers/imageFrame.jsp?id=";id=parseInt(id);var pos=$.inArray(id,array);var nextPhotoId="";if(where=="next"){nextPhotoId=array[pos+1];if(nextPhotoId==null){nextPhotoId=array[0];}}else{nextPhotoId=array[pos-1];if(nextPhotoId==null){nextPhotoId=array[array.size()-1];}}
iframePath=iframePath+nextPhotoId+"&imgversion="+imgVersion;$('#iframe').attr("src",iframePath);$('#gallery-caption span').html($('#caption_'+nextPhotoId).html());}
function slide(where,o){var firstItemInList=returnItemPositionInListN(returnUlPosition(o.ul),o.itemWidth);switch(where)
{case'prev':var noOfPreviousItems=firstItemInList-1;var goLeft=0;if(noOfPreviousItems>=o.noOfItemsPerScreen){goLeft=o.noOfItemsPerScreen*o.itemWidth;}
else{goLeft=noOfPreviousItems*o.itemWidth;}
goLeft=(returnUlPosition(o.ul))+goLeft;break;case'next':var noOfNextItems=o.noOfItems-firstItemInList;var goRight=0;if(noOfNextItems>=(o.noOfItemsPerScreen*2)){goRight=o.noOfItemsPerScreen*o.itemWidth;}
else{var s=(noOfNextItems+1)-o.noOfItemsPerScreen;goRight=s*o.itemWidth;}
goRight=(returnUlPosition(o.ul))-goRight;goLeft=goRight;break;}
if(goLeft==0){disableButton("prev",o);}else{enableButton("prev",o)}
var afterSlideFirstItemPosition=returnItemPositionInListN(goLeft,o.itemWidth);if((o.noOfItems-afterSlideFirstItemPosition)>=o.noOfItemsPerScreen){enableButton("next",o);}else{disableButton("next",o);}
$('.photostorySliderWrapper .slider ul:not(:animated)').animate({'left':goLeft},500);}
function enableButton(which,o){$('.photostorySliderWrapper .'+which).unbind('click');$('.photostorySliderWrapper .'+which).click(function(){slide(''+which+'',o);});$('.photostorySliderWrapper .'+which).css("cursor","pointer");}
function disableButton(which,o){$('.photostorySliderWrapper .'+which).unbind('click');$('.photostorySliderWrapper .'+which).css("cursor","default");}
function returnItemPositionInListN(pos,itemWidth){return(Math.abs(pos)+itemWidth)/itemWidth;}
function returnUlPosition(ul){return parseInt(ul.css('left').replace("px",""));}
$(document).ready(function(){var cfhtml=$("<div></div>").load("/template/framework/generic/contactForm.jsp");var $contactForm=$("<div id='dialog-contact-form'></div>").html(cfhtml).dialog({autoOpen:false,title:'Επικοινωνία',height:480,width:350,resizable:false,closeOnEscape:true,modal:true,buttons:{'Αποστολή':function(){$('#contact-form').submit();},'Καθαρισμός':function(){$('#contact-form')[0].reset();}},close:function(){$('#contact-form')[0].reset();}});$('#contactAnchor').click(function(){$contactForm.dialog('open');});$('#advertiseAnchor').click(function(){$contactForm.dialog('open');$('#contact-form select option:selected').removeAttr('selected');$('#contact-form select  option[value=Advertise]').attr('selected','selected');});})
function dialogContactClose(){$('#dialog-contact-form').dialog("close");}
$(document).ready(function(){});$(function(){var noOfItems=parseInt($(".agenta-content-wrapper").attr("title"));var height=noOfItems*($(".agenta-scrollview-wrapper .agenta-item").height()+15);if(noOfItems>3){height=252;}else{if(height==0){height=20;}
$('.agenta-arrow-up').hide();$('.agenta-arrow-dn').hide();}
$(".agenta-content-wrapper").css("height",height+"px");$(".scrollable").css("height",height+"px");$(".scrollable").scrollable({vertical:true,mousewheel:true,next:".agenta-arrow-dn",prev:".agenta-arrow-up"});});
