Example #1
0
function xr_style_callback($args)
{
    $rockthemes_browser = rockthemes_get_browser_details();
    $is_ie9_and_lower = false;
    if (strpos($rockthemes_browser['name'], "Explorer") > -1) {
        if (intval($rockthemes_browser['version']) <= 9) {
            $is_ie9_and_lower = true;
        }
    }
    echo '<!--Rock Themes Style-->';
    echo '<style type="text/css" media="all">';
    $default_padding = xr_get_option('content_padding', '15px');
    echo '.padding{padding:' . $default_padding . ';}';
    echo '.padding-2x{padding:' . (2 * rockthemes_fn_px_em_return_num($default_padding) - 3) . 'px;}';
    //Site general color
    $site_general_color = xr_get_option('site_general_color', '#00aae8');
    //Link Colors
    $a_link_color = xr_get_option('a_link_color', '#eeeeee');
    $a_link_hover_color = xr_get_option('a_link_hover_color', '#ffffff');
    /*Font Colors*/
    echo 'body,html,p{color:' . xr_get_option('default_text_color', '#101010') . ';}';
    $light_font_color = xr_get_option('light_font_color', '#666666');
    /*All link "a" tags with will contain this not attributes. These are the escape class from a color*/
    $a_not = 'a:not(.escapea):not(.button)';
    $ie8 = '.lt-ie9 ';
    /*General Details*/
    echo $a_not . '{color:' . $a_link_color . ';}';
    echo $a_not . ':hover{color:' . $a_link_hover_color . ';}';
    /*
    	echo $ie8.'a{color:'.$a_link_color.';}';
    	echo $ie8.'a:hover{color:'.$a_link_hover_color.';}';
    */
    /*Grid details*/
    /*1140px grid*/
    /*960px grid*/
    /*1060px grid*/
    echo '.row{max-width:' . xr_get_option('main_layout_grid', '') . ';}';
    echo '.lt-ie9 .row{width:' . xr_get_option('main_layout_grid', '') . ';}';
    /*Responsivity*/
    $disable_responsivity = xr_get_option('disable_responsivity', false);
    if ($disable_responsivity) {
        //Responsivity disabled
        /*It was width: before and changed to min-width:*/
        echo '#main-canvas, .main-container{min-width:' . (2 * rockthemes_fn_px_em_return_num($default_padding) + rockthemes_fn_px_em_return_num(xr_get_option('main_layout_grid', ''))) . 'px; }';
        echo '.row{width:' . xr_get_option('main_layout_grid', '') . ';}';
    } else {
        //Responsive Design
    }
    /*General Color Settings*/
    echo '
		.main-color, .team-member-content .team-member-i, ol.comment-list li.comment .comment-author,
		ol.comment-list li.comment .comment-author a.url, .comment-list .reply a, #cancel-comment-reply-link,
		#wp-calendar td a{
			color:' . $site_general_color . ';	
		}
		
		#wp-calendar caption, .rockthemes-divider .divider-symbol, .rockthemes-divider .divider-symbol-left,
		.quasar-pagination .page-numbers.current, .quasar-link_pages > span.page-numbers, .quasar-style-dot{
			background-color:' . $site_general_color . ';	
		}
		
		.box-shadow-dark{
			-webkit-box-shadow:inset 0 0 2px ' . $site_general_color . ';
			-moz-box-shadow:inset  0 0 2px ' . $site_general_color . ';
			box-shadow:inset 0 0 2px ' . $site_general_color . ';
			border-color:' . $site_general_color . ';
		}
		
		.rockthemes-before-after-slider .twentytwenty-handle .twentytwenty-left-arrow{
			border-right-color:' . $site_general_color . ';
		}
		
		.rockthemes-before-after-slider .twentytwenty-handle .twentytwenty-right-arrow{
			border-left-color:' . $site_general_color . ';
		}
	';
    /*Typography Details*/
    $site_default_font_details = xr_get_option('site_default_font_details', array());
    if (!empty($site_default_font_details)) {
        echo '
			body, .button, .date-area, .date-area *, .comment-list .reply a, #cancel-comment-reply-link,
			p, a, .header-small-contact, .more-link, .rock-skill text tspan{
				' . $site_default_font_details['font_family'] . '
			}
			
			.quasar-breadcrumbs *, table, table tr th, table tr td, input[type="submit"]
			.rock-tabs-container .rock-tabs-header-container .rock-tab-header,
			ul,ol,dl, address, label, input, input:not([type="submit"]), select, button, textarea
			.quasar-pagination .page-numbers, input[type="submit"]:not(.button), .comments-submit, #comments-submit,
			p, a, .vcard .fn, .header-small-contact, .more-link{
				font-size:' . $site_default_font_details['font_size'] . ';	
			}
		';
    }
    $site_heading_font = xr_get_option('site_heading_font_family', '');
    if ($site_heading_font) {
        echo '
		h1, h2, h3, h4, h5, h6, .title-container, .title-container a, .page-title, 
		.sidebar-area caption, .quasar-portfolio-main-title, .team-member-content .member-b,
		.ajax-filtered-gallery-holder .ajax-navigation strong, .searchform label,
		.quasar-breadcrumbs li a, .quasar-breadcrumbs li,
		.rock-iconictext-container .rock-iconictext-header-title,
		.rock-iconictext-container .rock-iconictext-header-title strong,
		.quasar-element-responsive-title{
			' . $site_heading_font . '
		}
		';
    }
    $menu_font_family = xr_get_option('menu_font_family', '');
    if ($menu_font_family) {
        echo '
		#nav, #nav a, #nav ul li{
			' . $menu_font_family . '
		}
		
		#nav ul li a{
			font-size:' . xr_get_option('main_nav_font_size', '14px') . ';	
		}
		
		#nav ul ul li a{
			font-size:' . xr_get_option('main_nav_sub_font_size', '14px') . ';	
		}
		';
    }
    /*End of Typography*/
    if (xr_get_option('use_boxed_layout', false)) {
        echo '#main-canvas{width:100%; max-width:' . (2 * rockthemes_fn_px_em_return_num($default_padding) + rockthemes_fn_px_em_return_num(xr_get_option('main_layout_grid', ''))) . 'px; }';
    }
    /*General Colors*/
    echo '.main-color{color:' . $site_general_color . ';}';
    /*Real Color 00aae8*/
    echo '.main-boxed-text-color{color:' . xr_get_option('boxed_layout_text_color', '#101010') . ';}';
    /*General Boxed Text Color*/
    /*Go To Top Button*/
    echo '#toTop{background:' . $site_general_color . ';}';
    /*Header Large Area*/
    $header_large_background_repeat = xr_get_option('header_large_background_repeat', '');
    $header_large_background = xr_get_option('header_large_background', '');
    if ($header_large_background !== '') {
        echo '.header-top-1{background:url("' . $header_large_background . '") ' . $header_large_background_repeat . ';}';
    } else {
        echo '.header-top-1{background:' . xr_get_option('header_large_background_color', '') . ';}';
    }
    echo '.header-top-1{color:' . xr_get_option('header_large_font_color', '#333') . ';}';
    echo '.header-top-1 ' . $a_not . '{color:' . xr_get_option('header_large_link_color', '#333') . ';}';
    echo '.header-top-1 ' . $a_not . ':hover{color:' . $a_link_hover_color . ';}';
    echo $ie8 . '.header-top-1 a{color:' . xr_get_option('header_large_link_color', '#333') . ';}';
    echo $ie8 . '.header-top-1 a:hover{color:' . $a_link_hover_color . ';}';
    /*Header Top Area - Header Level 2*/
    echo '.header-top-2{
		background-color:' . xr_get_option('header_top_background_color', '#00aae8') . ';
		color:' . xr_get_option('header_top_font_color', '#F0F0F0') . ';
	}';
    echo '.header-top-2 ' . $a_not . '{color:' . xr_get_option('header_top_link_color', '#FAFAFA') . ';}';
    echo '.header-top-2 ' . $a_not . ':hover{color:' . xr_get_option('header_top_link_hover_color', '#DEDEDE') . ';}';
    echo $ie8 . 'body .header-top-2 div a{color:' . xr_get_option('header_top_link_color', '#FAFAFA') . ';}';
    echo $ie8 . '.header-top-2 a:hover{color:' . xr_get_option('header_top_link_hover_color', '#DEDEDE') . ';}';
    echo '.ie.ie8 .header-top-2 div a{color:' . xr_get_option('header_top_link_color', '#FAFAFA') . ' !important;}';
    /*IE8 Style Fix*/
    /*Logo Settings*/
    echo '.logo-container{margin-top:' . xr_get_option('logo_margin_top', '0px') . '; margin-bottom:' . xr_get_option('logo_margin_bottom', '0px') . ';}';
    /*Menu Settings*/
    $menu_bg_top_color = xr_get_option('menu_bg_gradient_top', '#FFF');
    $menu_bg_bottom_color = xr_get_option('menu_bg_gradient_bottom', '#F4F4F4');
    $menu_bg_border_top_color = xr_get_option('menu_border_top_color', '#FFFFFF');
    $menu_bg_border_bottom_color = xr_get_option('menu_border_bottom_color', '#DDDDDD');
    $menu_level1_font_color = xr_get_option('menu_level1_font_color', '#666666');
    $menu_level1_font_hover_color = xr_get_option('menu_level1_font_hover_color', '#666666');
    echo '
		.lt-ie9 .nav-box, .ie9 .nav-box{
			background:' . $menu_bg_top_color . ';
			
			background: #ffffff;
			background: -moz-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%, ' . $menu_bg_bottom_color . ' 100%);
			background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $menu_bg_top_color . '), color-stop(100%,' . $menu_bg_bottom_color . '));
			background: -webkit-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: -o-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: -ms-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: linear-gradient(to bottom,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $menu_bg_top_color . '", endColorstr="' . $menu_bg_bottom_color . '",GradientType=0 );
			
			border-top:1px solid ' . $menu_bg_border_top_color . ';
		}
	
	';
    if (xr_get_option('activate_menu_transparency', true)) {
        $menu_bg_top_color = 'rgba(' . rockthemes_hex2rgba($menu_bg_top_color, 0.8) . ')';
        $menu_bg_bottom_color = 'rgba(' . rockthemes_hex2rgba($menu_bg_bottom_color, 0.8) . ')';
    }
    echo '
		.nav-box{
			background:' . $menu_bg_top_color . ';
			
			background: #ffffff;
			background: -moz-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%, ' . $menu_bg_bottom_color . ' 100%);
			background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $menu_bg_top_color . '), color-stop(100%,' . $menu_bg_bottom_color . '));
			background: -webkit-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: -o-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: -ms-linear-gradient(top,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			background: linear-gradient(to bottom,  ' . $menu_bg_top_color . ' 0%,' . $menu_bg_bottom_color . ' 100%);
			filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $menu_bg_top_color . '", endColorstr="' . $menu_bg_bottom_color . '",GradientType=0 );
			
			border-top:1px solid ' . $menu_bg_border_top_color . ';
		}
	
	';
    /*
    	Currently disabled from .nav-box class
    	
    		border-bottom:1px solid '.$menu_bg_border_bottom_color.';
    */
    $menu_padding_top = xr_get_option('menu_padding_top', '11px');
    $menu_padding_top = $menu_padding_top == "" ? "11px" : $menu_padding_top;
    $menu_padding_bottom = xr_get_option('menu_padding_bottom', '12px');
    $menu_padding_bottom = $menu_padding_bottom == "" ? "11px" : $menu_padding_bottom;
    echo '#nav ul li a{padding:' . $menu_padding_top . ' 30px ' . $menu_padding_bottom . ' 0px;}';
    echo '#nav ul ul a{padding:9px 25px 9px 15px;}';
    //echo '#nav{padding-top:'.xr_get_option('menu_padding_top', '0px').';}';
    echo '#nav ul li.current-menu-item > ' . $a_not . '{color:' . $site_general_color . ';}';
    echo '#nav ul li ' . $a_not . ':hover{color:' . $site_general_color . ';}';
    echo $ie8 . '#nav ul li.current-menu-item > a{color:' . $site_general_color . ';}';
    echo $ie8 . '#nav ul li a:hover{color:' . $site_general_color . ';}';
    //Menu first level hover colors and active colors
    echo '#nav > ul > li.current-menu-item > ' . $a_not . '{color:' . $menu_level1_font_hover_color . ';}';
    echo '#nav > ul > li ' . $a_not . ':hover{color:' . $menu_level1_font_hover_color . ';}';
    echo $ie8 . '#nav > ul > li.current-menu-item > a{color:' . $menu_level1_font_hover_color . ';}';
    echo $ie8 . '#nav > ul > li a:hover{color:' . $menu_level1_font_hover_color . ';}';
    echo '#nav ul li a{color:' . $menu_level1_font_color . ';}';
    $menu_level1_font_color = xr_get_option('menu_level1_font_color', '#666');
    echo '#nav ul li.current-menu-item a .desc, #nav ul li.current-menu-item a i{color:' . $menu_level1_font_color . ';}';
    echo '#nav ul li a:hover .desc, #nav ul li a:hover i, #nav ul li ' . $a_not . '{color:' . $menu_level1_font_color . ';}';
    $menu_level2_bg_color = xr_get_option('menu_level2_bg_color', '#F4F4F4');
    $menu_level2_bg_hover_color = xr_get_option('menu_level2_bg_hover_color', '#F4F4F4');
    $menu_level2_font_color = xr_get_option('menu_level2_font_color', '#666666');
    $menu_level2_font_hover_color = xr_get_option('menu_level2_font_hover_color', '#F0F0F0');
    $menu_level2_border_top_color = xr_get_option('menu_level2_border_top_color', '#FDFDFD');
    $menu_level2_border_bottom_color = xr_get_option('menu_level2_border_bottom_color', '#E9E9E9');
    $menu_level2_border_radius = xr_get_option('menu_level2_border_radius', '3px');
    echo '#nav ul ul{background:' . $menu_level2_bg_color . '; color:' . $menu_level2_font_color . ';}';
    echo '#nav ul ul a, #nav ul ul ul a{color:' . $menu_level2_font_color . ';}';
    echo '#nav ul ul ' . $a_not . ', #nav ul ul ul ' . $a_not . ',{color:' . $menu_level2_font_color . ';}';
    echo '#nav ul ul a{border-top-color:' . $menu_level2_border_top_color . '; border-bottom-color:' . $menu_level2_border_bottom_color . '}';
    echo '#nav ul ul li.current-menu-item, #nav ul ul li.current-menu-parent, #nav ul ul li.current-menu-ancestor{background-color:' . $site_general_color . '; border-radius:' . $menu_level2_border_radius . ';}';
    echo '#nav ul ul li ' . $a_not . ', #nav ul ul ul li ' . $a_not . '{color:' . $menu_level2_font_color . ';}';
    echo '#nav ul ul li ' . $a_not . ':hover, #nav ul ul li:hover > ' . $a_not . '{color:' . $menu_level2_font_hover_color . ';}';
    echo '#nav ul ul li.current-menu-item > ' . $a_not . ', #nav ul ul li.current-menu-parent > ' . $a_not . ', #nav ul ul li.current-menu-ancestor > ' . $a_not . '{color:' . $menu_level2_font_hover_color . ';}';
    echo $ie8 . '#nav ul ul li a:hover, #nav .sub_font_color{color:' . $menu_level2_font_hover_color . ';}';
    echo $ie8 . '#nav ul ul li.current-menu-item > a, ' . $ie8 . '#nav ul ul li.current-menu-parent > a, ' . $ie8 . '#nav ul ul li.current-menu-ancestor > a{color:' . $menu_level2_font_hover_color . ';}';
    echo '#nav .sub-nav-hover, #nav .sub-sub-nav-hover{background-color:' . $menu_level2_bg_hover_color . ';}';
    echo '#nav .sub-sub-nav-hover, #nav .sub-nav-hover{border-radius:' . $menu_level2_border_radius . ';}';
    echo '#nav ul ul{border-bottom-left-radius:' . $menu_level2_border_radius . '; border-bottom-right-radius:' . $menu_level2_border_radius . ';}';
    echo '.special-search-container{
			padding-top:' . xr_get_option('search_icon_padding_top', '13px') . ';
			padding-bottom:' . xr_get_option('search_icon_padding_bottom', '15px') . ';
		}	
	';
    //search icon
    echo '.special-search-overlay-box{
		background:' . xr_get_option('search_box_color', '#FAFAFA') . '; 
		border-radius:' . xr_get_option('layout_border_radius', '0px') . ';
		border-top-left-radius:0px;
		border-top-right-radius:0px;
		margin-top:' . xr_get_option('search_icon_padding_bottom', '15px') . ';
	}';
    //Search Box
    //Stiky Menu Wordpress Admin Bar Fix
    if (is_admin_bar_showing()) {
        echo '.fixed-top-nav{top:28px;};';
    }
    //End of Menu Settings
    //Widget Sidebar Custom Menu
    echo '
	.widget_nav_menu .menu li.active > a{
	}';
    echo '.widget_nav_menu .menu a:hover, .widget_nav_menu .menu li.active > a{
		color:' . $menu_level2_font_hover_color . ';	
		background-color:' . $site_general_color . ';
	}';
    //End of Sidebar Custom Menu
    //Title Breadcrumbs Area Settings
    $title_area_background_image_repeat = xr_get_option('title_area_background_image_repeat', '');
    $title_area_background_image = xr_get_option('title_area_background_image', '');
    $title_area_background_color = xr_get_option('title_area_background_color', '');
    $title_area_background_image_retina = xr_get_option('title_area_background_image_retina', '');
    $title_area_background_image_width = xr_get_option('title_area_background_image_width', '');
    $title_area_background_image_height = xr_get_option('title_area_background_image_height', '');
    if ($title_area_background_image !== '') {
        echo '.quasar-title-breadcrumbs{
				background:url("' . $title_area_background_image . '") ' . $title_area_background_image_repeat . ';
				background-size:' . $title_area_background_image_width . ' ' . $title_area_background_image_height . '
		}
		
		@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
			.quasar-title-breadcrumbs{background-image:url("' . $title_area_background_image_retina . '");}
		}
		';
    } else {
        echo '.quasar-title-breadcrumbs{background:' . $title_area_background_color . ';}';
    }
    echo '.quasar-title-breadcrumbs, .quasar-title-breadcrumbs .page-title{color:' . xr_get_option('title_area_font_color', '#333') . ';}';
    echo '.quasar-title-breadcrumbs ' . $a_not . '{color:' . xr_get_option('title_area_link_color', '#333') . ';}';
    echo '.quasar-title-breadcrumbs ' . $a_not . ':hover{color:' . $a_link_hover_color . ';}';
    echo $ie8 . '.quasar-title-breadcrumbs a{color:' . xr_get_option('title_area_link_color', '#333') . ';}';
    echo $ie8 . '.quasar-title-breadcrumbs a:hover{color:' . $a_link_hover_color . ';}';
    //End of Title Breadcrumbs Area
    //Footer Large Area
    $footer_large_background_image_repeat = xr_get_option('footer_large_background_image_repeat', '');
    $footer_large_background_image = xr_get_option('footer_large_background_image', '');
    $footer_large_background_color = xr_get_option('footer_large_background_color', '');
    $footer_large_background_image_retina = xr_get_option('footer_large_background_image_retina', '');
    $footer_large_background_image_width = xr_get_option('footer_large_background_image_width', '');
    $footer_large_background_image_height = xr_get_option('footer_large_background_image_height', '');
    if ($footer_large_background_image !== '') {
        echo '.footer-large{
				background:url("' . $footer_large_background_image . '") ' . $footer_large_background_image_repeat . ';
				background-size:' . $footer_large_background_image_width . ' ' . $footer_large_background_image_height . '
		}
		
		@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
			.footer-large{background-image:url("' . $footer_large_background_image_retina . '");}
		}
		';
    } else {
        echo '.footer-large{background:' . $footer_large_background_color . ';}';
    }
    echo '.footer-large, .footer-large *, .footer-large .widget-title{color:' . xr_get_option('footer_large_font_color', '#333') . ';}';
    echo '.footer-large ' . $a_not . '{color:' . xr_get_option('footer_large_link_color', '#333') . ';}';
    echo '.footer-large ' . $a_not . ':hover{color:' . $a_link_hover_color . ';}';
    echo '.footer-large{padding:30px 0 60px;}';
    echo $ie8 . '.footer-large a{color:' . xr_get_option('footer_large_link_color', '#333') . ';}';
    echo $ie8 . '.footer-large a:hover{color:' . $a_link_hover_color . ';}';
    if (!xr_get_option('footer_large_headers_shadow', true)) {
        echo '.footer-large .widget-title{text-shadow:none;}';
    }
    $footer_large_border_top_color = xr_get_option('footer_large_border_top_color', '');
    $footer_large_border_bottom_color = xr_get_option('footer_large_border_bottom_color', '');
    echo 'hr.footer-inline-hr{border-top-color:' . $footer_large_border_top_color . '; border-bottom-color:' . $footer_large_border_bottom_color . ';}';
    echo '
		.customisable-border.thm-dark, .thm-dark .customisable-border,
		.customisable-border.thm-dark, .thm-dark .customisable-border, .widget .rpwe-block li{
			border-color:' . $footer_large_border_bottom_color . ';	
		}
	';
    if (xr_get_option('footer_large_top_border', true)) {
        echo '.footer-large{border-top:3px solid ' . $site_general_color . ';}';
    }
    //End of Footer Large Area
    //Footer Bottom
    echo '.footer-bottom{background:' . xr_get_option('footer_bottom_background_color', '') . ';}';
    echo '.footer-bottom{color:' . xr_get_option('footer_bottom_font_color', '#333') . ';}';
    echo '.footer-bottom ' . $a_not . '{color:' . xr_get_option('footer_bottom_link_color', '#333') . ';}';
    echo '.footer-bottom ' . $a_not . ':hover{color:' . $a_link_hover_color . ';}';
    echo $ie8 . '.footer-bottom a{color:' . xr_get_option('footer_bottom_link_color', '#333') . ';}';
    echo $ie8 . '.footer-bottom a:hover{color:' . $a_link_hover_color . ';}';
    //End of Footer Bottom
    //General Font Colors
    echo 'h1{color:' . xr_get_option('font_h1_color', '') . ';}';
    echo 'h2{color:' . xr_get_option('font_h2_color', '') . ';}';
    echo 'h3{color:' . xr_get_option('font_h3_color', '') . ';}';
    echo 'h4{color:' . xr_get_option('font_h4_color', '') . ';}';
    echo 'h5{color:' . xr_get_option('font_h5_color', '') . ';}';
    echo 'h6{color:' . xr_get_option('font_h6_color', '') . ';}';
    //End of General Font Colors
    //Blog Colors
    echo '
	.genericon:before,
	.menu-toggle:after,
	.featured-post:before,
	.date a:before,
	.entry-meta .author a:before,
	.format-audio .entry-content:before,
	.comments-link a:before,
	.tags-links a:first-child:before,
	.categories-links a:first-child:before,
	.post-view:before,
	.edit-link a:before,
	.attachment .entry-title:before,
	.attachment-meta:before,
	.attachment-meta a:before,
	.comment-awaiting-moderation:before,
	.comment-reply-link:before,
	.comment-reply-login:before,
	.comment-reply-title small a:before,
	.bypostauthor > .comment-body .fn:before,
	.error404 .page-title:before,
	.post-view-single:before{
		color:' . $site_general_color . ';
	}
	';
    echo '.more-link:not(.button){color:' . $a_link_color . ';}';
    echo '.post-format-container{background-color:' . $site_general_color . '; color:' . xr_get_option('blog_post_type_icon_color', '#FFF') . ';}';
    //End of Blog Colors
    /*Main Gradient*/
    $main_gradient_top_color = xr_get_option('main_gradient_top_color', '#FFFFFF');
    $main_gradient_bottom_color = xr_get_option('main_gradient_bottom_color', '#F4F4F4');
    echo '
	.main-gradient, .quasar-pagination .page-numbers, input[type="submit"]:not(.checkout-button):not(.button.alt), .comments-submit, #comments-submit{
		background: ' . $main_gradient_top_color . ';
		background: -moz-linear-gradient(top,  ' . $main_gradient_top_color . ' 0%, ' . $main_gradient_bottom_color . ' 100%);
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $main_gradient_top_color . '), color-stop(100%,' . $main_gradient_bottom_color . '));
		background: -webkit-linear-gradient(top,  ' . $main_gradient_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: -o-linear-gradient(top,  ' . $main_gradient_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: -ms-linear-gradient(top,  ' . $main_gradient_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: linear-gradient(to bottom,  ' . $main_gradient_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $main_gradient_top_color . '", endColorstr="' . $main_gradient_bottom_color . '",GradientType=0 );
	}
	';
    /*Pagination Hover*/
    $pagination_hover_top_color = xr_get_option('pagination_hover_top_color', '#FFFFFF');
    $pagination_hover_bottom_color = xr_get_option('pagination_hover_bottom_color', '#DCDCDC');
    echo '
	.quasar-pagination .page-numbers:not(.current):hover, input[type="submit"]:not(.checkout-button):not(.button.alt):hover, .comments-submit:hover, #comments-submit:hover{
		background: ' . $pagination_hover_top_color . ';
		background: -moz-linear-gradient(top,  ' . $pagination_hover_top_color . ' 0%, ' . $main_gradient_bottom_color . ' 100%);
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $pagination_hover_top_color . '), color-stop(100%,' . $main_gradient_bottom_color . '));
		background: -webkit-linear-gradient(top,  ' . $pagination_hover_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: -o-linear-gradient(top,  ' . $pagination_hover_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: -ms-linear-gradient(top,  ' . $pagination_hover_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		background: linear-gradient(to bottom,  ' . $pagination_hover_top_color . ' 0%,' . $main_gradient_bottom_color . ' 100%);
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $pagination_hover_top_color . '", endColorstr="' . $main_gradient_bottom_color . '",GradientType=0 );
	}
	';
    echo '
	.quasar-pagination .page-numbers.current, .quasar-pagination .page-numbers:active, .quasar-link_pages > span.page-numbers, 
	.button.active, .button.current, .button.active:hover, .button.current:hover .button.active:active, .button.current:active{
		background:' . $site_general_color . ';	 
	}
	';
    /*End of Main Gradients*/
    /*Hover effect mask*/
    /*echo '.regular-hover-container .hover-bg{background-color:'.$site_general_color.';}';*/
    //Main Boxed Layout Background Settings
    $main_boxed_layout_bg_image_repeat = xr_get_option('main_boxed_layout_bg_image_repeat', '');
    $main_boxed_layout_bg_image = xr_get_option('main_boxed_layout_bg_image', '');
    $main_boxed_layout_bg_color = xr_get_option('main_boxed_layout_bg_color', '');
    $main_boxed_layout_bg_image_retina = xr_get_option('main_boxed_layout_bg_image_retina', '');
    $main_boxed_layout_bg_image_width = xr_get_option('main_boxed_layout_bg_image_width', '');
    $main_boxed_layout_bg_image_height = xr_get_option('main_boxed_layout_bg_image_height', '');
    if ($main_boxed_layout_bg_image !== '') {
        echo '#main-canvas{
				background:url("' . $main_boxed_layout_bg_image . '") ' . $main_boxed_layout_bg_image_repeat . ';
				background-size:' . $main_boxed_layout_bg_image_width . ' ' . $main_boxed_layout_bg_image_height . '
		}
		
		@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
			#main-canvas{background-image:url("' . $main_boxed_layout_bg_image_retina . '");}
		}
		';
    } else {
        echo '#main-canvas{background:' . $main_boxed_layout_bg_color . ';}';
    }
    //Main Boxed Layout Background Settings
    $main_bg_image_retina = xr_get_option('main_bg_image_retina', '');
    $main_bg_image_width = xr_get_option('main_bg_image_width', '');
    $main_bg_image_height = xr_get_option('main_bg_image_height', '');
    echo 'body.custom-background{
			background-size:' . $main_bg_image_width . ' ' . $main_bg_image_height . '
	}';
    if ($main_bg_image_retina !== '') {
        echo '
		@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
			body.custom-background{background-image:url("' . $main_bg_image_retina . '");}
		}
		';
    }
    /*Background Settings*/
    $bg_color = get_theme_mod('background_color', 'f0f0f0') !== '' ? '#' . get_theme_mod('background_color', 'f0f0f0') : '';
    echo '.ui-panel-content-wrap, .ui-overlay-c{background:' . $bg_color . ' url("' . get_theme_mod('background_image', '') . '") ' . get_theme_mod('background_repeat', '') . ' ' . get_theme_mod('background_attachment', '') . ' ' . 'top' . ' ' . get_theme_mod('background_position_x', '') . ' !important; } ';
    $canvas_shadow_width = xr_get_option('canvas_shadow_width', '50') != '' ? xr_get_option('canvas_shadow_width', '50') : 50;
    echo '.content_holder{ -webkit-box-shadow: 0px 0px ' . $canvas_shadow_width . 'px rgba(80, 80, 80, 0.78); -moz-box-shadow: 0px 0px ' . $canvas_shadow_width . 'px rgba(80, 80, 80, 0.78); box-shadow: 0px 0px ' . $canvas_shadow_width . 'px rgba(80, 80, 80, 0.78);  } ';
    /*Boxed Layout Background Color for Elements*/
    $boxed_layout_bg = xr_get_option('boxed_layout_element_background_color', '#666666');
    if (1 == 1 && !$is_ie9_and_lower) {
        $boxed_layout_bg = 'rgba(' . rockthemes_hex2rgba($boxed_layout_bg, 0.68) . ')';
    }
    echo '.boxed-layout{background-color:' . xr_get_option('boxed_layout_element_background_color', '#666666') . ';}';
    echo '.rockthemes-parallax .boxed-layout{background-color:' . $boxed_layout_bg . ';}';
    echo '.boxed-layout.boxed-colors, .boxed-layout.boxed-colors p, .boxed-layout.boxed-colors h1,
	 .boxed-layout.boxed-colors h2, .boxed-layout.boxed-colors h3, .boxed-layout.boxed-colors h4,
	 .boxed-layout.boxed-colors h5, .boxed-layout.boxed-colors h6,
	 .boxed-layout.boxed-colors div, .boxed-layout.boxed-colors span{color:' . xr_get_option('boxed_layout_text_color', '#101010') . ';}';
    /*Boxed layout text color*/
    echo '.boxed-layout.boxed-colors a:not(.button){color:' . xr_get_option('boxed_layout_a_link_color', '#eeeeee') . ';}';
    echo '.boxed-layout.boxed-colors a:not(.button):hover{color:' . xr_get_option('boxed_layout_a_link_hover_color', '#ffffff') . ';}';
    /*Iconic Text*/
    echo '.rock-iconictext-container .rockicon-circle-box i,
	.rock-iconictext-container .rockicon-rounded-box i{color:' . xr_get_option('boxed_layout_text_color', '#101010') . ';}';
    echo '.rock-iconictext-container .rockicon-circle-box i,
	.rock-iconictext-container .rockicon-rounded-box i,
	.rock-iconictext-container .rockicon-quasar-box i{color:#f3f3f3;}';
    /*Tabs and Toggles use the same background color*/
    $tabs_border_color = xr_get_option('tabs_toggles_border_color', '#E4E4E4');
    $tabs_bg_color = xr_get_option('tabs_toggles_bg_color', '#F0F0F0');
    /*Toggles*/
    echo '.rock-toggles-container .active .rock-toggle-header{color:' . $site_general_color . ';}';
    echo '.boxed-layout .rock-toggles-container .active .rock-toggle-header{background-color:' . $site_general_color . '; color:' . $menu_level2_font_hover_color . ';}';
    echo '.rock-toggles-container .rock-toggle-header{color:' . $a_link_color . ';}';
    echo '.rock-toggles-container .rock-toggle-header:hover{color:' . $site_general_color . ';}';
    echo '.rock-toggle-content{background:' . $tabs_bg_color . ';}';
    echo '
		.boxed-layout .rock-toggles-container .rock-toggle-header:hover{color:' . $site_general_color . ';}
		.boxed-layout .rock-toggles-container .rock-toggle-header{color:' . xr_get_option('boxed_layout_a_link_color', '#eeeeee') . ';}
		.boxed-layout .rock-toggles-container .active .rock-toggle-header{color:' . $menu_level2_font_hover_color . ';}
	';
    /*Tabs*/
    echo '
	.rock-tabs-container .rock-tabs-header-container .rock-tab-header.active,
	.rock-tabs-container .rock-tabs-header-container .rock-tab-header:hover{color:' . $site_general_color . ';}
	';
    echo '.rock-tabs-container .rock-tabs-header-container .rock-tab-header{color:' . $a_link_color . ';}';
    echo '
	.rock-tabs-container .rock-tabs-content-container .tabs-motion-container,
	.rock-tabs-container .rock-tabs-header-container .rock-tab-header.active{
		background:' . $tabs_bg_color . ';
	}';
    echo '
		.boxed-layout .rock-tabs-container .rock-tabs-header-container .rock-tab-header{color:' . xr_get_option('boxed_layout_a_link_color', '#eeeeee') . ';}
		.boxed-layout .rock-tabs-container .rock-tabs-header-container .rock-tab-header.active,
		.boxed-layout .rock-tabs-container .rock-tabs-header-container .rock-tab-header:hover{color:' . xr_get_option('boxed_layout_a_link_hover_color', '#ffffff') . ';}
	';
    echo '.rock-tabs-container.tab-top .rock-tabs-header-container .rock-tab-header.active:first-child,
	.rock-tabs-container.tab-top .rock-tabs-header-container .rock-tab-header.active,
	.rock-tabs-container.tab-top .rock-tabs-header-container .rock-tab-header.active{
		border-left-color:' . $tabs_border_color . ';
		border-right-color:' . $tabs_border_color . ';
		border-top-color:' . $tabs_border_color . ';
	}';
    echo '.rock-tabs-container.tab-top .rock-tabs-header-container .rock-tab-header.active{
		border-bottom-color:' . $tabs_bg_color . ';
	}';
    /*Border Radius of boxed layouts*/
    $layout_border_radius = xr_get_option('layout_border_radius', '0px');
    echo '.boxed-layout{border-radius:' . $layout_border_radius . ';}';
    /*Ajax Filtered Gallery Details*/
    $ajax_filtered_gallery_width = xr_get_option('ajax_filtered_hover_width', '590px');
    $ajax_filtered_gallery_height = xr_get_option('ajax_filtered_hover_height', '300px');
    $ajax_filtered_gallery_image_width = rockthemes_fn_px_em_return_num($ajax_filtered_gallery_width) + rockthemes_fn_px_em_return_num($default_padding);
    $ajax_filtered_gallery_image_height = rockthemes_fn_px_em_return_num($ajax_filtered_gallery_height) + rockthemes_fn_px_em_return_num($default_padding);
    echo '
	.ajax-filtered-hover-box{
		width:' . $ajax_filtered_gallery_image_width . 'px; 
		height:' . ($ajax_filtered_gallery_image_height + 90) . 'px;
		background:' . xr_get_option('ajax_filtered_hover_box_bg', '#FAFAFA') . ';
		border-color:' . xr_get_option('ajax_filtered_hover_box_border', '#BEBEBE') . ';
		color:' . xr_get_option('ajax_filtered_hover_box_font', '666666') . ';
	}';
    echo '.ajax-filtered-hover-box > ajax-filtered-image{width:' . $ajax_filtered_gallery_width . '; height:' . $ajax_filtered_gallery_height . ';}';
    echo '
	.ajax-filtered-gallery-holder.category-names-in-border .ajax-navigation ul li a,
	.ajax-filtered-gallery-holder.category-names-in-border .ajax-filtered-footer a{
		border-color:' . xr_get_option('ajax_filtered_hover_box_font', '666666') . ';
	}';
    echo '
	.ajax-filtered-gallery-holder.category-names-in-border .ajax-navigation ul li a:hover,
	.ajax-filtered-gallery-holder.category-names-in-border .ajax-filtered-footer a:hover,
	.ajax-filtered-gallery-holder.category-names-in-border .ajax-navigation ul li.active a{
		border-color:' . $site_general_color . ';
	}';
    /*Social Icons*/
    echo '.header-top-1 .rock-social-icon a .social-icon-regular{color:' . xr_get_option('social_media_icons_default_color', '#999') . ' !important;}';
    echo '.header-top-2 .social-icon-regular{color:' . xr_get_option('header_top_link_color', '#FAFAFA') . ' !important;}';
    echo $ie8 . '.header-top-2 .social-icon-regular{color:' . xr_get_option('header_top_link_color', '#FAFAFA') . ' !important;}';
    echo '.rock-social-icon a .social-icon-hover{color:' . xr_get_option('header_top_link_hover_color', '#FFFFFF') . ' !important;}';
    /*Pricing Table*/
    echo '.quasar-pt-columns:hover{
		box-shadow:0 0 3px ' . $site_general_color . ';
		-webkit-box-shadow:0 0 3px ' . $site_general_color . ';
		-moz-box-shadow:0 0 3px ' . $site_general_color . ';
	}';
    /*Team Members*/
    echo '.team-member-content .team-member-i{color:' . $site_general_color . ';}';
    echo '.team-member-article.current {
		border-bottom: 20px solid ' . xr_get_option('boxed_layout_element_background_color', '#666666') . ';
	}';
    /*Gallery*/
    echo '
		.load_more_button:hover{
			color:' . $site_general_color . ';
			border-color:' . $site_general_color . ';
		}
	';
    /*Custom Button Colors*/
    $custom_button_color_1 = xr_get_option('custom_button_color_1', '');
    $custom_button_color_2 = xr_get_option('custom_button_color_2', '');
    $custom_button_color_3 = xr_get_option('custom_button_color_3', '');
    $custom_button_color_4 = xr_get_option('custom_button_color_4', '');
    $custom_button_color_5 = xr_get_option('custom_button_color_5', '');
    echo '
	.button-custom {
		background: ' . $custom_button_color_3 . '; 
	
		background: -moz-linear-gradient(top,  ' . $custom_button_color_2 . ' 0%, ' . $custom_button_color_3 . ' 82%, ' . $custom_button_color_4 . ' 100%); 
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $custom_button_color_2 . '), color-stop(82%,' . $custom_button_color_3 . '), color-stop(100%,' . $custom_button_color_4 . '));
		background: -webkit-linear-gradient(top,  ' . $custom_button_color_2 . ' 0%,' . $custom_button_color_3 . ' 82%,' . $custom_button_color_4 . ' 100%);
		background: -o-linear-gradient(top,  ' . $custom_button_color_2 . ' 0%,' . $custom_button_color_3 . ' 82%,' . $custom_button_color_4 . ' 100%); 
		background: linear-gradient(to bottom,  ' . $custom_button_color_2 . ' 0%,' . $custom_button_color_3 . ' 82%,' . $custom_button_color_4 . ' 100%); 
	  
		border-color: ' . $custom_button_color_1 . ';
		color: white;
		text-shadow: 0 -1px 1px rgba(0, 40, 50, 0.35);
	}

	.button-custom:hover {
		background-color: ' . $custom_button_color_4 . ';
		background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, ' . $custom_button_color_4 . '), color-stop(100%, ' . $custom_button_color_1 . '));
		background: -webkit-linear-gradient(top, ' . $custom_button_color_4 . ', ' . $custom_button_color_1 . ');
		background: -moz-linear-gradient(top, ' . $custom_button_color_4 . ', ' . $custom_button_color_1 . ');
		background: -o-linear-gradient(top, ' . $custom_button_color_4 . ', ' . $custom_button_color_1 . ');
		background: linear-gradient(top, ' . $custom_button_color_4 . ', ' . $custom_button_color_1 . ');
	}

	.button-custom:active {
		background: ' . $custom_button_color_5 . ';
		color: #EEE;
		text-shadow:none;
	}
	
	.button-flat-custom {
		-webkit-box-shadow: none;
		-moz-box-shadow: none;
		box-shadow: none;
		-webkit-transition-property: background;
		-moz-transition-property: background;
		-o-transition-property: background;
		transition-property: background;
		-webkit-transition-duration: 0.3s;
		-moz-transition-duration: 0.3s;
		-o-transition-duration: 0.3s;
		transition-duration: 0.3s;
		background: ' . $custom_button_color_3 . ';
		color: white;
		text-shadow: none;
		border: none;
	}
	
	.button-flat-custom:hover {
		background: ' . $custom_button_color_4 . ';
	}
	
	.button-flat-custom:active {
		-webkit-transition-duration: 0s;
		-moz-transition-duration: 0s;
		-o-transition-duration: 0s;
		transition-duration: 0s;
		background: ' . $custom_button_color_5 . ';
		color: #EEE;
	}
	';
    /*All escape classes*/
    echo '
	.escape_button_style, .escape_button_style:hover, .escape_button_style:active{
		background:none !important;
		padding:0px !important;
		box-shadow:none !important;
		-moz-box-shadow:none !important;
		-webkit-box-shadow:none !important;
		border:none !important;
		margin:0 !important;
		top:0px !important;
		font-weight:normal !important;
		float:none !important;
	}

	
	.boxed-colors .escape_button_style{
		color:' . xr_get_option('boxed_layout_a_link_color', '#ffffff') . ' !important;	
	}

		
	.escape_button_style{
		color:' . $a_link_color . ' !important;	
	}
	
	
	.boxed-colors .escape_button_style:hover{
		color:' . xr_get_option('boxed_layout_a_link_hover_color', '#ffffff') . ' !important;	
	}

		
	.escape_button_style:hover{
		color:' . $a_link_hover_color . ' !important;	
	}
	';
    /*404*/
    echo '.error-404-icon{color:' . $site_general_color . ';}';
    echo '.error-404-header, .error-404-description{color:' . $light_font_color . ';}';
    /*HTML Extended Elements*/
    echo 'mark{background-color:' . $site_general_color . ';}';
    /*Extra Styling from user*/
    echo xr_get_option('extra_css_code', '');
    echo '</style>';
    /*Some pseudo elements*/
    if ($rockthemes_browser && strpos($rockthemes_browser['name'], 'xplorer') > -1 && intval($rockthemes_browser['version']) < 9) {
        echo '
	<script type="text/javascript">
		jQuery(document).ready(function(){
			jQuery("' . $a_not . '").each(function(){
				if(jQuery(this).parents(".nav-menu").length){
					
				}else{
					jQuery(this).css("color","' . $a_link_color . '");
				}
			});
			jQuery(document).on("mouseenter", "' . $a_not . '", function(){
				if(jQuery(this).parents(".nav-menu").length){
					
				}else{
					jQuery(this).css("color","' . $a_link_hover_color . '");
				}
			});
			jQuery(document).on("mouseleave", ".main-container:not(.nav-menu) ' . $a_not . '", function(){
				if(jQuery(this).parents(".nav-menu").length){
					
				}else{
					jQuery(this).css("color","' . $a_link_color . '");
				}
			});
			
		});
	</script>
	';
    }
}
Example #2
0
function rockthemes_pb_parse_content_val($val, $nosidebar_content = 'false')
{
    //return if no value entered or the value is not an array
    if (!isset($val) && !is_array($val)) {
        return;
    }
    foreach ($val as $key => $value) {
        $col[$key] = $value['col'];
        $row[$key] = $value['row'];
    }
    array_multisort($row, $col, $val);
    $main_return = '';
    $return = '';
    $calcColumn = 0;
    $latestRow = 1;
    $columnsInRow = 1;
    //Must be 12 for each column
    $fullwidth_colored_active = false;
    //For fullwidth colored rows
    $fullwidth_slider_active = false;
    //For full width slider rows
    $general_padding = rockthemes_fn_px_em_return_num(xr_get_option('content_padding', '10px'));
    $shadow_html = '';
    $last_shadow_html = '';
    $skip_content_in_blocks = false;
    foreach ($val as $singleVal) {
        //Open and close special grid block
        if ($nosidebar_content !== 'false') {
            if (isset($singleVal['special_grid_block_open']) && $singleVal['special_grid_block_open'] === 'yes') {
                //$return .= 'OPENED';
                if ($singleVal['grid_data']['data']['data']['avoidSidebar'] === $nosidebar_content) {
                    $GLOBALS['rockthemes_pb_specialgridblocks'] = true;
                }
            } elseif (isset($singleVal['special_grid_block_open']) && $singleVal['special_grid_block_open'] === 'no') {
                //$return .= 'CLOSED';
                if ($singleVal['grid_data']['data']['data']['avoidSidebar'] === $nosidebar_content) {
                    $GLOBALS['rockthemes_pb_specialgridblocks'] = false;
                }
            }
        } else {
            //Not before not after, regular content. But blocks are still exists, these two statements will escape content in blocks
            if (isset($singleVal['special_grid_block_open']) && $singleVal['special_grid_block_open'] === 'yes') {
                //echo 'OPENED';
                $skip_content_in_blocks = true;
            } elseif (isset($singleVal['special_grid_block_open']) && $singleVal['special_grid_block_open'] === 'no') {
                //echo 'CLOSED';
                $skip_content_in_blocks = false;
            }
        }
        //Do not display if this is no sidebar content
        //if(isset($singleVal['grid_data']['data']['data']['avoidSidebar']) && $nosidebar_content === 'false' && $singleVal['grid_data']['data']['data']['avoidSidebar'] !== 'false' ) continue;
        if ($nosidebar_content === 'false' && (isset($GLOBALS['rockthemes_pb_specialgridblocks']) && $GLOBALS['rockthemes_pb_specialgridblocks'] || $skip_content_in_blocks)) {
            continue;
        }
        //Display only no sidebar content before sidebars
        if ($nosidebar_content === 'before' && (!isset($singleVal['special_grid_block_open']) || $singleVal['special_grid_block_open'] !== 'no') && (!isset($GLOBALS['rockthemes_pb_specialgridblocks']) || !$GLOBALS['rockthemes_pb_specialgridblocks'])) {
            continue;
        }
        //Display only no sidebar content after sidebars
        if ($nosidebar_content === 'after' && (!isset($singleVal['special_grid_block_open']) || $singleVal['special_grid_block_open'] !== 'no') && (!isset($GLOBALS['rockthemes_pb_specialgridblocks']) || !$GLOBALS['rockthemes_pb_specialgridblocks'])) {
            continue;
        }
        //Check if using fullwidth for sliders
        $fullwidth_slider = isset($singleVal['grid_data']['data']['data']['grid_special_width_details']) && $singleVal['grid_data']['data']['data']['grid_special_width_details'] === 'full_width_slider' ? true : false;
        //Check if using fullwidth background color
        $fullwidth_colored = isset($singleVal['grid_data']['data']['data']['grid_special_width_details']) && $singleVal['grid_data']['data']['data']['grid_special_width_details'] === 'full_width_colored' ? true : false;
        //Check if using parallax
        $parallax_used = isset($singleVal['grid_data']['data']['data']['grid_special_width_details']) && $singleVal['grid_data']['data']['data']['grid_special_width_details'] === 'use_parallax' ? true : false;
        //Background Image in Special Blocks
        $background_img_used = isset($singleVal['grid_data']['data']['data']['grid_special_width_details']) && $singleVal['grid_data']['data']['data']['grid_special_width_details'] === 'use_background_img' ? true : false;
        $background_color = isset($singleVal['grid_data']['data']['data']['background_color']) ? $singleVal['grid_data']['data']['data']['background_color'] : '';
        $transparent_background = checked("true", isset($singleVal['grid_data']['data']['data']['transparent_background']) ? $singleVal['grid_data']['data']['data']['transparent_background'] : false, false);
        $padding_vertical_html = '';
        if (isset($singleVal['grid_data']['data']['data']['activate_padding']) && $singleVal['grid_data']['data']['data']['activate_padding'] === 'true') {
            $padding_vertical_html = 'padding-top:' . 4 * $general_padding . 'px; padding-bottom:' . 4 * $general_padding . 'px;';
        }
        if (intval($singleVal['row']) === intval($latestRow)) {
        } else {
            $latestRow = $singleVal['row'];
            if ($columnsInRow <= 12 && $columnsInRow !== 1) {
                $return .= '<div class="large-' . (13 - $columnsInRow) . ' columns"></div>';
            }
            if ($fullwidth_colored_active && !$GLOBALS['rockthemes_pb_specialgridblocks']) {
                $return .= '</div>';
                $return .= $shadow_html;
                $shadow_html = '';
                $fullwidth_colored_active = false;
            }
            if ($parallax_used && !$GLOBALS['rockthemes_pb_specialgridblocks']) {
                $return .= '</div>';
                $parallax_used = false;
            }
            if (!$fullwidth_slider_active) {
                $return .= '</div><div class="row">';
            }
            $columnsInRow = 1;
        }
        $animation_used = isset($singleVal['grid_data']['data']['data']['animation_type']) ? $singleVal['grid_data']['data']['data']['animation_type'] : '';
        if ($animation_used !== '') {
            $animation_details = ' animation-class="' . $animation_used . '" animation-delay-time="' . $singleVal['grid_data']['data']['data']['animation_delay_time'] . '"';
            $animation_main_class = 'rockthemes-animate';
        }
        if (isset($singleVal['grid_data']['data']['data']['use_shadow']) && $singleVal['grid_data']['data']['data']['use_shadow'] === 'true') {
            $shadow_html = '<div class="hr-shadow-mask rotate-shadow"><hr class="hr-shadow active shadow-effect curve curve-hz-1"></div>';
            $shadow_html = quasar_image_shadow_up();
        }
        $last_shadow_html = $shadow_html;
        //Add Parallax
        if ($parallax_used && !$fullwidth_colored_active && $nosidebar_content !== 'false') {
            $special_grid_html_id_code = '';
            $special_grid_html_id = isset($singleVal['grid_data']['data']['data']['special_grid_html_id']) ? $singleVal['grid_data']['data']['data']['special_grid_html_id'] : false;
            if (!empty($special_grid_html_id)) {
                $special_grid_html_id_code = 'id="' . $special_grid_html_id . '" ';
            }
            $return .= '
			</div>
			<div ' . $special_grid_html_id_code . ' class="rockthemes-parallax" 
				parallax-model="height_specific" 
				parallax-bg-image="' . $singleVal['grid_data']['data']['data']['parallax_bg_image'] . '" 
				parallax-mask-height="' . $singleVal['grid_data']['data']['data']['parallax_mask_height'] . '">
			<div class="row">';
            $fullwidth_colored_active = true;
        }
        //Add Background Image
        if ($background_img_used && !$fullwidth_colored_active && $nosidebar_content !== 'false') {
            $special_grid_html_id_code = '';
            $special_grid_html_id = isset($singleVal['grid_data']['data']['data']['special_grid_html_id']) ? $singleVal['grid_data']['data']['data']['special_grid_html_id'] : false;
            if (!empty($special_grid_html_id)) {
                $special_grid_html_id_code = 'id="' . $special_grid_html_id . '" ';
            }
            $return .= '
			</div>
			<div ' . $special_grid_html_id_code . ' class="rockthemes-parallax" 
				parallax-model="no_parallax_only_image" 
				parallax-bg-image="' . $singleVal['grid_data']['data']['data']['parallax_bg_image'] . '" 
				parallax-mask-height="' . $singleVal['grid_data']['data']['data']['parallax_mask_height'] . '">
			<div class="row">';
            $fullwidth_colored_active = true;
        }
        //Add Fullwidth colored (Colored Background)
        if ($fullwidth_colored && !$fullwidth_colored_active && $nosidebar_content !== 'false') {
            $special_grid_html_id_code = '';
            $special_grid_html_id = isset($singleVal['grid_data']['data']['data']['special_grid_html_id']) ? $singleVal['grid_data']['data']['data']['special_grid_html_id'] : false;
            if (!empty($special_grid_html_id)) {
                $special_grid_html_id_code = 'id="' . $special_grid_html_id . '" ';
            }
            $return .= '</div><div ' . $special_grid_html_id_code . ' class="rockthemes-fullwidth-colored" style="' . (!$transparent_background ? 'background:' . $background_color . ';' : '') . ' ' . $padding_vertical_html . '"><div class="row">';
            $fullwidth_colored_active = true;
        }
        //Add Fullwidth for slider
        if ($fullwidth_slider && !$fullwidth_slider_active && $nosidebar_content !== 'false') {
            $return .= '</div>';
            $fullwidth_slider_active = true;
        }
        //Columns Div
        if (!$fullwidth_slider_active) {
            if ($columnsInRow < intval($singleVal['col']) && $columnsInRow !== 0) {
                if ($animation_used !== '') {
                    $return .= '<div class="large-' . $singleVal['size_x'] . ' large-offset-' . (intval($singleVal['col']) - $columnsInRow) . ' columns ' . $animation_main_class . '" ' . $animation_details . '>';
                } else {
                    $return .= '<div class="large-' . $singleVal['size_x'] . ' large-offset-' . (intval($singleVal['col']) - $columnsInRow) . ' columns">';
                }
                $columnsInRow = intval($singleVal['size_x']) + intval($singleVal['col']);
            } else {
                if ($animation_used !== '') {
                    $return .= '<div class="large-' . $singleVal['size_x'] . ' columns ' . $animation_main_class . '" ' . $animation_details . '>';
                } else {
                    $return .= '<div class="large-' . $singleVal['size_x'] . ' columns">';
                }
                $columnsInRow = $columnsInRow + intval($singleVal['size_x']);
            }
        }
        if (isset($singleVal['elems']) && !empty($singleVal['elems'])) {
            foreach ($singleVal['elems'] as $singleElem) {
                $return .= makeObjectWithDetails($singleElem);
            }
        }
        //Add Fullwidth for slider
        if ($fullwidth_slider_active && isset($GLOBALS['rockthemes_pb_specialgridblocks']) && !$GLOBALS['rockthemes_pb_specialgridblocks']) {
            $return .= '<div class="row after-fullwidth-slider"><div class="large-' . $singleVal['size_x'] . ' columns">';
            $fullwidth_slider_active = false;
        }
        //Add Fullwidth colored (Colored Background)
        if ($fullwidth_colored) {
            //$return .= '</div>';
        }
        if (!$fullwidth_slider_active) {
            //close columns div
            $return .= '</div>';
        }
    }
    if ($columnsInRow <= 12 && $columnsInRow !== 1) {
        $return .= '<div class="large-' . (13 - $columnsInRow) . ' columns"></div>';
    }
    if ($return !== '') {
        $main_return = '<div class="row">' . $return . '</div>';
    }
    if ($fullwidth_colored_active && isset($GLOBALS['rockthemes_pb_specialgridblocks']) && !$GLOBALS['rockthemes_pb_specialgridblocks']) {
        $main_return .= $last_shadow_html;
        $main_return .= '</div>';
        $fullwidth_colored_active = false;
    }
    if ($fullwidth_slider_active && isset($GLOBALS['rockthemes_pb_specialgridblocks']) && !$GLOBALS['rockthemes_pb_specialgridblocks']) {
        $main_return .= '</div>';
        $fullwidth_slider_active = false;
    }
    /*
     **	Remove empty rows and empty columns
     **
     **	@since	:	1.3
     **
     */
    $main_return = str_replace('<div class="large-12 columns"></div>', '', $main_return);
    $main_return = str_replace('<div class="row"></div>', '', $main_return);
    return $main_return;
}
Example #3
0
    function rockthemes_shortcode_make_specialgridblock($atts, $content = null)
    {
        extract(shortcode_atts(array('avoid_sidebar' => 'false', 'grid_special_width_details' => '', 'background_color' => '', 'use_shadow' => '', 'activate_padding' => '', 'transparent_background' => '', 'special_grid_html_id' => '', 'parallax_model' => '', 'parallax_mask_height' => '', 'parallax_bg_image' => ''), $atts));
        $transparent_background = $transparent_background === 'true' ? true : false;
        $general_padding = rockthemes_fn_px_em_return_num(xr_get_option('content_padding', '10px'));
        $padding_vertical_html = '';
        if (isset($activate_padding) && $activate_padding === 'true') {
            $padding_vertical_html = 'padding-top:' . 4 * $general_padding . 'px; padding-bottom:' . 4 * $general_padding . 'px;';
        }
        $return = '';
        $special_grid_html_id_code = '';
        if (!empty($special_grid_html_id)) {
            $special_grid_html_id_code = 'id="' . $special_grid_html_id . '" ';
        }
        switch ($grid_special_width_details) {
            case 'use_parallax':
                $content = '<div ' . $special_grid_html_id_code . ' class="rockthemes-parallax" 
				parallax-model="height_specific" 
				parallax-bg-image="' . $parallax_bg_image . '" 
				parallax-mask-height="' . $parallax_mask_height . '">
			<div class="row">' . $content . '</div>';
                break;
            case 'use_background_img':
                $content = '<div ' . $special_grid_html_id_code . ' class="rockthemes-parallax" 
				parallax-model="no_parallax_only_image" 
				parallax-bg-image="' . $parallax_bg_image . '" 
				parallax-mask-height="' . $parallax_mask_height . '">
			<div class="row">' . $content . '</div>';
                break;
            case 'full_width_slider':
                $content = '<div><div><div>' . $content . '';
                break;
            case 'full_width_colored':
                $content = '<div ' . $special_grid_html_id_code . ' class="rockthemes-fullwidth-colored" style="' . (!$transparent_background ? 'background:' . $background_color . ';' : '') . ' ' . $padding_vertical_html . '">
							<div class="row">' . $content . '</div>';
                break;
        }
        switch ($avoid_sidebar) {
            case 'false':
                break;
            case 'before':
                $return = '</div>' . do_shortcode($content) . '</div><div class="row">';
                break;
            case 'after':
                $return = '</div></div>' . do_shortcode($content) . '</div><div><div class="row">';
                break;
        }
        return $return;
    }
Example #4
0
    function rockthemes_shortcode_make_portfolio_showcase($atts)
    {
        wp_reset_query();
        wp_reset_postdata();
        extract(shortcode_atts(array('post_type' => 'post', 'category' => 'all', 'block_grid_large' => '3', 'block_grid_medium' => '3', 'block_grid_small' => '3', 'total' => '9', 'activate_hover_box' => 'true', 'activate_hover' => 'false', 'disable_hover_link' => 'false', 'use_shadow' => 'false', 'excerpt_length' => '18', 'small_thumb_hover' => 'false', 'boxed_layout' => 'false', 'image_size' => 'medium', 'activate_category_link' => 'deactive', 'use_border_on_categories' => 'activate', 'header_title' => ''), $atts));
        if ($post_type === 'no-selected') {
            return;
        }
        //Ajax hover obj
        $hover_obj = array('activate_hover_box' => $activate_hover_box, 'activate_hover' => $activate_hover, 'disable_hover_link' => $disable_hover_link, 'small_thumb_hover' => $small_thumb_hover, 'use_shadow' => $use_shadow);
        $small_medium_class = rock_builder_get_small_medium_block_grid_class();
        $block_class = ' large-block-grid-' . esc_attr($block_grid_large) . ' medium-block-grid-' . esc_attr($block_grid_medium) . ' small-block-grid-' . esc_attr($block_grid_small) . ' ';
        //Only one hover effect can be used
        if ($activate_hover_box === 'true') {
            $activate_hover = 'false';
        }
        if (isset($GLOBALS['rockthemes_portfolio_showcase'])) {
            $GLOBALS['rockthemes_portfolio_showcase']++;
        } else {
            $GLOBALS['rockthemes_portfolio_showcase'] = 1;
        }
        $id = "quasar-ajaxfiltered-" . $GLOBALS['rockthemes_portfolio_showcase'];
        $return = '';
        if ($boxed_layout == "true") {
            $return .= '<div class="boxed-layout boxed-colors ajax-filtered padding-2x">';
        }
        $return .= '<div id="' . $id . '" class="ajax-filtered-gallery-holder ' . ($use_border_on_categories === 'active' ? 'category-names-in-border' : '') . '">';
        //Header
        //$return .= '<h3>Ajax Filtered Gallery</h3>';
        //Navigation
        $return .= '<div class="ajax-navigation" post_type="' . $post_type . '" image_size="' . $image_size . '">';
        $cat_list = explode(',', $category);
        //Header
        if ($header_title !== '') {
            $return .= '<strong>' . $header_title . '</strong>';
        }
        $return .= '<ul>';
        $totalCat = sizeof($cat_list);
        $i = 0;
        $elements_list = '';
        $taxonomy_attr = ' taxonomy="category"';
        foreach ($cat_list as $cat) {
            $data = get_category_by_slug($cat);
            $link_html = get_permalink($cat);
            if ($data) {
                //$return .= '<li class="category-name" slug-holder="'.$data->slug.'"><a href="#">'.$data->name.'</a></li>';
            } else {
                $tax_list = get_object_taxonomies($post_type);
                //get_object_taxonomies
                $post_tax = '';
                foreach ($tax_list as $tax) {
                    if (strpos($tax, 'cat') > -1) {
                        $post_tax = $tax;
                        break;
                    }
                }
                //Return if a custom product type added and removed and forgetten to remove from page.
                if (empty($tax_list)) {
                    return;
                }
                $taxonomy_attr = ' taxonomy="' . $post_tax . '"';
                $data = get_term_by('slug', $cat, $post_tax);
                if (!$data) {
                    continue;
                }
                $tax = get_category_by_slug($cat);
                if (!$tax) {
                    $tax = get_term_link($cat, $post_tax);
                } else {
                    $tax = get_category_link($post_tax);
                }
                $link_html = $tax;
            }
            $elements_list .= '<li class="category-name" cat-link="' . $link_html . '" slug-holder="' . $data->slug . '" ' . $taxonomy_attr . '><a href="#">' . $data->name . '</a></li>';
            if ($i + 1 < $totalCat) {
                $elements_list .= '<li slug-holder="no-value" class="no-value"> | </li>';
            }
            $i++;
        }
        $return .= '<li class="category-name active" slug-holder="' . $category . '" ' . $taxonomy_attr . '><a href="#">' . __('Latest', 'quasar') . '</a></li>';
        $return .= '<li value="no-value" class="no-value"> | </li>';
        $return .= $elements_list;
        $return .= '</ul>';
        $return .= '<div class="clear"></div>';
        $return .= '<div class="hr-shadow-mask"><hr class="hr-shadow active shadow-effect curve curve-hz-1"></div>';
        $return .= '</div>';
        //End of Ajax Navigation
        $post_is_tax = false;
        //Body
        $return .= '<div class="ajax-body">';
        $return .= '<ul class="' . $block_class . '">';
        $posts = array();
        if ($post_type === 'post') {
            $posts = get_posts(array('category_name' => $category, 'posts_per_page' => $total));
        }
        if (!count($posts)) {
            $args = array('post_type' => $post_type, $post_tax => $category, 'posts_per_page' => $total);
            $posts = get_posts($args);
            $post_is_tax = true;
        }
        if (sizeof($posts) > 0) {
            //Foundation last columns aligns to right. Thus we use this workaround to add an empty columns at the end
            $lastColumn = 12 - intval(sizeof($posts)) * intval($block_grid_large) % 12;
            foreach ($posts as $post) {
                $rockthemes_advanced_details = get_post_meta($post->ID, 'advanced_post_details', true);
                if (!isset($rockthemes_advanced_details['ajax_filtered_thumbnail']) || empty($rockthemes_advanced_details['ajax_filtered_thumbnail'])) {
                    //has_post_thumbnail($post->ID);
                    $featuredBig = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'ajax-filtered-hover');
                    if ($featuredBig) {
                        $featuredBig = $featuredBig[0];
                    } else {
                        $featuredBig = wp_get_attachment_url(get_post_thumbnail_id($post->ID)) && !$featuredBig ? wp_get_attachment_url(get_post_thumbnail_id($post->ID)) : 'no-image';
                    }
                    $thumbnail = wp_get_attachment_image(get_post_thumbnail_id($post->ID), $image_size);
                } else {
                    $featuredBig = $rockthemes_advanced_details['ajax_filtered_hover_box_image'];
                    $thumbnail = '<img src="' . $rockthemes_advanced_details['ajax_filtered_thumbnail'] . '" />';
                }
                $title = $thumbnail ? $thumbnail : $post->post_title;
                $link = get_post_permalink($post->ID);
                $excerpt = rock_check_p(rockthemes_excerpt($post->post_excerpt, $excerpt_length));
                if (get_post_meta($post->ID, '_sale_price', true) != '' && rockthemes_woocommerce_active()) {
                    $excerpt = '<div class="remove-foundation-padding"><div class="large-9 columns">' . rock_check_p(rockthemes_excerpt($post->post_excerpt, $excerpt_length)) . '</div><div class="price-holder large-3 columns right-text">' . woocommerce_price(get_post_meta($post->ID, '_sale_price', true)) . '</div></div>';
                }
                if ($link != '' && $activate_hover != 'true') {
                    $title = '<a href="' . $link . '">' . $title . '</a>';
                }
                if ($activate_hover == 'true') {
                    /*
                    $hover_effect = '
                    	<div class="regular-hover-container"><div class="hover-bg"><div class="hover-icon-container"><i class="fa fa-link"></i><i class="icon-zoom-in"></i></div></div></div>
                    ';
                    
                    $full_image= wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),'full' );
                    $hover_effect = '
                    	<div class="regular-hover-container '.(($small_thumb_hover == 'true') ? 'small-thumb' : '').'"><div class="hover-bg"><div class="hover-icon-container"><a href="'.$link.'" class="iconeffect"><img src="'.F_WAY.'/images/icomoon/link.svg" class="use_svg" /></a><a href="'.$full_image[0].'" rel="prettyPhoto" class="iconeffect"><img src="'.F_WAY.'/images/icomoon/search.svg" class="use_svg" width="32" height="32" /></a></div></div></div>
                    ';
                    */
                    $hover_effect = quasar_hover_effect($post->ID, $use_shadow === 'true' ? true : false, $disable_hover_link !== 'false' ? false : true);
                    $title = '<div class="relative-container rockthemes-hover">' . $title . $hover_effect . '</div>';
                }
                $return .= '<li class="ajax-filtered-element" featured-big="' . $featuredBig . '">' . $title . '<div class="hide"><div class="header-title">' . $post->post_title . '</div>' . $excerpt . '</div></li>';
            }
            //if($lastColumn > 0) $return .= '<div class="large-'.$lastColumn.' columns"></div>';
        } else {
            $return .= '<li class="large-12 columns">' . __("No data found!", "quasar") . '</li>';
        }
        $return .= '</ul>';
        $return .= '</div>';
        //End of Body
        $return .= '<div class="clear"></div>';
        if ($activate_category_link == 'active') {
            //Footer navigation
            $return .= '
					<div class="ajax-filtered-footer">
						<div class="right">
							<p>
								<br/>
							</p>
						</div>
						<div class="clear"></div>
					</div>';
        }
        $return .= '</div>';
        //End of HTML field
        if ($boxed_layout == "true") {
            $return .= '</div>';
        }
        $script = '<script type="text/javascript">';
        $script .= 'jQuery(document).ready(function(){';
        //Plain text loading string
        $loadingScript = "<div class='row loading'><div class='large-12 columns'>" . __("Loading...", "quasar") . "</div></div>";
        //Animated loading screen
        $loadingScript = "<div class='row loading rock-loader-container'><div class='loader-gif'><img src='" . F_WAY . '/images/gif-loader.gif' . "'  /></div><div class='loader'></div></div>";
        //General Loader
        $loadingScript = "<div class='row loading rock-loader-container loader-not-supported'><div class='loader-gif'><img src='" . F_WAY . "/images/loader.gif\\' /></div><div class='loader'></div></div>";
        $errorDataScript = "<div class='row'><div class='large-12 columns'>" . __("Loading Error. Try Again", "quasar") . "</div></div>";
        $script .= '
				
				jQuery.fn.rockthemes_svg_control();
				
				var contentPadding = ' . rockthemes_fn_px_em_return_num(xr_get_option('content_padding', '10px')) . ';
				var _onChange = false;
				var staticHeightTimeout;
				jQuery(document).on("click", "#' . $id . ' .category-name", function(e){
					e.preventDefault();
					if(_onChange) return;
					_onChange = true;
					
					jQuery("#' . $id . ' .category-name.active").removeClass("active");
					jQuery(this).addClass("active");
					
					jQuery("#' . $id . ' .ajax-body").stop(true,true);
					
					if(typeof staticHeightTimeout != "undefined"){
						clearTimeout(staticHeightTimeout);
					}
					
					if(jQuery("#' . $id . ' .ajax-filtered-footer").length){
						jQuery("#' . $id . ' .ajax-filtered-footer p").remove();
						var catURL = jQuery(this).attr("cat-link");
						var catName = jQuery(this).find("a").html();

						if(typeof catURL != "undefined"){
							jQuery("#' . $id . ' .ajax-filtered-footer .right").append("<p><a href=\'"+catURL+"\'>"+catName+" <i class=\'fa-angle-double-right\'></i></a></p>");	
						}else{
							jQuery("#' . $id . ' .ajax-filtered-footer .right").append("<p><br/></p>");	
						}
					}
					
					var staticHeight = (parseInt(jQuery("#' . $id . ' .ajax-body").height().toString().replace("px",""))+30)+"px";
					staticHeight = jQuery("#' . $id . ' .ajax-body").height();

					if(staticHeight < 150) staticHeight = 150;
					jQuery("#' . $id . ' .ajax-body").css("min-height",staticHeight);
					
					jQuery("#' . $id . ' .ajax-body > ul").remove();
					jQuery("#' . $id . ' .ajax-body").append(jQuery("' . $loadingScript . '"));
					
					//Check if loader css3 transition supported
					if(!Modernizr.csstransitions){
						jQuery(".rock-loader-container").addClass("loader-not-supported");
					}
									
					var slug = jQuery(this).attr("slug-holder");
					var taxonomyVar = jQuery(this).attr("taxonomy");
					var postType = "";
					var imageSize = jQuery(this).parent().parent().attr("image_size");
					if(jQuery(this).parent().parent().attr("post_type")){
						postType = jQuery(this).parent().parent().attr("post_type");
					}
					
					var rockthemes_ajax_filter_nonce = "' . esc_js(wp_create_nonce('rockthemes_ajax_filter_nonce')) . '";
					
					jQuery.post("' . admin_url('admin-ajax.php') . '", {image_size:imageSize, _ajax_nonce:rockthemes_ajax_filter_nonce, categorySlug:slug, taxonomy:taxonomyVar, post_type:postType, total:"' . (int) $total . '", block_class:"' . $block_class . '", excerpt_length:"' . (int) $excerpt_length . '", hover_obj:' . json_encode($hover_obj) . ', action:"get_ajaxfiltered_elems"}, function(data){
						_onChange = false;

						if(data != null){
							//Start loading images
							jQuery("#' . $id . ' .ajax-body").append("<div class=\\"hide wrap-temp\\">"+data.body+"</div>");

							jQuery("#' . $id . ' .ajax-body").find(".wrap-temp ul > li").css("display","none");
							jQuery("#' . $id . ' .ajax-body").find(".wrap-temp ul").unwrap();

							var totalImages = jQuery("#' . $id . ' .ajax-body ul li .relative-container > img, #' . $id . ' .ajax-body ul li > a > img").length;
							
							if(totalImages > 0){

								var currentLoadedImage = 0;
								jQuery("#' . $id . ' .ajax-body ul li .relative-container > img, #' . $id . ' .ajax-body ul li > a > img").load(function(){
									currentLoadedImage++;
									
									if(currentLoadedImage >= totalImages){
										//All Images are loaded. Fade them in slowly
										jQuery("#' . $id . ' .ajax-body > .row.loading").remove();

										jQuery("#' . $id . ' .ajax-body ul > li").each(function(i){
											jQuery(this).delay(100*i).fadeIn();
										});
									}
								});
							}else{
								jQuery("#' . $id . ' .ajax-body > .row.loading").remove();
								jQuery("#' . $id . ' .ajax-body .row > .columns").each(function(i){
									jQuery(this).delay(100*i).fadeIn();
								});
							}
							
							jQuery("a[rel^=\\"prettyPhoto\\"]").prettyPhoto();

						}else{
							jQuery("#' . $id . ' .ajax-body > .row").remove();
							jQuery("#' . $id . ' .ajax-body").append("' . $errorDataScript . '");
						}
						
						
						staticHeightTimeout = setTimeout(function(){
							jQuery("#' . $id . ' .ajax-body").stop(true,true).animate({"min-height":"0" },800,"linear");
						},800);
					});
					
				});';
        if ($activate_hover_box == "true") {
            $script .= '
					
					jQuery(document).on("mouseover", "#' . $id . ' .ajax-body .ajax-filtered-element", function(e){
						if(jQuery(this).children().length <= 0) return;
						if(!jQuery(this).attr("featured-big") || jQuery(this).attr("featured-big") == "no-image") return;
						if(jQuery(window).width() < 900) return;
						
						
						if(jQuery(".ajax-filtered-hover-box").length >0){
							jQuery(".ajax-filtered-hover-box").remove();
						}
						
						var imageLink = jQuery(this).attr("featured-big");
						var coords = jQuery(this).offset();
						coords.width = jQuery(this).width();
						coords.height = jQuery(this).height();

						var desc = jQuery(this).find(".hide").html();
						
						var elem = ajaxFilteredHoverBox(coords,imageLink,desc);
						
						jQuery("body").append(elem);
					});
					
					jQuery(document).on("mouseout", "#' . $id . ' .ajax-body .ajax-filtered-element", function(){
						
						if(jQuery(".ajax-filtered-hover-box").length >0){
							jQuery(".ajax-filtered-hover-box").remove();
						}
					});
					/*
					jQuery(document).on("mousemove", function(e){
						if(jQuery(".ajax-filtered-hover-box").length >0){
							jQuery(".ajax-filtered-hover-box").css({"left":e.pageX +30, "top":e.pageY - 200});
						}
					});
					*/
					function ajaxFilteredHoverBox(coords,image,desc){
						var boxWidth = "' . xr_get_option('ajax_filtered_hover_width', '590px') . '";
						var boxHeight = "' . xr_get_option('ajax_filtered_hover_height', '300px') . '";
						
						var widthNum = boxWidth.replace("px","");
						widthNum = widthNum.replace("em","");
						widthNum = parseInt(widthNum);
						
						var heightNum = boxHeight.replace("px","");
						heightNum = heightNum.replace("em","");
						heightNum = parseInt(heightNum);

						var leftVal = coords.left + coords.width + (contentPadding / 2) - 2;
						if((leftVal + widthNum + 20) > jQuery(document).width()){
							leftVal = leftVal - coords.width - widthNum - contentPadding;
						}

						var topVal = coords.top + coords.height - heightNum - 80 - 7 - 2;
						


						if(topVal < jQuery(window).scrollTop()){
							topVal = coords.top + 6 - 1;	
						}
												
						var box = "<div class=\\"ajax-filtered-hover-box shadow-box-class fadeIn animated\\" style=\\"position:absolute; left:"+leftVal+"px; top:"+topVal+"px; \\">";
						box += "<div class=\\"ajax-filtered-image\\"><img src="+image+" /></div>"
						if(typeof desc != "undefined" && desc != "") box += "<div class=\\"desc\\"><p>"+desc+"</p></div>";
						box += "</div>";
						return box;
					}
					
					';
        }
        $script .= '});';
        $script .= '</script>';
        //End of Script
        return $return . $script;
    }