
$(document).ready(function() {    
	$('#Newsletter0FirstName').blur(function() {if ($(this).val() == "") $(this).prev().show();});
        $('#Newsletter0LastName').blur(function() {if ($(this).val() == "") $(this).prev().show();});
	$('#Newsletter0Email').blur(function () {if ($(this).val() == "") $(this).prev().show();});
	$('#form_subscribe').blur(function() { if ($(this).val() == "") $(this).prev().show();});	
	$('#Newsletter0FirstName').focus(function() {$(this).prev().fadeOut(75);});
        $('#Newsletter0LastName').focus(function() {$(this).prev().fadeOut(75);});
	$('#Newsletter0Email').focus(function() {$(this).prev().fadeOut(75);});      
        $('.formFirstName label').click(function() {$(this).fadeOut(75); $(this).next().focus();});
        $('.formLastName label').click(function() {$(this).fadeOut(75); $(this).next().focus();});
        $('.formEmail label').click(function() {$(this).fadeOut(75);$(this).next().focus();});
        $('ul.sf-menu').supersubs().superfish({hoverClass : 'sfHover'});
        $('#promote').carousel3D({autorotate: true,autorotatespeed: 4000,speed: 900,perspectiveZoom: 90,sideOffset: 140,topOffset: 20,secondaryOpacity: 1.0,emClass: 'promote'});
        $('input[type="submit"]').hover(function(){$(this).addClass('ui-state-hover').css('color','#333');},function() {$(this).removeClass('ui-state-hover').css('color','#fff');});
        $('#videothumbnails li').click(function() {
            var liId = $(this).attr('id');
            id = liId.replace('video-','');
            var currentVideo = $('#videoframe').attr('class').replace('current-video-','');
            var url = $(this).find('.url').text();
            
            $('#videoframe').removeClass('current-video-'+currentVideo);
            $('#videoframe').addClass('current-video-'+id);

            var playerDom = '<object style="height: 281px; width: 452px;"><param value="'+url+'" name="movie" /><param value="true" name="allowFullScreen" /><param value="always" name="allowScriptsAccess" /><embed height="281" width="452" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="'+url+'" /></object>';

            $('#container').html(playerDom);            
            $('#video-'+id).hide();
            $('#video-'+currentVideo).fadeIn(500);
        });

        if (jQuery().prettyPhoto)
        {
            $("a[rel^='prettyPhoto']").prettyPhoto();
        }

});



