//path_http = 'http://192.168.100.25/socialclub/';
path_http = 'http://parissocialclub.com/';

Shadowbox.loadSkin('classic', path_http + '/media/js/shadowbox/skin');
Shadowbox.loadLanguage('fr', path_http + '/media/js/shadowbox/lang');
Shadowbox.loadPlayer(['html', 'iframe', 'img', 'swf'], path_http + '/media/js/shadowbox/player');		
window.onload = Shadowbox.init;

function open_sendto(url){
	Shadowbox.open({player:'iframe', content:url, height:440, width:440});
	return false;
}

$(function(){	

	// LINKS //
	$("a#link_share").click(function(){ 
		Shadowbox.open({player:'iframe', content:this.href, height:440, width:440});
		return false;
	});

	$("a.interview").click(function(){
		Shadowbox.open({player:'iframe', content:this.href, height:600, width:948});
		return false;
	});

	$("a.popup_guy").click(function(){ 
		Shadowbox.open({player:'iframe', content:this.href, height:680, width:500});
		return false;
	});

	$("a#mentions").click(function(){
		Shadowbox.open({player:'iframe', content:this.href, height:600, width:400});
		return false;
	});

	$('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

	$('a.link_radio').click( function() {
        var top  = (screen.height-hauteur)/2;   
		var left = (screen.width-largeur)/2; 
		var largeur = 520; 
		var hauteur = 280;/*186;*/
		window.open(path_http+'radio',"RADIO","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",scrollbars=no, resizable=no, directories=no, location=no, menubar=no, status=no, toolbar=no");
        return false;
    });

	$("a.coming_soon").click(function(){ 
		Shadowbox.open({player:'img', content:path_http+'media/img/coming_soon2.jpg'});
		return false;
	});

	/*$("a#boutique").click(function(){ 
		Shadowbox.open({player:'img', content:path_http+'media/img/wait.jpg'});
		return false;
	});*/

	$("a.video").click(function(){ 
		Shadowbox.open({player:'iframe', content:this.href, height:202, width:360}); /*height:200, width:364*/
		return false;
	});


	// HOME
	//var original_color  = $('a.item').css('background-color');
	//var random_colors   = ['#222222', '#444444', '#888888', '#cccccc', '#cc3300', '#ac76ce', '#6e9400'];
	var random_position = ['-68px', '-136px', '-204px', '-272px', '-340px'];

	$('a.item').hover(function() { 
		//var col = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
		//var bgcolor = Math.floor(Math.random() * random_colors.length);
		var position = Math.floor(Math.random() * random_position.length);

		$(this).animate({
			'color':'#000',
			//'backgroundColor': random_colors[bgcolor]
			'backgroundPosition': '0px ' + random_position[position]
		},100);
	},function() { 
		$(this).animate({
			'color':'#fff',
			//'backgroundColor': original_color
			'backgroundPosition': '0 -2000px'
		},100);
	});

})