$(document).ready(function() 
{
	$('a.download-popup').click(function()
	{
		var mylink=$(this).attr('href');
		window.open(mylink,'Download','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=280');
		return false;
	});
	// Spin logo
	$('.spinlogo a').hover(function()
	{
		$(this).parent('.spinlogo').find('span').slideToggle('slow');
	},function()
	{
		$(this).parent('.spinlogo').find('span').slideToggle();
	});
	
	
	// Lightbox
	$('.gal-thumb-item a').lightBox();
	
	
	//Fancybox
	jQuery(document).ready(function() {

	$(".check a").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/') + '&autoplay=1',
			'type'			: 'swf',
			'swf'			: {
			'wmode'			: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

		return false;
	});
});

	
	
	// External
	$('a[rel="external"]').live('click', function() {
		window.open( $(this).attr('href') );
        return false;
	});
	
	
	// Homepage carousel (slider)
	
    $(".slider").jMyCarousel({
		visible: '100%',  
        eltByElt: true,
		auto: true,
		speed:9000
    }); 
	
	/* marqueeInit({
					uniqueid: 'slides',
					style: {
						'padding': '0px',
						'background-color': '#FFF',
						'border:': '0px',
						'width': '1000px',
						'height': '137px',
						'text-decoration': 'none'
					},
					inc: 2, //speed - pixel increment for each iteration of this marquee's movement
					mouse: 'pause', //mouseover behavior ('pause' 'cursor driven' or false)
					moveatleast: 2,
					neutral: 150,
					savedirection: true
				}); */
	
	
});
