<!-- hide script from old browsers

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}


function loadOnStart(){
	$('#usr_email, #usr_pass').each(function() {
	    var default_value = this.value;
	    $(this).focus(function() {
	        if(this.value == default_value) {
	            this.value = '';
	        }
	    });
	    $(this).blur(function() {
	        if(this.value == '') {
	            this.value = default_value;
	        }
	    });
	});
	$('.fullarticle').slideUp();
	$(".articleMore").click(function(event){
		var currentId = $(this).attr('id');
		$(".fullarticle").slideUp("slow");
		$("#full"+currentId).slideDown("slow");
		// Stop the link click from doing its normal thing
		event.preventDefault();
	});
	$(".articleToggle").click(function(event){
		var currentId = $(this).attr('id');
		$("#full"+currentId).toggle("slow");
		// Stop the link click from doing its normal thing
		event.preventDefault();
	});
	$('.dateTimeField').datetimepicker({
		dateFormat: 'dd.mm.yy',
		showMinute: false,
		stepHour: 1,
		hourMin:8,
		hourMax:22
	});
}

window.onload = function() {
	loadOnStart();
	externalLinks();
}

$(document).ready(function(){
	$('#myGallery').galleryView({
		filmstrip_position: 'right',
		panel_scale: 'nocrop',
		panel_width: 650,
		panel_height: 450,
		show_panel_nav: false,
		frame_width: 75,
		frame_height: 75,
		frame_gap: 6,
		pause_on_hover: true
	});
    $('#slides').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		pause: 1,
		prev: '#prev',
		next: '#next'
	});
});

// end hiding script from old browsers -->

