﻿$(function(){
	$("#news_list a.less").hide();
	$("#news_list dl dd").each(function(index) {
		$("p", this).slice(3).hide();
		if( $(this).height() <= 194){
			$("div",this).hide()
		}
	});	
	$("#news_list a.more").click(function() {
		$(this).hide();
		$(this).closest("dl").addClass("on");
		$('dl.on p').slideDown();
		$(this).next().show();
	});
	$("#news_list a.less").click(function() {
		$(this).hide();
		$('dl.on p').slice(3).slideUp();
		$(this).closest("dl").removeClass("on");
		$(this).prev().show();
	});
});
$(function () {
    var isiPad = navigator.userAgent.match(/iPad/i) != null,
    isiPhone = navigator.userAgent.match(/iPhone/i) != null,
    isiPod = navigator.userAgent.match(/iPod/i) != null;
    if (isiPod == false && isiPhone == false && isiPad == false) {
        var videoLink = "../video/flayr.swf?movie=allegro.flv&preview=../video/preview.jpg&name=Allegro"
                        + "&controls=show&color_controls=#4d4d4d&color_background=#d5dadf&color_slider=#e1e150&color_bar=#333333&color_buffer=#666666";
        $('#video_section #teaser').html("<object type='application/x-shockwave-flash' width='320' height='170' data='" + videoLink + "'>"
                                            + "<param name='movie' value='" + videoLink + "' />"
                                            //+ "<img src='../video/preview.jpg' alt='Allegro' width='320' height='170' />" 
                                        + "</object>");
    };
    $(".video").click(function () {
        $("#layer").show();
        $("#video_section #teaser").hide();
    });
    $("#layer").click(function () {
        $("#layer").hide();
        $("#video_section #teaser").show();
    });
    $("#video a").click(function () {
        $("#layer").hide();
        $("#video_section #teaser").show();
    });

}); 
$(function(){

	$("#drawer").click(function() {

      $('#slide').slideToggle("slow");
    });

});


