$(document).ready(function() {

	$(".fancyIframe").fancybox({
		'width'				: 600,
		'height'			: 440,
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

    $( ".datep" ).datepicker({
		changeMonth: true,
        changeYear: true
	});      

	
	$('p.panelType input').click(function() {
		if ($(this).attr('id') == 'panelType1') {
			$('.customerZone form').
			attr('action', 'http://login.newspoint.pl/').find('#login')
			.attr('name', 'username').end().find('#password')
			.attr('name', 'password');
		} else if ($(this).attr('id') == 'panelType2') {
			$('.customerZone form').attr('action', 'http://www.newspointmonitor.com/UserApp/loginProcess').find('#login')
			.attr('name', 'j_username').end().find('#password')
			.attr('name', 'j_password');
		}
	});
	
	if ($('#queryResults').size() > 0) $('p.print').hide();
	
	if ($('#cennikPartNewsPoint').size() > 0) {
		$('#cennikPartNewsPoint').prepend($('#btnTestujNewsPoint'));
		$('#cennikPartNewsPointUGC').prepend($('#btnTestujNewsPointUGC'));
	}
	
	if($(".introContent").size() > 0) {
		$(".intro-pager").cycle({
			fx: 'fade',
			timeout: 5000,
			pager: '.intro-pager-nav',
			cleartypeNoBg: true
		});
	}
	
    $('.inputr').click(function(){
    var aa= $(this).parent();
    //$('.info_h').css('display','none');

	if ($(this).attr('checked') != 'checked') {
		 aa.find('p').css('display','none');
	} else {
		 aa.find('p').css('display','block');		
	}

    });

	
});
