// JavaScript Document
jQuery(document).ready(function($) {
jQuery('#cycle').cycle({
fx: 'fade' ,
startingSlide: 0,
pause: 1 ,
pager: '#nav1',
pagerAnchorBuilder: function(idx, slide) {
return ' ';
} ,
speed: 1000,
timeout: 0
});
$('.mag_icon').click(function(){
$('.mag_icon').removeClass("mag_icon_selected");
$(this).addClass("mag_icon_selected");
ajax_url = $(this).attr("href")+"&mag_layout=0&sid="+Math.random();
$('#magazine-select').block({ message:null , overlayCSS: { backgroundColor: '#f6f6f6' , opacity:0.6} });
if(jQuery('#cycle').length > 0 ) {
jQuery('#cycle').cycle('stop');
jQuery('#cycle').fadeOut(100);
}
$("#magazine-content").animate({marginLeft:"-810px"},"slow",function() {
$('#magazine-content-con').block({ message: "
loading...
" , overlayCSS: { backgroundColor: '#f6f6f6' , opacity:0}, css: { border:'none', top: "88px" , backgroundColor: "#f6f6f6"}});
jQuery("#magazine-content").hide();
$.ajax({
type: "POST",
url: ajax_url,
success: afterMagContentLoaded
});
});
return false;
});
});
function afterMagContentLoaded(resTxt) {
jQuery('#magazine-content-con').unblock();
jQuery('#magazine-select').unblock();
jQuery("#magazine-content").css({"margin-left":"810px"}).show();
jQuery('#cycle').fadeIn(100);
jQuery("#magazine-content").html(resTxt);
if(jQuery('#cycle').length > 0 ) {
jQuery('#cycle').cycle({
fx: 'fade' ,
startingSlide: 0,
pause: 1 ,
pager: '#nav1',
pagerAnchorBuilder: function(idx, slide) {
return ' ';
} ,
speed: 1000,
timeout: 0
});
}//if
jQuery("#magazine-content").animate({marginLeft:"0" },"slow");
jQuery("#page-content-con").css({"overflow" : "auto"}).css({"overflow" : "hidden"});
}