var switchcss = Math.floor(Math.random()*4+1); 
if (switchcss == 1)
file = "./home/css/pattern_1.css";
else if (switchcss == 2)
file = "./home/css/pattern_2.css";
else if (switchcss == 3)
file = "./home/css/pattern_3.css";
else if (switchcss == 4)
file = "./home/css/pattern_4.css";
else
file = "./home/css/content.css";
var css = '<';
css+='link rel="stylesheet" href=' + file + ' \/';
css+='>';
document.write(css);

$(document).ready(function() {
$("body#home div.wrap").hide();
$("body#home div.wrap").fadeIn(1000);

$('div.wrap h1').bgSwitcher({
bgImages : [
'home/img/pattern_1/bg_title.jpg',
'home/img/pattern_2/bg_title.jpg',
'home/img/pattern_3/bg_title.jpg',
'home/img/pattern_4/bg_title.jpg'
],
interval : 10000
});
$('div#content ul.menu li a').bgSwitcher({
bgImages : [
'home/img/pattern_1/menu_content.jpg',
'home/img/pattern_2/menu_content.jpg',
'home/img/pattern_3/menu_content.jpg',
'home/img/pattern_4/menu_content.jpg'
],
interval : 10000
});
});

$('div.wrap h1').bgSwitcher({}, function(elem, bg, clone){
elem.css('background-image', 'url('+ bg +')');
});
$('div#content ul.menu li a').bgSwitcher({}, function(elem, bg, clone){
elem.css('background-image', 'url('+ bg +')');
});
