Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w0063afd/camshot/wp-content/themes/greyfoto_v2/functions.php:1) in /www/htdocs/w0063afd/camshot/wp-content/themes/greyfoto_v2/js/styleswitcher.jquery.php on line 3
// JavaScript Document
jQuery.fn.styleSwitcher = function(){
var $ = jQuery;
$(this).click(function(){
loadStyleSheet(this);
return false;
});
function loadStyleSheet(obj) {
$('body').append('');
$('body').css({height:'100%'});
$('#overlay')
.css({
display: 'none',
position: 'absolute',
top:0,
left: 0,
width: '100%',
height: '100%',
zIndex: 1000,
background: 'black url(http://camshot.northcoast.de/wp-content/themes/greyfoto_v2/images/loading.gif) no-repeat center'
})
.fadeIn(500,function(){
$.get( obj.href+'&js',function(data){
$('#stylesheet').attr('href','http://camshot.northcoast.de/wp-content/themes/greyfoto_v2/css/' + data + '.css');
cssDummy.check(function(){
$('#overlay').fadeOut(500,function(){
$(this).remove();
});
});
});
});
}
var cssDummy = {
init: function(){
$('').appendTo('body');
},
check: function(callback) {
if ($('#dummy-element').width()==2) callback();
else setTimeout(function(){cssDummy.check(callback)}, 200);
}
}
cssDummy.init();
}