Subversion Repositories SmartDukaan

Rev

Rev 7809 | Rev 7845 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
7809 rajveer 75
	$('#cod_know_more,.cod_know_more').click(function(){
7680 rajveer 76
		$.colorbox({
7809 rajveer 77
    		width: "400px",
78
    		height: "350px",
7680 rajveer 79
    		inline: true,
7809 rajveer 80
    		href: "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'>"
81
    			+"<li>Prepaid delivery date is " + $("#shipping_time .red").html() + "</li>"+
7810 rajveer 82
    			"<li>" + $("#shipping_time .cod").html() + "</li>"+
7809 rajveer 83
        "</ul>",
7680 rajveer 84
        onComplete: function(){
7809 rajveer 85
		trackEventWithGA('Widget', 'COD Know More is clicked', '');
7680 rajveer 86
			}
87
    	});
88
	});
89
 
4237 varun.gupt 90
	$('#shoppingExpInfo').click(function(){
91
		$.colorbox({
4284 varun.gupt 92
    		width: "550px",
93
    		height: "320px",
4237 varun.gupt 94
    		inline: true,
95
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 96
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
97
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
98
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 99
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 100
			onComplete: function(){
6261 amit.gupta 101
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 102
			}
4237 varun.gupt 103
    	});
104
	});
6245 kshitij.so 105
 
6552 kshitij.so 106
 
6970 kshitij.so 107
	$('.insuranceInfo').click(function(){
108
		$.colorbox({
109
    		width: "520px",
110
    		height: "280px",
111
    		inline: true,
112
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
113
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
114
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
115
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
116
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 117
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 118
    		"</ul>",
119
			onComplete: function(){
120
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
121
			}
122
    	});
123
	});
124
 
125
 
6959 kshitij.so 126
	$('.emiInfo').click(function(){
6453 kshitij.so 127
		$.colorbox({
6967 kshitij.so 128
    		width: "590px",
129
    		height: "480px",
6453 kshitij.so 130
    		inline: true,
7051 kshitij.so 131
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 132
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 133
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 134
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
135
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
136
    		"<thead>"+
137
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
138
            "</thead>"+
139
            "<tbody>"+
140
            "<tr>"+
141
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
142
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
143
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 144
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
145
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 146
            "</tr>"+
147
            "<tr>"+
148
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
149
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
150
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 151
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
152
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 153
            "</tr>"+
154
            "</tbody>"+
155
            "</table>"+
156
            "<br>"+
157
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
158
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 159
    		"<br>"+
6967 kshitij.so 160
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
161
    		"</ul>"+
6959 kshitij.so 162
    		"<br>"+
6967 kshitij.so 163
    		"</div>"+
164
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 165
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 166
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 167
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 168
    		"<thead>"+
169
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 170
            "</thead>"+
171
            "<tbody>"+
172
            "<tr>"+
6970 kshitij.so 173
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
174
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 175
            "</tr>"+
176
            "<tr>"+
177
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
178
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
179
            "</tr>"+
180
            "</tbody>"+
181
            "</table>"+
182
            "<br>"+
183
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
184
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
185
    		"<br>"+
186
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
187
    		"</ul>"+
188
    		"<br>"+
189
    		"</div>"+
190
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 191
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 192
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
193
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
194
    		"<thead>"+
6970 kshitij.so 195
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 196
            "</thead>"+
197
            "<tbody>"+
198
            "<tr>"+
199
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 200
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
201
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
202
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
203
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
204
            "</tr>"+
6772 kshitij.so 205
            "<tr>"+
7051 kshitij.so 206
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 207
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
208
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
209
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
210
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 211
            "</tr>"+
6967 kshitij.so 212
            "</tbody>"+
213
            "</table>"+
214
            "<br>"+
215
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
216
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
217
    		"<br>"+
6970 kshitij.so 218
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 219
    		"</ul>"+
220
    		"<br>"+
221
    		"</div>"+
222
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 223
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 224
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
225
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
226
    		"<thead>"+
6970 kshitij.so 227
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 228
            "</thead>"+
229
            "<tbody>"+
6772 kshitij.so 230
            "<tr>"+
6967 kshitij.so 231
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
232
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
233
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
234
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
235
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 236
            "</tr>"+
237
            "<tr>"+
7051 kshitij.so 238
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 239
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
240
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
241
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
242
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
243
            "</tr>"+
244
            "</tbody>"+
245
            "</table>"+
246
            "<br>"+
247
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
248
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
249
    		"<br>"+
6970 kshitij.so 250
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 251
    		"</ul>"+
252
    		"<br>"+
253
    		"</div>"+
254
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 255
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 256
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 257
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 258
    		"<thead>"+
6970 kshitij.so 259
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 260
            "</thead>"+
261
            "<tbody>"+
262
            "<tr>"+
7017 kshitij.so 263
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
264
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
265
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
266
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6967 kshitij.so 267
            "</tr>"+
268
            "<tr>"+
7051 kshitij.so 269
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
7017 kshitij.so 270
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
271
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
272
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 273
            "</tr>"+
6967 kshitij.so 274
            "</tbody>"+
275
            "</table>"+
276
            "<br>"+
277
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
278
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
279
    		"<br>"+
6970 kshitij.so 280
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 281
    		"</ul>"+
282
    		"<br>"+
283
    		"</div>"+
284
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 285
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 286
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
287
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
288
    		"<thead>"+
6970 kshitij.so 289
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 290
            "</thead>"+
291
            "<tbody>"+
6772 kshitij.so 292
            "<tr>"+
6970 kshitij.so 293
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 294
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
295
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
296
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 297
            "</tr>"+
298
            "<tr>"+
7051 kshitij.so 299
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 300
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
301
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
302
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 303
            "</tr>"+
6967 kshitij.so 304
            "</tbody>"+
305
            "</table>"+
306
            "<br>"+
307
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
308
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
309
    		"<br>"+
6970 kshitij.so 310
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 311
    		"</ul>"+
312
    		"<br>"+
313
    		"</div>"+
314
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
7783 rajveer 315
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 316
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
317
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
318
    		"<thead>"+
6970 kshitij.so 319
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 320
            "</thead>"+
321
            "<tbody>"+
322
            "<tr>"+
323
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
324
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
325
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
326
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
327
            "</tr>"+
328
            "<tr>"+
7051 kshitij.so 329
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 330
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
331
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
332
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
6959 kshitij.so 333
            "</tr>"+
6967 kshitij.so 334
            "</tbody>"+
335
            "</table>"+
336
            "<br>"+
337
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
338
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
339
    		"<br>"+
6970 kshitij.so 340
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 341
    		"</ul>"+
342
    		"<br>"+
343
    		"</div>"+
344
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 345
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 346
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
347
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
348
    		"<thead>"+
349
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
350
            "</thead>"+
351
            "<tbody>"+
6959 kshitij.so 352
            "<tr>"+
6967 kshitij.so 353
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
354
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
355
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 356
            "</tr>"+
357
            "<tr>"+
7051 kshitij.so 358
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
6967 kshitij.so 359
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
360
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 361
            "</tr>"+
6772 kshitij.so 362
            "</tbody>"+
363
            "</table>"+
364
            "<br>"+
6967 kshitij.so 365
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
366
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
367
    		"<br>"+
368
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
369
    		"</ul>"+
370
    		"<br>"+
371
    		"</div>"+
372
    		"<br><br>",
6453 kshitij.so 373
			onComplete: function(){
374
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
375
			}
376
    	});
377
	});
6245 kshitij.so 378
 
6792 vikram.rag 379
	$('a.mk_best_deal_detail').live('click', function(){
380
		var offerLinkHtml = '';
381
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 382
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 383
		}
384
		$.colorbox({
385
			width: "550px",
386
    		height: "300px",
387
    		inline: true,
388
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
389
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
390
    			'</p><span class="right">' + offerLinkHtml 
391
		});
392
	});
6453 kshitij.so 393
 
6792 vikram.rag 394
 
6245 kshitij.so 395
	$('#pickupstoreInfo').click(function(){
396
		$.colorbox({
397
    		width: "550px",
398
    		height: "370px",
399
    		inline: true,
400
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 401
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
402
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
403
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
404
		"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
405
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
406
		"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
6245 kshitij.so 407
 
408
			onComplete: function(){
6262 amit.gupta 409
				var ev = "Product Page";
6303 amit.gupta 410
				var label = window.location.pathname;
6264 amit.gupta 411
				if (label=="" || label=="#")
6261 amit.gupta 412
				{
6303 amit.gupta 413
					label = "";
6262 amit.gupta 414
					ev = "Home Page";
6261 amit.gupta 415
				}
6262 amit.gupta 416
				else if (label.indexOf("shipping") != -1){
417
					ev = "Shipping Page";
418
					var blkstr = [];
6263 amit.gupta 419
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 420
						blkstr.push(str);
421
					});
6303 amit.gupta 422
					label = blkstr.join(", ");
423
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
424
					ev = "Category Page";
425
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
426
					ev = "Product Page";
6262 amit.gupta 427
				}
6261 amit.gupta 428
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 429
			}
430
    	});
431
	});
4126 varun.gupt 432
 
5420 amit.gupta 433
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 434
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
435
		var widgetBox = $(this).siblings('.common-widget-content-area');
436
		var controlBox = $(this).siblings('.common-widget-control-bar');
437
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 438
 
4126 varun.gupt 439
		if (isColapsed)	{
440
			if(controlBox.length > 0)	{
441
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 442
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 443
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
444
				});
445
			} else	{
446
				$(widgetBox).slideDown();
447
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
448
			}
449
		} else	{
450
			$(widgetBox).slideUp(function(){
451
				$(controlBox).slideUp('fast');
452
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
453
			});
454
		}
455
		$(this).data('is_colapsed', !isColapsed);
456
	});
457
 
458
	/**
459
	 * Update count of products checked for comparison
460
	 **/
461
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 462
		updateCompareCount();
4126 varun.gupt 463
	});
464
 
465
	$("#research_compare").live('click', function(){
466
		var seldata = "";
5322 amit.gupta 467
		var prodnames = "";
4126 varun.gupt 468
		var tot = 1;
469
		var saprt = "";
470
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 471
		var haveSameProductType = true;
472
		var productType = null;
473
 
4126 varun.gupt 474
		$(par).each(function(){
4926 varun.gupt 475
 
476
			if(productType != null && productType != $(this).attr('producttype'))	{
477
				haveSameProductType = false;
478
			}
479
			productType = $(this).attr('producttype');
480
 
4126 varun.gupt 481
			if(tot == 1)	{
5358 amit.gupta 482
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 483
				seldata += "p" + tot + "=" + $(this).val();
484
			} else	{
485
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 486
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 487
			}
488
			tot ++;
489
		});
4984 varun.gupt 490
 
4926 varun.gupt 491
		if(! haveSameProductType)	{
492
			alert("Only products of same category can be compared");
493
		} else if(tot > 6)	{
4126 varun.gupt 494
			alert("Can compare upto five products only.");
495
		} else if(tot > 2)	{
5552 phani.kuma 496
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 497
		} else	{
498
			alert("Please select atleast two products");
499
		}
500
	});
501
 
502
	$("#research_delete").live('click', function(){
503
		var research_tot = $("#research_total").val();
504
		var seldata = [];
505
		var tot = 0;
506
		var saprt = "";
507
		var par = $('#myresearch').find('input[type=checkbox]:checked');
508
 
509
		$(par).each(function(){
510
			seldata.unshift($(this).val());
511
			tot ++;
512
		});
513
 
514
		if(tot > 0)	{
515
			var t = (research_tot * 1) - (tot * 1);
516
			$("#research_total").val(t);
517
 
518
			jQuery.ajax({
519
				type: "GET",
520
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
521
				success: function(msg)	{
522
					jQuery.each(seldata, function(intIndex, objValue){
523
						delete_from_storage_set("resitems", objValue);
524
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
525
							$(this).remove();
526
							if(t === 0)	{
527
								$("#research_default").css("display", "block");
528
							}
529
						});
530
					});
4984 varun.gupt 531
 
4922 varun.gupt 532
					//Updating the count
533
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 534
 
535
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
536
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
537
					}
4126 varun.gupt 538
				}
539
			});
540
		} else	{
541
			alert("Please select atleast one product");
542
		}
543
	});
544
 
545
	// No uid cookie
546
	if (!$.cookie("uid"))	{
547
		// No uid in storage
548
		if (!$.Storage.get("uid"))	{
549
			if (!$.Storage.get("resitems"))	{
550
				$.Storage.set("resitems", "[]");
551
			}
552
			if (!$.Storage.get("histitems"))	{
553
				$.Storage.set("histitems", "[]");
554
			}
555
		}
556
		else	{			// uid in storage : logout
557
			$.Storage.remove("uid");
558
			$.Storage.set("resitems", "[]");
559
			$.Storage.set("histitems", "[]");
560
		}
561
		load_research_widget();
562
		load_history_widget();
563
	}
564
	else	{				// With uid cookie
565
		var cookie = $.cookie("uid");
566
		// Just logged in merge storage items
567
		if (!$.Storage.get("uid"))	{
568
			$.Storage.set("uid", cookie);
569
			merge_history_items();
570
			load_research_items();
571
		}
572
		else	{
573
			// UID changed
574
			if ( cookie != $.Storage.get("uid"))	{
575
				$.Storage.set("uid", cookie);
576
				$.Storage.set("resitems", "[]");
577
				$.Storage.set("histitems", "[]");
578
				merge_history_items();
579
				load_research_items();
580
			}
581
			else	{		// Uid is same
582
				if (!$.Storage.get("resitems"))	{
583
					$.Storage.set("resitems", "[]");
584
					load_research_items();
585
				}
586
				else	{
587
					load_research_widget();
588
				}
589
 
590
				if (!$.Storage.get("histitems"))	{
591
					$.Storage.set("histitems", "[]");
592
					merge_history_items();
593
				}
594
				else	{
595
					load_history_widget();
596
				}
597
			}
598
		}
599
	}
4798 varun.gupt 600
 
601
	function load_research_items(){
602
		jQuery.ajax({
603
			type: "GET",
604
			url: "/myresearch",
605
			cache: false,
606
			success: function(json) {
607
			    $.Storage.set("resitems", json);
608
			    load_research_widget();
609
		    }
610
		});
611
	}
612
 
613
	function load_research_widget(){
614
		var myResearchWidgetContainer = $("#myresearch");
615
 
616
		if($(myResearchWidgetContainer).length == 0) {
617
			return;
618
		}
619
		var resitems = $.Storage.get("resitems");
620
 
621
		if (resitems == "[]") {
622
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
623
		      <tbody>\
624
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
625
		       </tbody>\
626
		      </table>';
627
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
628
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
629
			return;
630
		}
631
		var params = "/" + resitems;
632
 
633
		jQuery.ajax({
634
			type : "GET",
635
			url : "/myresearch" + params,
636
			cache: true,
637
			success : function(html) {
638
	   		    $("#myresearch").html(html);
639
	   			updateCompareCount();
640
 
641
			    // Product Title
642
			    $("#myresearch table td div a.truncate").each(function() {
643
						$(this).truncate({addtitle : true});
644
			    });
645
 
646
			    // Product Price
647
			    $("#myresearch table td div div.price").each(function() {
648
						$(this).truncate({addtitle : true});
649
				});
650
 
651
			    // Product Details
652
			    $("#myresearch table td div div.text").each(function() {
653
						$(this).truncate( {addtitle : true});
654
				});
655
		    }
656
		});
657
	}
4126 varun.gupt 658
});