$(document).ready(function(){
    $('.categories').accordion({ 
        active: false,
        header: ".catName",
        autoHeight:false,
        alwaysOpen: false,
        navigation: true
    });
	
    $(function() {
        $("#tabs").tabs();
    });
	
    if($.cookie('dashboardOpened')=='opened' || $.cookie('dashboardOpened')==null) {
        $(".dashBoard").slideToggle("slow"); $("#toggleDashboard").attr("src","http://"+Uhost+"/img/hide.png");
    }
    $('.toggleDashboard').click(
        function() {
            if($(".dashBoard").attr("offsetHeight")=="0") {
                $("#toggleDashboard").attr("src","http://"+Uhost+"/img/hide.png");
                $.cookie('dashboardOpened','opened', {
                    path: '/'
                });
            }
            else {
                $("#toggleDashboard").attr("src","http://"+Uhost+"/img/show.png");
                $.cookie('dashboardOpened','closed', {
                    path: '/'
                });
            }
            $(".dashBoard").slideToggle("slow");
        }
        );
    $(".actionsIMG").hover(
        function () {
		  
            $(this).attr("src","http://"+Uhost+"/img/"+$(this).attr("id")+"Hover.png");
        },
        function () {
            $(this).attr("src","http://"+Uhost+"/img/"+$(this).attr("id")+".png");
        }
        );
	
    $("#like").click(
        function() {
            get2(artID);
        }
        );

    $(".catName").click(
        function() {
			
            fthis=$(this).attr("id");
			
            if(!$("#Ul"+fthis).hasClass("ajaxed")) {
			
                $.post('http://'+Uhost+'/_ajax.php', {
                    cat: $("#span"+$(this).attr("id")).attr("innerHTML"),
                    act:"getAjSubCat"
                },
                function(data){
                    $("#Ul"+fthis).html(data);
                    $("#Ul"+fthis).addClass("ajaxed");
                }, "text");
            }
				
        });
	
	
});
var newwindow;
function popper(url)
{
    newwindow=window.open(url,'name','height=320,width=400,scrollbars=1');
    if (window.focus) {
        newwindow.focus()
        }
}