$(function()
{
	$("#showcase").scrollable({ 
	    size: 3,
	    prevPage: "#previous_project_btn",
	    nextPage: "#next_project_btn",
	    items: "#projects",
	    loop: true,
	    onBeforeSeek: function(){
            $("#next_project_btn").removeClass("zindex1");
            $("#previous_project_btn").removeClass("zindex1");
		},
        onSeek: function(){
            $("#next_project_btn").addClass("zindex1");
            $("#previous_project_btn").addClass("zindex1");
        }
	})/*.circular()*/;
    
    /*
    var scrollable_api = $("#showcase").scrollable({api: true});
    scrollable_api.onBeforeSeek(function() {
        $("div.panel").attr("style", "");
        var visible = this.getVisibleItems();
        $(visible[0]).attr("style", "margin-left: 25px;");
        $(visible[1]).attr("style", "");
        $(visible[2]).attr("style", "margin-right: 25px;");
    }); 
    scrollable_api.onSeek(function() {
        var visible = this.getVisibleItems();
        $(visible[0]).attr("style", "margin-left: 25px;");
        $(visible[1]).attr("style", "");
        $(visible[2]).attr("style", "margin-right: 25px;");
    }); 
    */
    $(".panelAction").mouseover(function(){
        $(this).animate({opacity: 1}, 400);
    });
    $(".panelAction").mouseout(function(){
        $(this).animate({opacity: 0}, 400);
    });
    
    $.nyroModalSettings({
    	endShowContent: function (elts, settings, callback) { 
    		var imgurl = $("#nyroModalImg").attr("src");
    		img = document.getElementById("nyroModalImg");
    		width = Math.floor((img.clientWidth)/2);
    		var params = $("#nyroModalImg").attr("style");
    		style = "border:1px solid #CEA161; position: absolute; left:0; background: url('"+imgurl+"'); "+params+";";
    		$("<span><span style='background: url(tl_files/lape/images/overlay.gif); width:"+img.clientWidth+"px; height:"+img.clientHeight+"px; display:block;' ><span style='position:absolute; width:"+img.clientWidth+"px; height:"+img.clientHeight+"px; display:block; background: url(tl_files/lape/images/watermark.png) 50% 50% no-repeat;'></span></span></span>").attr("style", style).insertAfter($("#nyroModalImg"));
    		$("#nyroModalImg").remove();
    		
    	}
    });
    

    
});

