jQuery.fn.styleSwitcher=function(){var bullet;$(this).click(function(){bullet=$(this);loadStyleSheet(this);return false;});function loadStyleSheet(obj){$('body').append('<div id="overlay" />');$('body').css({height:'100%'});$('#overlay').css({display:'none',position:'absolute',top:0,left:0,width:'100%',height:'100%',zIndex:1000,background:'black url(img/loading.gif) no-repeat center'}).fadeIn(500,function(){$.get(obj.href+'&js');$('body').removeClass("col0 col1 col2 col3 col4 col5 col6 col7 col8 col9");n=bullet.parent().attr("class");newClass='col'+n.charAt(n.length-1);$('body').addClass(newClass);return false;}).fadeOut(500,function(){});}};$(document).ready(function(){$('.draggable').draggable({containment:'parent'});$('ul.colors li a').styleSwitcher();var scroll=$(".scrollable , .scrollable-works").scrollable();$("body.news ul.img-nav li a").click(function(){var index=parseInt($(this).text())-1;$("ul.img-nav li").removeClass('selected');$(this).parent().addClass('selected');scroll.scrollable().seekTo(index);return false;});$("body.works ul.img-nav li a").click(function(){var index=parseInt($(this).text())-1;$("ul.img-nav li").removeClass('selected');$(this).parent().addClass('selected');scroll.scrollable().seekTo(index);return false;});});
